/* ========================================
   中小学资料下载 Z-BlogPHP 模板样式
   ======================================== */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #4A90D9;
    --primary-dark: #357ABD;
    --primary-light: #E8F0FE;
    --accent: #FF6B35;
    --accent-light: #FFF0EB;
    --success: #27AE60;
    --warning: #F39C12;
    --danger: #E74C3C;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #F5F6FA;
    --bg-white: #FFFFFF;
    --border: #E8ECF1;
    --border-light: #F0F2F5;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --nav-height: 50px;
    --header-height: 80px;
    /* 阶段色 */
    --primary-color: #4A90D9;    /* 小学蓝 */
    --junior-color: #27AE60;     /* 初中绿 */
    --senior-color: #E74C3C;     /* 高中红 */
    --exam-color: #F39C12;       /* 升学橙 */
}

html { font-size: 14px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-width: 320px;
}
/* 仅屏幕阅读器可见，用于SEO隐藏h1 */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block; padding: 8px 20px; border-radius: var(--radius-sm);
    font-size: 14px; cursor: pointer; border: 1px solid transparent;
    text-align: center; transition: all .2s; line-height: 1.5;
    color: #fff; background: var(--primary);
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-block { display: block; width: 100%; }
.btn-download { display: inline-block; font-size: 15px; padding: 10px 30px; border-radius: 6px; color: #fff; font-weight: 500; margin: 0 6px; text-decoration: none; transition: opacity 0.2s; }
.btn-baidu { background: #3B7DED; }
.btn-baidu:hover { background: #2B6DD8; }
.btn-quark { background: #FF6B35; }
.btn-quark:hover { background: #E55A2B; }

/* ===== Top Notice ===== */
.top-notice {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; padding: 8px 0; font-size: 13px;
}
.top-notice .container { display: flex; align-items: center; justify-content: center; }

/* ===== Header ===== */
.site-header {
    background: var(--bg-white); border-bottom: 1px solid var(--border);
    padding: 15px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.site-logo a { display: flex; align-items: center; text-decoration: none; }
.site-logo img { height: 50px; }
.logo-text { display: flex; flex-direction: column; }
.logo-icon { font-size: 36px; }
.logo-title { font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.logo-subtitle { font-size: 12px; color: var(--text-light); }

.header-search { flex: 1; max-width: 500px; }
.header-search form { display: flex; }
.search-input {
    flex: 1; height: 40px; padding: 0 15px; border: 2px solid var(--primary);
    border-right: none; border-radius: var(--radius) 0 0 var(--radius);
    font-size: 14px; outline: none;
}
.search-input:focus { border-color: var(--primary-dark); }
.search-btn {
    height: 40px; padding: 0 20px; background: var(--primary); color: #fff;
    border: none; border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 14px; cursor: pointer; white-space: nowrap;
}
.search-btn:hover { background: var(--primary-dark); }
.hot-search { margin-top: 6px; font-size: 12px; color: var(--text-lighter); }
.hot-search a { color: var(--text-light); margin-left: 8px; }
.hot-search a:hover { color: var(--primary); }

/* ===== Main Navigation ===== */
.main-nav {
    background: var(--bg-white); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 999; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.nav-wrapper { position: relative; }
.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    padding: 10px; background: none; border: none; cursor: pointer;
    width: 44px; height: 44px; position: relative; z-index: 1001;
}
.nav-toggle .bar {
    display: block; width: 24px; height: 2px; background: var(--text);
    border-radius: 2px; transition: all .3s;
}
.nav-toggle.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active .bar:nth-child(2) { opacity: 0; }
.nav-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.nav-menu { display: flex; align-items: center; }
.nav-item { position: relative; }
.nav-item > a {
    display: flex; align-items: center; gap: 5px;
    padding: 14px 18px; font-size: 15px; color: var(--text);
    white-space: nowrap; transition: all .2s;
}
.nav-item > a:hover, .nav-item.active > a {
    color: var(--primary); background: var(--primary-light);
}
.nav-icon {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
}
.stage-primary { background: var(--primary-color); }
.stage-junior { background: var(--junior-color); }
.stage-senior { background: var(--senior-color); }
.stage-exam { background: var(--exam-color); }
.arrow-down { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--text-light); margin-left: 2px; }

/* ===== Mega Dropdown ===== */
.mega-dropdown {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--bg-white); box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
    min-width: 720px; z-index: 1000; padding: 20px 0;
    border: 1px solid var(--border); border-top: 3px solid var(--primary);
}
.nav-item:hover .mega-dropdown { display: block; }
.mega-dropdown .container { padding: 0; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 20px; }
.mega-col-title {
    font-size: 15px; font-weight: 600; margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 2px solid var(--primary-light);
}
.mega-col-title a { color: var(--primary-dark); }
.mega-col-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mega-col-list li a {
    display: inline-block; padding: 3px 10px; font-size: 13px;
    background: var(--bg); border-radius: var(--radius-sm);
    color: var(--text-light); transition: all .2s;
}
.mega-col-list li a:hover { background: var(--primary-light); color: var(--primary); }

/* ===== Mobile Nav ===== */
.mobile-nav-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.45); z-index: 1999;
    backdrop-filter: blur(2px);
}
.mobile-nav-panel {
    position: fixed; top: 0; left: 0; width: 280px; height: 100%;
    background: #fff; z-index: 2000; overflow-y: auto;
    transform: translateX(-100%); transition: transform .3s ease;
    box-shadow: 4px 0 30px rgba(0,0,0,0.12);
}
.mobile-nav-panel.open { transform: translateX(0); }
.mobile-nav-overlay.show { display: block; }
/* 面板装饰顶条 */
.mobile-nav-panel::before {
    content: ''; display: block; height: 4px;
    background: linear-gradient(90deg, #4A90D9, #27AE60, #F39C12, #E74C3C);
}
.mobile-nav-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    color: #fff;
}
.mobile-nav-title { font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.mobile-nav-close {
    width: 32px; height: 32px; line-height: 32px; text-align: center;
    background: rgba(255,255,255,0.2); border-radius: 50%;
    font-size: 20px; cursor: pointer; transition: background .2s;
}
.mobile-nav-close:hover { background: rgba(255,255,255,0.35); }
.mobile-nav-list { padding: 8px 0; }
.mobile-nav-list li { 
    margin: 2px 10px;
    border-radius: 8px;
    background: #fff;
    transition: all .25s;
    position: relative;
}
.mobile-nav-list > li {
    border-left: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
/* 一级菜单项不同颜色左边框 */
.mobile-nav-list > li:nth-child(4n+1) { border-left: 4px solid #4A90D9; }
.mobile-nav-list > li:nth-child(4n+2) { border-left: 4px solid #27AE60; }
.mobile-nav-list > li:nth-child(4n+3) { border-left: 4px solid #F39C12; }
.mobile-nav-list > li:nth-child(4n+4) { border-left: 4px solid #E74C3C; }
.mobile-nav-list li:hover,
.mobile-nav-list li:active { 
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transform: translateX(3px);
}
.mobile-nav-list a {
    display: block; padding: 13px 16px; color: #333; font-size: 15px;
    font-weight: 500; transition: color .2s;
}
.mobile-nav-list > li:hover a,
.mobile-nav-list > li:active a { color: inherit; }
.mobile-nav-list > li:nth-child(4n+1):hover a { color: #4A90D9; }
.mobile-nav-list > li:nth-child(4n+2):hover a { color: #27AE60; }
.mobile-nav-list > li:nth-child(4n+3):hover a { color: #F39C12; }
.mobile-nav-list > li:nth-child(4n+4):hover a { color: #E74C3C; }
.mobile-parent-link {
    font-weight: 700; font-size: 16px !important;
    display: flex; align-items: center; gap: 8px;
}
.mobile-expand {
    float: right; margin-top: -36px; margin-right: 12px;
    width: 28px; height: 28px; line-height: 26px; text-align: center;
    background: #F5F7FA; border: 2px solid #E0E5EB;
    border-radius: 8px; cursor: pointer;
    font-size: 14px; color: #666; font-weight: 700;
    transition: all .25s;
}
.mobile-expand:hover { background: #4A90D9; color: #fff; border-color: #4A90D9; }
/* 展开状态 */
.mobile-nav-list li.sub-open > .mobile-expand {
    background: #4A90D9; color: #fff; border-color: #4A90D9;
}
.mobile-sub-list {
    display: none;
    margin: 4px 8px 8px;
    border-radius: 6px;
    background: #F8FAFC;
    border: 1px solid #EDF0F5;
    overflow: hidden;
}
.mobile-sub-list li { 
    margin: 0; border-radius: 0; border-left: none;
    box-shadow: none;
    border-bottom: 1px solid #EDF0F5;
}
.mobile-sub-list li:last-child { border-bottom: none; }
.mobile-sub-list li:hover,
.mobile-sub-list li:active {
    background: #EEF2F8;
    box-shadow: none;
    transform: none;
}
.mobile-sub-list a { 
    padding: 11px 16px;
    font-size: 13px; font-weight: 400; color: #555;
}
.mobile-sub-list li:hover a { color: #4A90D9; }
/* 二级子菜单 */
.mobile-sub-list .mobile-sub-list {
    background: #F0F3F8;
    border: none;
    border-top: 1px solid #E4E9F0;
    margin: 0;
    border-radius: 0;
}
.mobile-sub-list .mobile-sub-list a { 
    padding-left: 16px;
    font-size: 12px; color: #777;
}
/* 面板底部 */
.mobile-nav-footer {
    padding: 20px; text-align: center;
    margin-top: 4px;
    border-top: 1px solid #F0F2F5;
}
.mobile-nav-footer p {
    font-size: 12px; color: #999; line-height: 1.8;
}

/* ===== Main Layout ===== */
.site-main { padding: 20px 0; min-height: 60vh; }

/* ===== Home Stages ===== */
.home-stages { margin-bottom: 30px; }
.stage-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px;
}
.stage-card {
    background: var(--bg-white); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s;
}
.stage-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stage-header {
    padding: 20px; color: #fff; text-align: center;
}
.stage-header.stage-primary { background: linear-gradient(135deg, #5B9BD5, #4A90D9); }
.stage-header.stage-junior { background: linear-gradient(135deg, #2ECC71, #27AE60); }
.stage-header.stage-senior { background: linear-gradient(135deg, #E74C3C, #C0392B); }
.stage-header.stage-exam { background: linear-gradient(135deg, #F1C40F, #F39C12); }
.stage-title { font-size: 20px; font-weight: 700; margin-bottom: 5px; }
.stage-desc { font-size: 12px; opacity: .9; margin-bottom: 8px; }
.stage-more { display: inline-block; padding: 4px 15px; background: rgba(255,255,255,.25); border-radius: 20px; color: #fff; font-size: 12px; }
.stage-more:hover { background: rgba(255,255,255,.4); color: #fff; }
.stage-body { padding: 15px; }
.stage-subjects {
    display: flex; flex-wrap: wrap; gap: 8px;
    list-style: none; padding: 0; margin: 0;
}
.stage-subjects li {
    flex: 0 0 calc(25% - 6px);
    min-width: 0;
    list-style: none;
}
.stage-subjects li a {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 8px 6px; background: var(--bg); border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text); transition: all .2s;
    width: 100%; box-sizing: border-box;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stage-subjects li a:hover { background: var(--primary-light); color: var(--primary); }
.subject-icon {
    width: 22px; height: 22px; line-height: 22px; text-align: center;
    background: var(--primary); color: #fff; border-radius: 50%; font-size: 11px; font-weight: 700;
}

/* ===== Home Content ===== */
.home-content { display: flex; gap: 30px; }
.content-main { flex: 1; min-width: 0; }

/* ===== Section Block ===== */
.section-block {
    background: var(--bg-white); border-radius: var(--radius);
    padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border-light);
}
.section-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 18px; font-weight: 700; color: var(--text);
}
.title-bar {
    display: inline-block; width: 4px; height: 20px; background: var(--primary); border-radius: 2px;
}
.title-bar.stage-primary { background: var(--primary-color); }
.title-bar.stage-junior { background: var(--junior-color); }
.title-bar.stage-senior { background: var(--senior-color); }
.title-bar.stage-exam { background: var(--exam-color); }

.section-tabs { display: flex; gap: 5px; }
.tab-item {
    padding: 5px 14px; font-size: 13px; cursor: pointer;
    border-radius: 20px; color: var(--text-light); transition: all .2s;
}
.tab-item.active, .tab-item:hover { background: var(--primary); color: #fff; }
.tab-empty {
    grid-column: 1 / -1; text-align: center; padding: 40px 20px;
    color: var(--text-lighter); font-size: 14px;
}
.section-more { font-size: 13px; color: var(--text-light); }
.section-more:hover { color: var(--primary); }

/* ===== Material Card Grid ===== */
.material-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.material-card {
    background: var(--bg-white); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border-light);
    transition: all .3s;
}
.material-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-thumb { position: relative; overflow: hidden; aspect-ratio: 5/3; background: var(--bg); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 24px; color: var(--text-lighter);
}
.card-badge {
    display: inline-block; padding: 2px 8px; margin-bottom: 6px;
    border-radius: 3px; font-size: 10px; color: #fff; font-weight: 500;
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-badge.stage-primary { background: var(--primary-color); }
.card-badge.stage-junior { background: var(--junior-color); }
.card-badge.stage-senior { background: var(--senior-color); }
.card-badge.stage-exam { background: var(--exam-color); }
.card-body { padding: 6px 8px; }
.card-title {
    font-size: 13px; font-weight: 600; margin-bottom: 4px;
    line-height: 1.3; max-height: 2.6em; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-desc {
    display: none;
}
.card-meta { display: flex; gap: 8px; font-size: 11px; color: var(--text-lighter); margin-top: 4px; }
.card-meta .meta-item { display: flex; align-items: center; gap: 2px; }

/* ===== Stage Card Grid (按阶段展示) ===== */
.stage-card-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.stage-material-card {
    background: var(--bg-white); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border-light);
    transition: all .3s;
}
.stage-material-card:hover {
    box-shadow: var(--shadow); transform: translateY(-2px);
}
.stage-material-card a { color: var(--text); display: block; }
.stage-material-card a:hover { color: var(--text); }
.stage-card-img {
    position: relative; overflow: hidden;
    aspect-ratio: 2/1; background: var(--bg);
}
.stage-card-img img {
    width: 100%; height: 100%; object-fit: cover; object-position: top;
}
.stage-card-placeholder {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 4px; color: #fff;
}
.stage-card-placeholder.stage-primary { background: linear-gradient(135deg, #5B9BD5, #4A90D9); }
.stage-card-placeholder.stage-junior { background: linear-gradient(135deg, #2ECC71, #27AE60); }
.stage-card-placeholder.stage-senior { background: linear-gradient(135deg, #E74C3C, #C0392B); }
.stage-card-placeholder.stage-exam { background: linear-gradient(135deg, #F1C40F, #F39C12); }
.placeholder-icon { font-size: 22px; }
.placeholder-text { font-size: 11px; opacity: .9; }
.stage-card-body { padding: 6px 8px; }
.stage-card-cat {
    display: inline-block; padding: 1px 6px; margin-bottom: 4px;
    border-radius: 2px; font-size: 10px; color: #fff; font-weight: 500;
    background: var(--primary); max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stage-card-title {
    font-size: 12px; font-weight: 600; margin-bottom: 3px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    color: var(--text);
}
.stage-card-desc {
    display: none;
}
.stage-card-meta {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--text-lighter); margin-top: 3px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    padding: 8px 0; font-size: 12px; color: var(--text-lighter);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 5px; }
.breadcrumb .current { color: var(--text); }

/* ===== Catalog Page ===== */
.catalog-page {
    display: flex; gap: 25px; margin-bottom: 30px;
    align-items: flex-start;
}
.catalog-page .content-main { flex: 1; min-width: 0; }
.catalog-page .sidebar { width: 300px; flex-shrink: 0; }
.catalog-header {
    padding: 20px; background: var(--bg-white); border-radius: var(--radius);
    margin-bottom: 15px; box-shadow: var(--shadow);
}
.catalog-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.catalog-title a { color: var(--primary); text-decoration: none; }
.catalog-title a:hover { text-decoration: underline; }
.catalog-desc { font-size: 13px; color: var(--text-light); }

/* 分类筛选 */
.catalog-filter {
    background: var(--bg-white); border-radius: var(--radius);
    padding: 12px 15px; margin-bottom: 15px; box-shadow: var(--shadow);
}
.filter-list { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-item {
    display: inline-block; padding: 5px 14px; border-radius: 20px;
    font-size: 13px; background: var(--bg); color: var(--text-light);
    transition: all .2s; white-space: nowrap;
}
.filter-item.active, .filter-item:hover { background: var(--primary); color: #fff; }

/* ===== Article List Items ===== */
.article-list .list-item {
    display: flex; align-items: flex-start; gap: 20px;
    border-bottom: 1px solid var(--border-light);
}
.article-list .list-item:last-child { border-bottom: none; }
.list-item-body { flex: 1; min-width: 0; }
.article-list { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow); }
.article-entry { padding: 20px; }
.article-entry:hover { background: var(--bg); }
.list-item-left { flex-shrink: 0; }
.list-item-thumb {
    width: 260px; height: 175px; border-radius: var(--radius-sm);
    overflow: hidden; background: var(--bg);
}
.list-item-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.no-thumb {
    display: flex; align-items: center; justify-content: center;
}
.no-thumb .thumb-placeholder-sm {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 30px; color: var(--text-lighter);
}
.article-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--primary); }
.article-excerpt {
    font-size: 13px; color: var(--text-light); margin-bottom: 8px;
    line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.article-cat-path {
    display: inline-block; padding: 2px 8px; margin-bottom: 8px;
    border-radius: 3px; font-size: 11px; color: #fff;
    background: var(--primary); font-weight: 500;
}
.article-meta {
    display: flex; flex-wrap: wrap; gap: 15px;
    font-size: 12px; color: var(--text-lighter);
}
.article-meta .meta-item { display: flex; align-items: center; gap: 3px; }
.meta-download { color: var(--accent); font-weight: 500; }

/* ===== Single Page ===== */
.single-page { display: flex; gap: 30px; }
.article-detail {
    background: var(--bg-white); border-radius: var(--radius);
    padding: 30px; box-shadow: var(--shadow);
}
.article-header { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); }
.article-header .article-title { font-size: 24px; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.article-meta-bar {
    display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light);
}
.article-meta-bar .meta-item {
    display: flex; align-items: center; gap: 4px; white-space: nowrap;
    padding: 3px 10px; background: var(--bg); border-radius: 4px;
    color: var(--text-light);
}
.article-meta-bar .meta-item:first-child {
    background: var(--primary); color: #fff;
    flex-shrink: 1; overflow: hidden; min-width: 0;
}
.article-meta-bar .meta-item:first-child .icon-folder { filter: brightness(0) invert(1); flex-shrink: 0; }
.article-meta-bar .meta-item:first-child a { color: #fff; white-space: nowrap; }
.article-meta-bar .meta-item:first-child a:hover { color: rgba(255,255,255,.8); }

/* 文章标签 */
.article-tags {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.article-tags-bottom {
    margin: 16px 0 0; padding-top: 16px;
    border-top: 1px solid var(--border-light);
}
.article-tags-label {
    font-size: 13px; color: var(--text-light); margin-right: 2px;
}
.article-tag {
    display: inline-block; padding: 3px 12px;
    background: #eef2ff; color: #4f46e5;
    font-size: 12px; border-radius: 20px;
    transition: all .2s;
}
.article-tag:hover {
    background: #4f46e5; color: #fff;
}

/* 标签页头部 */
.tag-header {
    padding: 16px 20px; margin-bottom: 20px;
    background: var(--bg); border-radius: var(--radius);
}
.tag-title { font-size: 20px; margin: 0 0 6px; }
.tag-count { margin: 0; font-size: 13px; color: var(--text-light); }

/* 侧边栏热门标签容器 */
.tags-content {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.tags-empty {
    font-size: 13px; color: var(--text-lighter); text-align: center; width: 100%;
}

/* ===== Download Box V11 (毛玻璃) ===== */
.dl-v11 {
    position: relative;
    border-radius: 16px; padding: 24px;
    overflow: hidden;
    margin-bottom: 25px;
}
.dl-v11::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 16px;
    z-index: 0;
}
.dl-v11 > * { position: relative; z-index: 1; }
.dl-v11 .dl-title {
    font-size: 17px; font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}
.dl-v11 .dl-sub {
    font-size: 13px; color: #64748b;
    margin-bottom: 18px;
    display: block;
}
.dl-v11 .dl-btns {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.dl-v11 .dl-btn {
    flex: 1; min-width: 140px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 20px; border-radius: 10px;
    text-decoration: none; font-size: 14px; font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all .2s;
}
.dl-v11 .dl-btn.baidu {
    background: rgba(37,99,235,.92); color: #fff;
    border: 1px solid rgba(37,99,235,.4);
}
.dl-v11 .dl-btn.baidu:hover {
    background: rgba(37,99,235,1);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
    color: #fff;
}
.dl-v11 .dl-btn.quark {
    background: rgba(234,88,12,.92); color: #fff;
    border: 1px solid rgba(234,88,12,.4);
}
.dl-v11 .dl-btn.quark:hover {
    background: rgba(234,88,12,1);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(234,88,12,.3);
    color: #fff;
}
.dl-v11 .dl-btn-icon { font-size: 18px; }
.dl-v11 .dl-note {
    margin-top: 14px;
    font-size: 12px; color: #94a3b8;
}

/* 文章底部紧凑下载条 */
.dl-bottom-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 14px 18px; margin: 24px 0 16px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.dl-bottom-bar-label {
    font-size: 14px; font-weight: 600; color: #334155; margin-right: 4px;
}
.dl-btn-sm {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 16px; border-radius: 6px;
    font-size: 13px; font-weight: 500; color: #fff;
    cursor: pointer; transition: all .2s; text-decoration: none;
}
.dl-btn-sm:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.15); color: #fff; }
.dl-btn-sm.baidu { background: #3b82f6; }
.dl-btn-sm.baidu:hover { background: #2563eb; }
.dl-btn-sm.quark { background: #ea580c; }
.dl-btn-sm.quark:hover { background: #c2410c; }
.dl-btn-sm:not(.baidu):not(.quark) { background: #6b7280; }

/* ===== Article Content ===== */
.article-content {
    font-size: 15px; line-height: 1.8; color: var(--text);
    margin-bottom: 25px;
}
.article-content a {
    color: #2B6CB0; border-bottom: 1px solid #2B6CB0;
}
.article-content a:hover {
    color: #1A4F84; border-bottom-color: #1A4F84;
}
.article-content h2 { font-size: 20px; margin: 20px 0 10px; padding-left: 10px; border-left: 4px solid var(--primary); }
.article-content h3 { font-size: 17px; margin: 18px 0 8px; }
.article-content p { margin-bottom: 12px; }
.article-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 10px 0; }
.article-content ul, .article-content ol { padding-left: 20px; margin-bottom: 12px; }
.article-content ul li { list-style: disc; margin-bottom: 4px; }
.article-content ol li { list-style: decimal; margin-bottom: 4px; }
.article-content blockquote {
    padding: 10px 20px; margin: 15px 0; background: var(--bg);
    border-left: 4px solid var(--primary); color: var(--text-light);
}
.article-content table { width: 100%; border-collapse: collapse; margin: 15px 0; }
.article-content th, .article-content td {
    padding: 8px 12px; border: 1px solid var(--border); text-align: left;
}
.article-content th { background: var(--bg); font-weight: 600; }

/* Disclaimer */
.article-disclaimer {
    padding: 12px 15px; margin-bottom: 25px;
    background: #FFF9C4; border: 1px solid #F9E79F;
    border-radius: var(--radius-sm); font-size: 12px; color: #7D6608;
}

/* ===== Article Nav ===== */
.article-nav {
    display: flex; justify-content: space-between; gap: 20px;
    padding: 15px 0; margin-bottom: 20px; border-top: 1px solid var(--border-light);
}
.nav-prev, .nav-next { flex: 1; min-width: 0; }
.nav-label { display: block; font-size: 12px; color: var(--text-lighter); margin-bottom: 4px; }
.nav-prev a, .nav-next a {
    font-size: 14px; color: var(--text); overflow: hidden;
    white-space: nowrap; text-overflow: ellipsis; display: block;
}
.nav-prev a:hover, .nav-next a:hover { color: var(--primary); }
.nav-next { text-align: right; }
.nav-none { color: var(--text-lighter); font-size: 14px; }

/* ===== Related Cards ===== */
.related-section { margin-bottom: 25px; }
.section-title-sm {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 700; margin-bottom: 15px;
}
.related-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
    display: block; background: var(--bg-white); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border-light); transition: all .3s;
}
.related-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.related-card-img {
    aspect-ratio: 4/3; overflow: hidden; background: var(--bg);
}
.related-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.related-card-plh {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e8f0fe, #d4e4fd);
    font-size: 32px; color: var(--text-lighter);
}
.related-card-body { padding: 10px 12px; }
.related-card-cat {
    display: block; font-size: 10px; color: var(--primary);
    margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.related-card-title {
    font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 6px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.related-card-date { font-size: 12px; color: var(--text-lighter); }

/* ===== Comment ===== */
.comment-section { padding-top: 20px; border-top: 1px solid var(--border-light); }

/* ===== Sidebar ===== */
.sidebar {
    width: 300px; flex-shrink: 0;
}
.sidebar-widget {
    background: var(--bg-white); border-radius: var(--radius);
    padding: 20px; margin-bottom: 15px; box-shadow: var(--shadow);
}
.widget-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 700; margin-bottom: 15px;
    padding-bottom: 10px; border-bottom: 2px solid var(--bg);
}

/* Copyright Widget */
.widget-copyright { }
.copyright-content { font-size: 13px; color: var(--text-light); line-height: 1.8; }
.copyright-content p { margin-bottom: 8px; }
.copyright-content strong { color: var(--danger); }

/* Hot List - 文字排行 */
.hot-list { }
.hot-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0; border-bottom: 1px dotted var(--border-light);
}
.hot-item:last-child { border-bottom: none; }
.hot-rank {
    width: 20px; height: 20px; line-height: 20px; text-align: center;
    border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff;
    background: #B0B8C1; flex-shrink: 0;
}
.hot-item:nth-child(1) .hot-rank { background: #FF6B6B; }
.hot-item:nth-child(2) .hot-rank { background: #FFAA5A; }
.hot-item:nth-child(3) .hot-rank { background: #FFD56B; color: #333; }
.hot-item a {
    font-size: 13px; color: var(--text); flex: 1;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.hot-item a:hover { color: var(--primary); }
.hot-views {
    font-size: 11px; color: var(--text-lighter); flex-shrink: 0;
}
.hot-views::before { content: '👁 '; }

/* Latest List */
.latest-list { }
.latest-item {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 7px 0; border-bottom: 1px dotted var(--border-light);
}
.latest-item:last-child { border-bottom: none; }
.latest-item a {
    font-size: 13px; color: var(--text); flex: 1;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.latest-item a:hover { color: var(--primary); }
.latest-cat { color: var(--primary); font-size: 11px; }
.latest-time { font-size: 11px; color: var(--text-lighter); margin-left: 8px; flex-shrink: 0; }

/* ===== Pagination ===== */
.pagination { text-align: center; padding: 25px 0; }
.pagination ul { display: inline-flex; gap: 5px; }
.pagination li { }
.pagination a, .pagination span {
    display: inline-block; padding: 7px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px; color: var(--text);
    background: var(--bg-white); transition: all .2s;
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current, .pagination .active span {
    background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center; padding: 60px 20px;
}
.empty-icon { font-size: 60px; margin-bottom: 15px; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text-lighter); }

/* ===== 404 Page ===== */
.page-404 { text-align: center; padding: 80px 20px; }
.error-icon { font-size: 80px; margin-bottom: 10px; }
.error-code { font-size: 72px; font-weight: 800; color: var(--primary); letter-spacing: 8px; }
.error-title { font-size: 24px; margin: 10px 0; }
.error-desc { color: var(--text-light); margin-bottom: 30px; font-size: 15px; }
.error-actions { display: flex; gap: 15px; justify-content: center; margin-bottom: 40px; }
.error-suggest { text-align: left; }
.error-suggest h3 { text-align: center; margin-bottom: 20px; font-size: 16px; }
.suggest-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.suggest-card {
    display: block; text-align: center; padding: 20px 15px;
    background: var(--bg-white); border-radius: var(--radius);
    box-shadow: var(--shadow); transition: all .3s;
}
.suggest-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.suggest-icon { font-size: 30px; display: block; margin-bottom: 8px; }
.suggest-card h4 { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.suggest-card p { font-size: 12px; color: var(--text-lighter); }

/* ===== Footer ===== */
.site-footer {
    background: #2C3E50; color: #BDC3C7; margin-top: 40px;
}
.footer-bottom {
    text-align: center; padding: 20px 0; font-size: 13px; color: #95A5A6;
    line-height: 2;
}
.footer-bottom a { color: #95A5A6; }
.footer-bottom a:hover { color: #ECF0F1; }
.icp { margin-left: 10px; }
.footer-desc { font-size: 12px; color: #7F8C8D; margin-top: 4px; }

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 45px; height: 45px; line-height: 45px; text-align: center;
    background: var(--primary); color: #fff; border-radius: 50%;
    cursor: pointer; font-size: 20px; opacity: 0; visibility: hidden;
    transition: all .3s; z-index: 99; box-shadow: var(--shadow);
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== Icon Placeholders (CSS-only) ===== */
.icon-home::before { content: '\2302'; }
.icon-search::before { content: '\1F50D'; }
.icon-view::before { content: '\1F441'; }
.icon-comment::before { content: '\1F4AC'; }
.icon-time::before { content: '\1F552'; }
.icon-user::before { content: '\1F464'; }
.icon-folder::before { content: '\1F4C1'; }
.icon-download::before { content: '\2B07'; }
.icon-info::before { content: '\2139'; }
.icon-top::before { content: '\2191'; font-size: 22px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .stage-grid { grid-template-columns: repeat(2, 1fr); }
    .material-grid { grid-template-columns: repeat(2, 1fr); }
    .stage-card-grid { grid-template-columns: repeat(2, 1fr); }
    .mega-dropdown { min-width: 600px; }
}

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .stage-subjects li { flex: 0 0 calc(50% - 4px); }
    .header-inner {
        display: flex; flex-wrap: wrap; flex-direction: row;
        justify-content: space-between; align-items: center; gap: 12px;
    }
    .site-logo { flex: 0 0 auto; }
    .nav-toggle { display: flex; margin-left: auto; }
    .header-search { order: 3; width: 100%; max-width: 100%; margin-top: 4px; }
    .hot-search { display: none; }

    /* 移动端隐藏桌面主导航，改用侧边面板 */
    #mainNav { display: none; }
    .mega-dropdown { display: none !important; }

    /* 移动端导航面板优化 */
    .mobile-nav-panel { width: 85%; max-width: 320px; }
    .mobile-nav-panel a { font-size: 15px; padding: 14px 20px; }
    .mobile-sub-list a { font-size: 13px; padding: 10px 30px; }
    
    .stage-grid { grid-template-columns: 1fr; }
    .home-content { flex-direction: column; }
    .material-grid { grid-template-columns: 1fr; }
    .stage-card-grid { grid-template-columns: 1fr; }
    
    .single-page { flex-direction: column; }
    .sidebar { width: 100%; }
    
    .article-detail { padding: 15px; }
    .article-header .article-title { font-size: 18px; }
    .dl-v11 { padding: 16px; }
    
    .catalog-header { padding: 15px; }
    .catalog-title { font-size: 18px; }
    
    .list-item { flex-direction: column; align-items: flex-start; }
    .article-list .list-item-left { width: 100%; }
    .list-item-thumb { width: 100%; height: 160px; }
    .article-entry { padding: 14px; }
    .article-title { font-size: 15px; }
    .article-excerpt { font-size: 12px; }
    .article-meta { gap: 10px; font-size: 11px; }
    
    .catalog-page { flex-direction: column; }
    .catalog-page .sidebar { width: 100%; }
    .related-card-grid { grid-template-columns: repeat(2, 1fr); }
    .suggest-grid { grid-template-columns: repeat(2, 1fr); }
    
    .article-meta-bar { flex-wrap: nowrap; gap: 4px; font-size: 11px; }
    .article-meta-bar .meta-item { padding: 2px 6px; font-size: 11px; white-space: nowrap; }
    .article-meta-bar .meta-item:first-child { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
    .dl-v11 { padding: 15px; }
}

@media (max-width: 480px) {
    .stage-card-grid { grid-template-columns: 1fr; }
    .suggest-grid { grid-template-columns: 1fr; }
    .related-card-grid { grid-template-columns: repeat(2, 1fr); }
    .error-code { font-size: 48px; }
}
