/* ===== 基础样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a73e8; /* 科技蓝 */
    --secondary-color: #34a853; /* 辅助绿 */
    --accent-color: #fbbc05; /* 强调黄 */
    --dark-color: #202124;
    --light-color: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 头部样式 ===== */
header {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: white;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
    min-height: 80px; /* 设置最小高度 */
}
h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
a {
    text-decoration: none;
}
footer {
    text-align: center;
    padding: 10px 0;
    position:fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #0d47a1 0%, #1a237e 100%); /* 比header更深的蓝色渐变 */
    border-top: 3px solid #FBBC05; /* 使用您标题中的强调黄色作为顶部边框 */
    color: white;
}

.logo {
    height: 110px; /* 固定高度 */
    width: auto; /* 宽度自动适应 */
    margin-right: 1.5rem;
    object-fit: contain; /* 保持图片比例 */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-gzhmu {
    height: 80px; /* 固定高度 */
    width: auto; /* 宽度自动适应 */
    margin-right: 1.5rem;
    object-fit: contain; /* 保持图片比例 */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.header-content {
    flex: 1;
}

.art-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.acronym-large {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.3rem;
    line-height: 1;
}

.full-form {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.from {
    font-style: italic;
    color: #0d47a1;
    margin-right: 0.3rem;
}

.c { color: #EA4335; }
.o { color: #FBBC05; }
.r { color: #34A853; }
.e { color: #34A853; }
.d { color: #FBBC05; }


/* ===== 导航标签 - 修复下拉菜单被遮挡问题 ===== */
/* 导航栏容器 - 提高层级 */
.navigator {
    position: relative;
    z-index: 10000 !important;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tabs {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 10000;
}

.tab {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    color: #0d47a1;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    z-index: 10000;
}

.tab i {
    margin-right: 8px;
    color: var(--primary-color);
}

.tab:hover {
    color: var(--primary-color);
    background-color: rgba(26, 115, 232, 0.1);
    transform: translateY(-2px); /* 轻微上浮 */
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* 下拉菜单容器 */
.dropdown {
    position: relative;
    z-index: 10000;
}

/* 下拉菜单内容 - 关键修复：提高z-index确保不被搜索框遮挡 */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 10001 !important;  /* 提高层级，确保在搜索下拉框之上 */
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown::after {
    content: "▾";
    margin-left: 4px;
}

.dropdown-content a {
    padding: 0.75rem 1.5rem;
    color: #0d47a1;
    display: block;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
}

/* 移动端响应式 - 调整下拉菜单 */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: #f8f9fa;
        margin-top: 5px;
        display: none;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .dropdown:hover .dropdown-content {
        display: none;
    }
    
    .dropdown.active::after {
        transform: rotate(180deg);
    }
}

/* ===== 搜索框 ===== */
.search-container {
    background-color: white;
    padding: 2rem 1rem;
    margin: 1rem auto;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    margin-top: 100px;
    position: relative;
    z-index: 100;  /* 降低搜索容器层级 */
}

.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.search-box {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    max-width: 75%;
    width: 75%;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: #0d47a1;
    transform: translateY(-1px);
}

/* ===== 内容区域 ===== */
.main-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
/* 图片容器样式 */
.image-container {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
    max-width: 800px;
    padding: 0 1rem;
}

.scheme-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    background-color: white;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.scheme-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: calc(var(--border-radius) - 2px);
}

/* 数据展示卡片 */
.data-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
}
/* ===== PDF展示区域控制 ===== */
.container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    position: relative;
}

.tabs-container {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex; 
    justify-content: center;
}

.tab-content {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex; 
    justify-content: center;
}
.tab-content.active {
    background-color: var(--primary-color);
    color: white;
}
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 左侧病毒按钮组 - 固定位置 */
.button-virus {
    position: sticky;
    top: 150px; /* 根据header高度调整 */
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 120px;
    z-index: 10;
}

.virus-btn {
    background-color: #e8f0fe;
    color: var(--primary-color);
}

.virus-btn:hover {
    background-color: #d2e3fc;
}

.virus-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.tissue-btn {
    background-color: #e8f0fe;
    color: var(--primary-color);
}

.tissue-btn:hover {
    background-color: #d2e3fc;
}

.tissue-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* PDF主内容区 */
.pdf-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* PDF容器 - 固定大小 */
.pdf-viewport {
    width: 800px;
    height: 600px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* PDF内容自适应 */
#pdfContainer {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* PDF页面画布 */
.pdf-page {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: none;
}

/* 下载链接 - 右侧固定位置 */
.pdf-download-wrapper {
    position: sticky;
    top: 180px; /* 与按钮组对齐 */
    align-self: flex-start;
    width: 120px;
    margin-left: 5px;
}

.pdf-download-link {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    text-align: center;
    word-break: break-word;
    color: white;
    transition: var(--transition);
    background-color: var(--primary-color);
}

.pdf-download-link:hover {
    background-color: #d2e3fc;
}

/* ===== 自定义下拉搜索框样式 ===== */
.custom-dropdown {
    position: relative;
    z-index: 100;
}

.custom-dropdown.active {
    z-index: 1002;
}

.dropdown-menu-custom {
    z-index: 1002;
}

/* ===== 弹窗层级控制 ===== */
#downloadMenu, 
#singleDownloadMenu {
    z-index: 20000;
}

#downloadMenuOverlay, 
#singleDownloadMenuOverlay {
    z-index: 19999;
}

.loading-overlay {
    z-index: 30000;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    
    .button-virus,
    .pdf-download-wrapper {
        position: static;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pdf-viewport {
        width: 100%;
        height: auto;
        min-height: 500px;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .navigator,
    .search-container,
    .chart-toolbar,
    .debug-panel,
    .single-download-icon,
    .sample-points-info,
    .download-btn,
    footer {
        display: none !important;
    }
    
    .boxplot-cell {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .cell-chart {
        height: 400px;
    }
}