/* section容器使用flex布局 */
.main-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

/* 文章内容容器 */
.article {
    flex: 1;
    max-width: calc(100% - 320px);
}

/* 浮动框在右侧 - 去除固定定位 */
.sidebar {
    width: 280px;
    align-self: flex-start;
    margin-left: 20px;
}

/* 关联文章样式优化 */
.sidebar-item {
    background: linear-gradient(135deg, #1a1f3c 0%, #0f1224 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-item h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.3);
}

.sidebar-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-item li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-item a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    transition: all 0.2s ease;
}

.sidebar-item a:hover {
    color: #60a5fa;
    transform: translateX(3px);
}

/* 评论区域样式优化 */
.comments {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.comments h3 {
    color: #e2e8f0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.comments textarea {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
    border-radius: 8px;
}

.comments .btn-outline {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
}

.comments .btn-outline:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-1px);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .main-content {
        display: block;
    }

    .article {
        max-width: 100%;
    }

    .sidebar {
        width: 100%;
        margin-left: 0;
        margin-top: 30px;
    }
}

/* 手机版隐藏关联文章 */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}
