/* ==========================================================================
   1. 全局重置与基础变量 (Global Reset & CSS Variables)
   ========================================================================== */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius-md: 10px;
    --radius-lg: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   2. 顶部导航栏 (Navbar)
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    padding: 15px 8%;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
}

.nav-search {
    display: flex;
    align-items: center;
    background-color: #f1f5f9;
    border-radius: 20px;
    padding: 4px 6px 4px 16px;
    width: 320px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-search:focus-within {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.nav-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-main);
}

.nav-search button {
    border: none;
    background: var(--primary-color);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nav-search button:hover {
    background: var(--primary-hover);
}

/* ==========================================================================
   3. 主体布局 (Main Container)
   ========================================================================== */
.main-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 25px;
    max-width: 1300px;
    margin: 25px auto;
    padding: 0 20px;
}

/* ==========================================================================
   4. Banner 横幅推荐
   ========================================================================== */
.banner-section {
    margin-bottom: 25px;
}

.banner-slide {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 180px;
    box-shadow: var(--shadow-sm);
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
    padding: 20px;
}

.banner-info h2 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.banner-info p {
    font-size: 0.88rem;
    opacity: 0.9;
}

/* 通用区块标题 */
.section-title {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary-color);
}

/* ==========================================================================
   5. 商务合作区块（与热门网盘平行）
   ========================================================================== */
.business-card-main {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.business-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.business-header h4 {
    font-size: 1.2rem;
    color: var(--text-main);
}

.ad-badge {
    background: #e0e7ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 4图并排网格布局 */
.business-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.business-gallery .img-box {
    width: 100%;
    height: 150px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: #e2e8f0;
}

.business-gallery .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.business-gallery .img-box img:hover {
    transform: scale(1.05);
}

.business-info .biz-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 12px;
}

.biz-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: var(--text-main);
}

.biz-detail-item i {
    color: var(--primary-color);
    margin-right: 6px;
}

/* ==========================================================================
   6. 热门网盘资源卡片列表
   ========================================================================== */
.resource-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resource-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.resource-card:hover {
    box-shadow: var(--shadow-md);
}

.card-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-movie { background: #fee2e2; color: #dc2626; }
.tag-study { background: #dcfce7; color: #16a34a; }
.tag-tool  { background: #e0f2fe; color: #0284c7; }

.resource-card h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    padding-right: 60px;
}

.resource-card > p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* 子分类选看按钮组 */
.sub-category-box {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 16px;
}

.sub-cat-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.sub-link-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sub-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.sub-link-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.link-label {
    background: #eff6ff;
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 4px;
}

/* 卡片底部 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 14px;
}

.update-time {
    font-size: 0.8rem;
    color: #94a3b8;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.2s;
}

.download-btn:hover {
    background: var(--primary-hover);
}

/* ==========================================================================
   7. 右侧边栏组件 (Sidebar Widgets)
   ========================================================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.widget-header {
    background: #f8fafc;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-header i {
    color: var(--primary-color);
}

.widget-body {
    padding: 16px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    font-size: 0.88rem;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.submit-request-btn {
    width: 100%;
    padding: 9px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.submit-request-btn:hover {
    background: var(--primary-hover);
}

.request-success-msg {
    margin-top: 10px;
    color: #16a34a;
    font-size: 0.88rem;
    text-align: center;
}

/* 商务招商组件 */
.business-box {
    text-align: center;
}

.business-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.business-qq {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.business-sub {
    font-size: 0.8rem;
    color: #94a3b8;
}

.notice-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   8. 页脚 (Footer)
   ========================================================================== */
.footer {
    text-align: center;
    padding: 25px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

/* ==========================================================================
   9. 响应式适配 (Responsive Media Queries)
   ========================================================================== */
@media (max-width: 992px) {
    .main-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .nav-search {
        width: 100%;
    }

    /* 手机端商务合作 4 图自动调整为 2x2 排列 */
    .business-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .business-gallery .img-box {
        height: 120px;
    }

    .biz-details {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==========================================================================
   留言列表与点赞小手专有样式
   ========================================================================== */
.comment-list-container {
    margin-top: 18px;
    border-top: 1px dashed var(--border-color, #e2e8f0);
    padding-top: 12px;
}

.comment-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 280px;
    overflow-y: auto;
}

.comment-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.comment-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.comment-text {
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 500;
    word-break: break-all;
    line-height: 1.4;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 6px;
}

/* 点赞按钮外观 */
.comment-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.comment-like-btn:hover {
    color: #2563eb;
    border-color: #93c5fd;
    background: #eff6ff;
}

.comment-like-btn.liked {
    color: #2563eb;
    border-color: #2563eb;
    background: #eff6ff;
    font-weight: bold;
}