:root {
    --primary-color: #1a73e8;
    --secondary-color: #0d47a1;
    --accent-color: #00bcd4;
    --light-bg: #f8f9fa;
    --dark-text: #202124;
    --light-text: #ffffff;
    --border-color: #dadce0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    
    /* Category colors */
    --b-category: #e8f0fe;
    --p-category: #fef7e0;
    --a-category: #e6f4ea;
    --v-category: #fce8e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Header styles */
.header {
    display: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.header .logo span {
    color: var(--accent-color);
}

/* 侧边导航 */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    padding: 20px 0;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 1000;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 5px;
}

.nav-links a {
    display: block;
    color: var(--light-text);
    padding: 12px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-color);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.intro {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.intro p {
    font-size: 1.1rem;
    color: #555;
}

.document-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

/* Category-specific background colors */
.b-category {
    background-color: var(--b-category);
}

.p-category {
    background-color: var(--p-category);
}

.a-category {
    background-color: var(--a-category);
}

.v-category {
    background-color: var(--v-category);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.download-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-item {
    background: var(--light-bg);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.info-item span {
    font-weight: 600;
    color: var(--secondary-color);
}

/* 表格容器 - 添加固定高度和内部滚动 */
.table-container {
    max-height: 1300px; /* 固定高度 */
    overflow-y: auto;  /* 垂直滚动 */
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.document-table {
    width: 100%;
    border-collapse: collapse;
}

.document-table th,
.document-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.document-table th {
    background-color: var(--light-bg);
    font-weight: 600;
    position: sticky; /* 固定表头 */
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 0 var(--border-color);
}

.document-table tr:hover {
    background-color: #f1f5f9;
}

/* 自定义滚动条样式 */
.table-container::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 8px 8px 0;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 8px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 首页汇总表格样式 */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9rem;
}

.summary-table th,
.summary-table td {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
}

.summary-table th {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.summary-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.summary-table tr:hover {
    background-color: #e9ecef;
}

.summary-table td:first-child {
    font-weight: bold;
    text-align: center;
}

.summary-table td:nth-child(6) {
    color: #e74c3c;
    font-weight: bold;
    text-align: right;
}

/* 链接按钮样式 */
.link-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    transition: background-color 0.3s;
}

.link-btn:hover {
    background-color: var(--secondary-color);
}

.buy-btn {
    background-color: #ff6b00;
}

.buy-btn:hover {
    background-color: #e65c00;
}

/* 底部联系信息 */
.footer {
    background: white;
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}

.contact-info {
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 0.9rem;
    color: #666;
}

/* 移动端样式 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2000;
    box-shadow: var(--shadow);
}

/* 响应式设计 - 修改移动端菜单显示方式 */
@media (max-width: 992px) {
    .header {
        display: block;
    }
    
    .container {
        flex-direction: column;
        margin-top: 120px; /* 增加顶部间距以适应多行导航 */
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 60px;
        left: 0;
        height: auto;
        max-height: 70vh;
        overflow-y: auto;
        padding-top: 10px;
        display: none; /* 默认隐藏，点击菜单按钮时显示 */
    }
    
    .sidebar.active {
        display: block;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .document-table, .summary-table {
        display: block;
        overflow-x: auto;
        font-size: 0.8rem;
    }
    
    /* 修改顶部导航菜单为多行显示 */
    .top-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        padding: 10px 15px;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 999;
        box-shadow: var(--shadow);
    }
    
    .top-nav a {
        color: var(--light-text);
        text-decoration: none;
        padding: 6px 8px;
        font-size: 0.7rem;
        text-align: center;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.1);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .top-nav a:hover, .top-nav a.active {
        background: rgba(255, 255, 255, 0.2);
    }
    
    /* 调整首页表格在移动端的显示 */
    .summary-table th, 
    .summary-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    /* 移动端链接按钮样式 */
    .link-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    /* 移动端表格容器调整 */
    .table-container {
        max-height: 800px; /* 移动端较小的高度 */
    }
}

@media (max-width: 768px) {
    .top-nav {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .container {
        margin-top: 150px; /* 增加顶部间距以适应多行导航 */
    }
    
    .top-nav {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .download-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .intro p {
        font-size: 1rem;
    }
    
    .header .logo h1 {
        font-size: 1.2rem;
    }
    
    .top-nav a {
        font-size: 0.65rem;
        padding: 5px 4px;
    }
    
    /* 进一步调整移动端表格样式 */
    .summary-table {
        font-size: 0.7rem;
    }
    
    .summary-table th, 
    .summary-table td {
        padding: 6px 4px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    /* 移动端表格容器调整 */
    .table-container {
        max-height: 350px; /* 移动端更小的高度 */
    }
}