/* ============================================
   style.css - 前台公共样式（完整版）
   手机端：顶部汉堡+登录 | 首页Logo+搜索
   新增：汉堡按钮唤起左侧抽屉分类菜单
   最后更新：2026-08-01
   ============================================ */

:root {
    --ink: #182742;
    --ink-soft: #5a6b8c;
    --paper: #f4f6fa;
    --card: #ffffff;
    --line: #e4e9f2;
    --accent: #ff7a1f;
    --accent-deep: #e56200;
    --navy: #131f3a;
    --navy-2: #1c2c52;
    --radius: 14px;
    --radius-sm: 8px;
    --font-display: -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --shadow-sm: 0 2px 8px rgba(19,31,58,0.05);
    --shadow-md: 0 8px 24px rgba(19,31,58,0.08);
    --shadow-lg: 0 18px 38px rgba(19,31,58,0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100vh; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background-color: var(--paper);
    background-image: radial-gradient(#d9e0ec 1px, transparent 1px);
    background-size: 22px 22px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* 侧边栏打开禁止页面滚动 */
body.lock-scroll {
    overflow: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 1200px) { .container { max-width: 100%; padding: 0 16px; } }

.text-center { text-align: center; }
.text-muted { color: var(--ink-soft); }
.text-accent { color: var(--accent); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

/* ============================================
   桌面端导航栏
   ============================================ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; height: 66px; gap: 26px; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: var(--accent); display: grid; place-items: center; font-size: 17px; transform: rotate(-6deg); transition: transform 0.3s ease; }
.brand:hover .brand-mark { transform: rotate(6deg) scale(1.06); }
.brand-name { font-size: 22px; font-weight: 700; color: var(--ink); }
.brand-logo { height: 40px; display: block; width: auto; }

.site-nav { display: flex; align-items: center; flex: 1; gap: 4px; flex-wrap: wrap; }
.site-nav > a { padding: 6px 14px; color: var(--ink-soft); font-size: 14px; font-weight: 500; border-radius: var(--radius-sm); white-space: nowrap; }
.site-nav > a:hover { color: var(--ink); background: rgba(0,0,0,0.03); }
.site-nav > a.active { color: var(--ink); font-weight: 600; }
.site-nav .admin-link { color: #ef4444 !important; }
.site-nav .admin-link:hover { color: #dc2626 !important; }

.header-search { display: flex; align-items: center; background: var(--paper); border-radius: 999px; padding: 0 6px 0 16px; border: 1px solid var(--line); flex-shrink: 0; }
.header-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,31,0.1); }
.header-search input { border: none; background: transparent; padding: 8px 0; font-size: 14px; outline: none; width: 150px; font-family: inherit; color: var(--ink); }
.header-search button { border: none; background: var(--accent); color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; font-size: 14px; }
.header-actions .plain { color: var(--ink-soft); }
.header-actions .plain:hover { color: var(--ink); }
.btn-join { background: var(--accent); color: #fff; padding: 8px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 16px rgba(255,122,31,0.35); }
.btn-join:hover { background: var(--accent-deep); transform: translateY(-1px); color: #fff; }
.btn-join-outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); box-shadow: none; }
.btn-join-outline:hover { background: var(--accent); color: #fff; }

.mobile-menu-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--ink); cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); }
.mobile-menu-toggle:hover { background: var(--paper); }

/* ============================================
   移动端侧边抽屉菜单【新增核心】
   ============================================ */
/* 遮罩层 */
.menu-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.menu-mask.show {
    opacity: 1;
    visibility: visible;
}

/* 左侧分类抽屉面板 */
.mobile-side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--card);
    box-shadow: 2px 0 20px rgba(19,31,58,0.12);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 60px 0 20px;
    overflow-y: auto;
}
.mobile-side-drawer.open {
    transform: translateX(0);
}

/* 侧边栏头部关闭按钮 */
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}
.drawer-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
}
.drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 18px;
    cursor: pointer;
}
.drawer-close:hover {
    background: #fff2e6;
    color: var(--accent-deep);
}

/* 侧边栏分类列表 */
.drawer-cate-list {
    padding: 0 12px;
}
.drawer-cate-list li {
    margin-bottom: 4px;
}
.drawer-cate-list a {
    display: block;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--ink);
}
.drawer-cate-list a:hover {
    background: #fff2e6;
    color: var(--accent-deep);
}
.drawer-cate-list a.active {
    background: var(--navy);
    color: #fff;
}

/* ============================================
   手机端顶部栏（仅首页）
   ============================================ */
.mobile-topbar {
    display: none;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    padding: 0 12px;
    height: 44px;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 101;
}
.mobile-topbar .mobile-menu-toggle { display: flex; align-items: center; }
.mobile-topbar .mobile-topbar-actions { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mobile-topbar .plain { color: var(--ink-soft); text-decoration: none; font-size: 13px; }
.mobile-topbar .btn-join { padding: 4px 10px; font-size: 12px; }

/* 手机端首页Logo+搜索 */
.mobile-header {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 14px 16px 10px;
    background: #fff;
    gap: 10px;
    border-bottom: 1px solid var(--line);
}
.mobile-logo { font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; }
.mobile-search {
    display: flex; align-items: center; width: 100%;
    background: var(--paper); border-radius: 999px;
    padding: 0 6px 0 16px; border: 1px solid var(--line);
}
.mobile-search input {
    border: none; background: transparent; padding: 10px 0;
    font-size: 14px; outline: none; width: 100%; font-family: inherit; color: var(--ink);
}
.mobile-search button {
    border: none; background: var(--accent); color: #fff;
    width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}

/* ============================================
   通知栏
   ============================================ */
.announcement-bar { background: #fff3cd; color: #856404; text-align: center; padding: 8px 16px; font-size: 14px; border-bottom: 1px solid #ffc107; }
.announcement-bar i { margin-right: 8px; }

/* ============================================
   轮播图
   ============================================ */
.slider-section { padding: 24px 0 10px; }
.slider-wrapper { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 2.6/1; max-height: 420px; box-shadow: 0 12px 36px rgba(19,31,58,0.12); background: var(--navy); }
.slider-track { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); }
.slider-slide { flex: 0 0 100%; position: relative; display: block; text-decoration: none; }
.slider-slide img { width: 100%; height: 100%; object-fit: contain; background: var(--navy); }
.slider-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: rgba(255,255,255,0.3); font-size: 60px; }
.slider-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 40px 30px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #fff; z-index: 2; pointer-events: none; }
.slider-cat { display: inline-block; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.slider-info h3 { font-size: 24px; font-weight: 700; margin-bottom: 6px; color: #fff; }
.slider-info p { font-size: 14px; color: rgba(255,255,255,0.9); max-width: 500px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,0.9); color: var(--ink); font-size: 16px; cursor: pointer; z-index: 5; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,0.1); opacity: 0; }
.slider-wrapper:hover .slider-arrow { opacity: 1; }
.slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.slider-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; }
.slider-dot.active { background: #fff; width: 24px; border-radius: 999px; }

/* ============================================
   分类导航（移动端隐藏，移入侧边栏）
   ============================================ */
.cat-wrap { margin-top: 20px; position: relative; z-index: 5; }
.cat-bar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 8px; box-shadow: 0 12px 32px rgba(19,31,58,0.08); }
.cat-chip { padding: 7px 17px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.cat-chip i { margin-right: 6px; }
.cat-chip:hover { background: #fff2e6; color: var(--accent-deep); }
.cat-chip.active { background: var(--navy); color: #fff; font-weight: 600; }

/* ============================================
   统计条
   ============================================ */
.stats-bar { display: flex; gap: 0; margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.stats-item { flex: 1; display: flex; align-items: center; gap: 14px; padding: 20px 24px; }
.stats-item + .stats-item { border-left: 1px solid var(--line); }
.stats-icon { width: 46px; height: 46px; border-radius: 12px; background: #fff2e6; color: var(--accent); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.stats-info strong { display: block; font-size: 26px; font-weight: 700; color: var(--ink); }
.stats-info span { font-size: 12px; color: var(--ink-soft); }
.stats-welcome { background: linear-gradient(135deg, #fff7ed, #fff2e6); }
.stats-welcome .stats-icon { background: var(--accent); color: #fff; }
.stats-welcome-text { font-size: 15px !important; font-weight: 600 !important; color: var(--accent-deep) !important; }

/* ============================================
   最新更新
   ============================================ */
.latest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.latest-col { display: flex; flex-direction: column; }
.latest-col:first-child { border-right: 1px solid var(--line); }
.latest-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; text-decoration: none; border-bottom: 1px solid var(--line); gap: 16px; }
.latest-item:last-child { border-bottom: none; }
.latest-item:hover { background: #fafbfd; }
.latest-title { display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }
.latest-dot { color: var(--accent); flex-shrink: 0; }
.latest-name { font-size: 14px; font-weight: 500; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.latest-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; white-space: nowrap; }
.latest-cat { font-size: 12px; color: var(--accent-deep); background: #fff2e6; padding: 2px 10px; border-radius: 999px; }
.latest-date { font-size: 12px; color: var(--ink-soft); }

/* ============================================
   区块标题
   ============================================ */
.section-head { display: flex; align-items: baseline; gap: 14px; margin: 46px 0 20px; }
.section-head h2 { font-weight: 700; font-size: 26px; display: flex; align-items: center; gap: 10px; }
.section-head h2 i { color: var(--accent); font-size: 20px; }
.section-head .count { color: var(--ink-soft); font-size: 14px; }
.section-head .section-sub { color: var(--ink-soft); font-size: 14px; margin-left: auto; }

/* ============================================
   资源卡片
   ============================================ */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px; }
.res-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: all 0.3s; }
.res-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #ffd9b8; }
.res-cover { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: #eef2f8; text-decoration: none; }
.res-cover img { width: 100%; height: 100%; object-fit: contain; background: #eef2f8; transition: transform 0.4s ease; }
.res-card:hover .res-cover img { transform: scale(1.06); }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #e8edf6, #f7f9fd); color: #b6c3da; font-size: 40px; }
.flag { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 999px; }
.res-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.res-cat { font-size: 12px; color: var(--accent-deep); font-weight: 600; margin-bottom: 7px; }
.res-body h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.res-body h3 a { color: var(--ink); }
.res-body h3 a:hover { color: var(--accent-deep); }
.res-body p { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 14px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-meta { display: flex; gap: 15px; font-size: 12px; color: #93a1bd; border-top: 1px dashed var(--line); padding-top: 12px; }
.res-meta i { margin-right: 4px; width: 14px; }

/* ============================================
   详情页
   ============================================ */
.detail-container { padding: 30px 20px; }
.breadcrumb { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.detail-card { display: grid; grid-template-columns: 1fr 1.8fr; gap: 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-md); }
.detail-cover img { width: 100%; border-radius: var(--radius); object-fit: contain; background: #f0f2f6; border: 1px solid var(--line); }
.detail-category { font-size: 14px; color: var(--accent-deep); font-weight: 600; margin-bottom: 10px; }
.detail-info h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.detail-meta { display: flex; gap: 20px; font-size: 14px; color: var(--ink-soft); padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 12px 0 18px; flex-wrap: wrap; }
.detail-description h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.detail-description .content { font-size: 15px; line-height: 1.8; color: var(--ink-soft); }
.detail-description .content p { margin-bottom: 12px; }
.detail-description .content ul, .detail-description .content ol { padding-left: 24px; margin-bottom: 12px; }
.detail-description .content blockquote { border-left: 4px solid var(--accent); padding: 12px 16px; margin: 12px 0; background: var(--paper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.detail-actions { margin-top: 24px; }
.btn-download { display: inline-block; background: var(--accent); color: #fff; padding: 14px 40px; border-radius: 999px; font-size: 18px; font-weight: 600; box-shadow: 0 8px 24px rgba(255,122,31,0.4); }
.btn-download:hover { background: var(--accent-deep); transform: translateY(-2px); color: #fff; }
.detail-nav { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-back { display: inline-block; padding: 10px 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-soft); transition: all 0.2s; }
.btn-back:hover { background: var(--paper); color: var(--ink); border-color: var(--accent); }
.detail-related { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.detail-related h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.related-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; text-decoration: none; transition: all 0.3s; }
.related-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.related-item img { width: 100%; height: 120px; object-fit: contain; background: #f0f2f6; }
.related-info { padding: 10px 12px; }
.related-cat { font-size: 11px; color: var(--accent-deep); font-weight: 500; }
.related-title { font-size: 14px; color: var(--ink); display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================
   空状态 / 分页 / 页脚
   ============================================ */
.empty { text-align: center; padding: 70px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); font-size: 15px; }
.empty i { font-size: 44px; color: #c9d4e6; display: block; margin-bottom: 14px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 38px 0 10px; flex-wrap: wrap; }
.page-item .page-link { display: block; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--ink-soft); font-size: 14px; }
.page-item .page-link:hover { border-color: var(--accent); color: var(--accent-deep); }
.page-item.active .page-link { background: var(--navy); border-color: var(--navy); color: #fff; }
.page-item.disabled .page-link { opacity: 0.4; pointer-events: none; }
.footer-wrap { background: var(--navy); margin-top: 74px; }
.site-footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 48px 0 30px; }
.footer-top { display: flex; justify-content: space-between; gap: 34px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-desc { max-width: 440px; font-size: 14px; line-height: 1.8; margin-top: 12px; color: rgba(255,255,255,0.5); }
.footer-nav { display: flex; gap: 26px 40px; flex-wrap: wrap; }
.footer-nav-column { display: flex; flex-direction: column; gap: 6px; }
.footer-nav-column h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.footer-nav a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom { padding-top: 24px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.42); }

/* ============================================
   登录/注册
   ============================================ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 24px; }
.auth-container { width: 100%; max-width: 420px; }
.auth-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 40px; box-shadow: 0 20px 60px rgba(19,31,58,0.1); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: var(--accent); display: grid; place-items: center; font-size: 17px; }
.auth-logo .logo-text { font-size: 22px; color: var(--ink); }
.auth-box h2 { text-align: center; font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--ink-soft); font-size: 14px; margin-bottom: 24px; }
.auth-error { background: #fee2e2; color: #991b1b; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; border: 1px solid #fecaca; }
.auth-success { background: #d1fae5; color: #065f46; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; border: 1px solid #a7f3d0; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-group input { width: 100%; padding: 12px 16px; border: 2px solid var(--line); border-radius: 10px; font-size: 15px; font-family: inherit; outline: none; background: var(--paper); }
.form-group input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(255,122,31,0.1); }
.btn-auth { width: 100%; padding: 13px; background: var(--navy); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-auth:hover { background: #2d3f5e; }
.auth-link { text-align: center; margin-top: 22px; font-size: 14px; color: var(--ink-soft); }
.auth-link a { color: var(--accent-deep); font-weight: 600; }

/* ============================================
   动画
   ============================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; border: none; font-size: 18px; cursor: pointer; box-shadow: 0 4px 16px rgba(255,122,31,0.4); display: none; align-items: center; justify-content: center; z-index: 999; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(255,122,31,0.5); }
.back-to-top.visible { display: flex; }

/* ============================================
   响应式 - 平板
   ============================================ */
@media (max-width: 992px) {
    .site-nav:not(.open) { display: none; }
    .site-nav.open { display: flex; flex-direction: column; padding: 12px 0; gap: 2px; }

    .site-nav > a { padding: 10px 14px; }
    .mobile-menu-toggle { display: block; }
    .slider-wrapper { aspect-ratio: 16/9; max-height: 300px; }
    .slider-info { padding: 40px 20px 20px; }
    .slider-info h3 { font-size: 20px; }
    .slider-info p { font-size: 13px; }
    .stats-bar { flex-direction: column; }
    .stats-item + .stats-item { border-left: none; border-top: 1px solid var(--line); }
    .latest-grid { grid-template-columns: 1fr; }
    .latest-col:first-child { border-right: none; }
    .detail-card { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
    .detail-cover { max-width: 400px; margin: 0 auto; }
    .footer-top { flex-direction: column; gap: 24px; }
}

/* ============================================
   响应式 - 手机
   ============================================ */
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    
    /* 隐藏桌面端header，显示手机端topbar */
    .desktop-header, .site-header { display: none; }
    .mobile-topbar { display: flex; }
    .mobile-header { display: flex; }
    .mobile-menu-toggle { display: flex; }

    /* 移动端隐藏页面横向分类栏，统一放侧边抽屉 */
    .cat-wrap { display: none; }
    
    /* 轮播图 */
    .slider-wrapper { aspect-ratio: auto; max-height: 220px; border-radius: var(--radius-sm); }
    .slider-slide img { width: 100%; height: 100%; object-fit: contain; background: var(--navy); }
    .slider-info { display: block !important; padding: 20px 14px 14px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); }
    .slider-info h3 { font-size: 15px; color: #fff !important; }
    .slider-info p { display: block !important; font-size: 12px; color: rgba(255,255,255,0.85) !important; }
    .slider-cat { font-size: 10px; padding: 2px 8px; margin-bottom: 4px; }
    .slider-arrow { width: 30px; height: 30px; font-size: 10px; opacity: 1; }
    .slider-dots { bottom: 8px; gap: 5px; }
    .slider-dot { width: 5px; height: 5px; }
    .slider-dot.active { width: 16px; }
    
    .stats-item { padding: 12px 14px; }
    .stats-icon { width: 34px; height: 34px; font-size: 14px; }
    .stats-info strong { font-size: 18px; }
    .section-head { margin: 24px 0 14px; }
    .section-head h2 { font-size: 20px; }
    .latest-item { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 14px; }
    .latest-meta { width: 100%; justify-content: flex-start; }
    .latest-name { font-size: 13px; }
    .res-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .res-body { padding: 12px 14px; }
    .res-body h3 { font-size: 14px; }
    .res-body p { font-size: 12px; -webkit-line-clamp: 1; }
    .res-meta { font-size: 11px; gap: 8px; padding-top: 8px; }
    .detail-card { padding: 16px; gap: 16px; }
    .detail-info h1 { font-size: 22px; }
    .btn-download { display: block; text-align: center; padding: 12px 20px; font-size: 16px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .auth-box { padding: 32px 24px; }
}

/* ============================================
   响应式 - 小屏手机
   ============================================ */
@media (max-width: 480px) {
    .brand-name { font-size: 16px; }
    .brand-logo { height: 28px; }
    .btn-join { padding: 4px 10px; font-size: 11px; }
    
    .slider-wrapper { max-height: 180px; }
    .slider-info { padding: 14px 10px 10px; }
    .slider-info h3 { font-size: 13px; }
    .slider-info p { font-size: 11px; }
    .slider-arrow { width: 24px; height: 24px; font-size: 8px; }
    
    .stats-item { padding: 10px 12px; gap: 8px; }
    .stats-icon { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
    .stats-info strong { font-size: 16px; }
    .stats-info span { font-size: 11px; }
    .res-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .section-head { margin: 20px 0 12px; }
    .section-head h2 { font-size: 18px; }
    .detail-meta { font-size: 12px; gap: 8px; }
    .detail-meta span { width: 100%; }
    .related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .auth-box { padding: 24px 16px; }
    .footer-wrap { margin-top: 40px; }
    
    .mobile-logo { font-size: 18px; }
    .mobile-search input { font-size: 13px; padding: 8px 0; }
    .mobile-search button { width: 30px; height: 30px; font-size: 12px; }
}

/* ============================================
   桌面端显示
   ============================================ */
@media (min-width: 769px) {
    .mobile-topbar { display: none !important; }
    .mobile-header { display: none !important; }
}

@media print {
    .site-header, .mobile-topbar, .mobile-header, .slider-section, .cat-wrap, .stats-bar, .footer-wrap, .back-to-top, .detail-nav, .detail-actions,
    .mobile-side-drawer, .menu-mask { display: none !important; }
    .container { max-width: 100% !important; padding: 0 !important; }
    .detail-card { box-shadow: none !important; border: 1px solid #ddd !important; padding: 20px !important; }
    body { background: #fff !important; }
}

/* ========== 移动端打开菜单内链接样式优化 ========== */
#siteNav.open a {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 12px !important;
    font-size: 16px;
    border-radius: 8px;
    margin: 6px 0;
    text-align: left;
}
#siteNav.open a:hover {
    background-color: #fff2e6;
    color: var(--accent-deep);
}
/* ============================================
   🆕 移动端字体和触摸目标优化（SEO + UX）
   ============================================ */

/* 1. 移动端基础字体最小14px */
@media (max-width: 768px) {
    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    /* 所有文本最小14px */
    p, span, div, a, li, td, th, label {
        font-size: inherit;
    }
    
    /* 禁止小于12px的文本 */
    .slider-cat,
    .latest-cat,
    .latest-date,
    .res-cat,
    .res-meta,
    .related-cat,
    .stats-info span {
        font-size: 14px !important;
    }
    
    /* 描述文字 */
    .slider-info p,
    .res-body p,
    .latest-name {
        font-size: 15px !important;
    }
    
    /* 统计信息 */
    .stats-info strong {
        font-size: 20px !important;
    }
    .stats-info span {
        font-size: 14px !important;
    }
    
    /* 按钮文字 */
    .btn-download,
    .btn-back,
    .pager-btn,
    .cat-chip,
    .btn-auth {
        font-size: 16px !important;
    }
    
    /* 注册按钮 */
    .btn-join {
        font-size: 14px !important;
    }
}

/* 2. 触摸目标最小48px */
@media (max-width: 768px) {
    /* 导航链接 */
    .site-nav a,
    #simpleNav a,
    .drawer-cate-list a {
        min-height: 48px !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* 分类标签 */
    .cat-chip {
        min-height: 48px !important;
        padding: 12px 18px !important;
        font-size: 15px !important;
        margin: 4px !important;
        display: inline-flex !important;
        align-items: center !important;
    }
    
    /* 下载按钮 */
    .btn-download {
        min-height: 52px !important;
        min-width: 200px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 14px 32px !important;
        font-size: 17px !important;
    }
    
    /* 返回按钮 */
    .btn-back {
        min-height: 48px !important;
        min-width: 120px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 搜索按钮 */
    .header-search button,
    .mobile-search button {
        min-width: 48px !important;
        min-height: 48px !important;
        width: 48px !important;
        height: 48px !important;
    }
    
    /* 搜索输入框 */
    .header-search input,
    .mobile-search input {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 0 !important;
    }
    
    /* 汉堡菜单按钮 */
    .mobile-menu-toggle {
        min-width: 48px !important;
        min-height: 48px !important;
        font-size: 28px !important;
        padding: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 关闭按钮 */
    .drawer-close {
        min-width: 48px !important;
        min-height: 48px !important;
        font-size: 22px !important;
    }
    
    /* 轮播图箭头 */
    .slider-arrow {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 18px !important;
    }
    
    /* 轮播图圆点 */
    .slider-dot {
        min-width: 12px !important;
        min-height: 12px !important;
    }
    
    /* 最新更新条目 */
    .latest-item {
        min-height: 48px !important;
        padding: 14px 16px !important;
    }
    
    /* 资源卡片链接 */
    .res-card a,
    .res-cover {
        min-height: 48px !important;
    }
    
    /* 相关推荐 */
    .related-item {
        min-height: 48px !important;
    }
    
    /* 分页按钮 */
    .pager-btn {
        min-height: 48px !important;
        padding: 14px 24px !important;
        font-size: 16px !important;
    }
    
    /* 登录注册按钮 */
    .btn-auth {
        min-height: 52px !important;
        font-size: 16px !important;
        padding: 14px !important;
    }
    
    /* 表单输入框 */
    .form-group input {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 16px !important;
    }
    
    /* 返回顶部按钮 */
    .back-to-top,
    #backToTop {
        min-width: 48px !important;
        min-height: 48px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 22px !important;
    }
    
    /* 弹窗按钮 */
    .btn-login,
    .btn-register,
    .btn-logout {
        min-height: 48px !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
    }
}

/* 3. 按钮间距优化 */
@media (max-width: 768px) {
    .detail-actions {
        gap: 16px !important;
    }
    
    .detail-nav {
        gap: 12px !important;
    }
    
    .header-actions {
        gap: 12px !important;
    }
    
    .btn-download + .download-hint {
        margin-top: 12px !important;
    }
}

/* 4. 增强可点击反馈 */
@media (max-width: 768px) {
    a, button, .clickable, [role="button"] {
        cursor: pointer !important;
        -webkit-tap-highlight-color: rgba(255, 122, 31, 0.15) !important;
        touch-action: manipulation !important;
    }
    
    a:active, button:active {
        opacity: 0.75 !important;
        transform: scale(0.97) !important;
        transition: all 0.1s ease !important;
    }
}

/* 5. 防止iOS字体缩放 */
* {
    -webkit-text-size-adjust: 100% !important;
}

/* 6. 小屏手机额外优化 */
@media (max-width: 480px) {
    /* 确保极小屏也能看清 */
    .slider-cat {
        font-size: 13px !important;
    }
    
    .res-cat,
    .latest-cat {
        font-size: 13px !important;
    }
    
    .stats-info span {
        font-size: 13px !important;
    }
    
    /* 注册按钮 */
    .btn-join {
        font-size: 13px !important;
        padding: 8px 14px !important;
        min-height: 40px !important;
    }
    
    /* 移动端Logo */
    .mobile-logo {
        font-size: 20px !important;
    }
}