/* ============================================================
   悠悠影院 (amghsnh.cn) - 完整样式表
   风格: 现代深空蓝 + 琥珀金点缀 / 毛玻璃 / 渐变 / 响应式 / 暗色模式
   ============================================================ */

/* ---------- 1. Reset & 基础变量 ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 品牌色板 */
    --brand-deep: #0B1121;
    --brand-dark: #111827;
    --brand-navy: #1E293B;
    --brand-slate: #334155;
    --brand-accent: #FBBF24;        /* 琥珀金 */
    --brand-accent-rgb: 251, 191, 36;
    --brand-blue: #2563EB;
    --brand-blue-dark: #60A5FA;

    /* 亮色模式 */
    --bg-light: #F8FAFC;
    --bg-card-light: rgba(255, 255, 255, 0.75);
    --bg-card-solid-light: #FFFFFF;
    --text-primary-light: #1F2937;
    --text-secondary-light: #3E4C59;
    --text-heading-light: #111827;
    --border-light: rgba(209, 213, 219, 0.6);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.06);
    --nav-bg-light: rgba(255, 255, 255, 0.72);
    --footer-bg-light: #1F2937;
    --footer-text-light: #E5E7EB;

    /* 暗色模式 */
    --bg-dark: #0B1121;
    --bg-card-dark: rgba(30, 41, 59, 0.7);
    --bg-card-solid-dark: #1E293B;
    --text-primary-dark: #E2E8F0;
    --text-secondary-dark: #CBD5E1;
    --text-heading-dark: #FFFFFF;
    --border-dark: rgba(51, 65, 85, 0.6);
    --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.4);
    --nav-bg-dark: rgba(15, 23, 42, 0.75);
    --footer-bg-dark: #0F172A;
    --footer-text-dark: #94A3B8;

    /* 布局 */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 999px;
    --container-max: 1280px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
}

/* ---------- 2. 基础元素与排版 ---------- */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    background: var(--bg-light);
    color: var(--text-primary-light);
    transition: background-color 0.5s ease, color 0.3s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
    background: var(--bg-dark);
    color: var(--text-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-heading-light);
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: var(--text-heading-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin: 2.5rem 0 1.25rem;
    padding-bottom: 0.6rem;
    position: relative;
    display: inline-block;
}
h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-accent), rgba(var(--brand-accent-rgb), 0.2));
    border-radius: var(--radius-full);
}
h3 { font-size: 1.4rem; margin: 1.5rem 0 0.75rem; }
h4 { font-size: 1.15rem; margin: 1rem 0 0.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-primary-light);
    transition: color 0.3s ease;
}
body.dark-mode p { color: var(--text-primary-dark); }

a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, opacity 0.2s ease;
    position: relative;
}
body.dark-mode a { color: var(--brand-blue-dark); }
a:hover { color: var(--brand-accent); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; border-radius: 4px; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; }

img, svg, video { max-width: 100%; height: auto; display: block; }

::selection {
    background: rgba(var(--brand-accent-rgb), 0.3);
    color: var(--text-heading-light);
}

body.dark-mode ::selection {
    background: rgba(var(--brand-accent-rgb), 0.2);
    color: #fff;
}

/* 自定义滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.02); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--brand-slate), var(--brand-navy)); border-radius: var(--radius-full); }
body.dark-mode ::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
body.dark-mode ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--brand-slate), var(--brand-dark)); }

/* ---------- 3. 布局容器 ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
    width: 100%;
}

/* ---------- 4. 导航栏 (毛玻璃) ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg-light);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

body.dark-mode .navbar {
    background: var(--nav-bg-dark);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-heading-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
    user-select: none;
    transition: color 0.3s ease;
}
body.dark-mode .logo { color: var(--text-heading-dark); }
.logo span {
    background: linear-gradient(135deg, var(--brand-accent), #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}
.nav-links a {
    color: var(--text-primary-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0.2rem;
    position: relative;
    transition: color 0.2s ease;
}
body.dark-mode .nav-links a { color: var(--text-primary-dark); }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-accent);
    transition: width 0.3s ease;
    border-radius: var(--radius-full);
}
.nav-links a:hover { color: var(--brand-accent); }
.nav-links a:hover::after { width: 100%; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-heading-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}
body.dark-mode .mobile-menu-btn { color: var(--text-heading-dark); }
.mobile-menu-btn:hover { background: rgba(128,128,128,0.1); }

/* ---------- 5. 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--brand-blue), #1d4ed8);
    color: #fff !important;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    text-decoration: none !important;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    filter: brightness(1.05);
    color: #fff !important;
}
.btn:active { transform: translateY(-1px) scale(0.98); }

body.dark-mode .btn {
    background: linear-gradient(135deg, var(--brand-blue-dark), #3b82f6);
    color: #0B1121 !important;
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.25);
}
body.dark-mode .btn:hover { color: #0B1121 !important; }

.btn-accent {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1E293B !important;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}
.btn-accent:hover { color: #1E293B !important; box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4); }

/* ---------- 6. 卡片 (毛玻璃) ---------- */
.card, .article-card {
    background: var(--bg-card-light);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-light);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

body.dark-mode .card,
body.dark-mode .article-card {
    background: var(--bg-card-dark);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-dark);
}

.card:hover, .article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: rgba(var(--brand-accent-rgb), 0.3);
}
body.dark-mode .card:hover,
body.dark-mode .article-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* 网格布局 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

/* ---------- 7. Banner (渐变毛玻璃) ---------- */
.banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 4rem 2.5rem;
    border-radius: var(--radius-lg);
    color: #fff;
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(251,191,36,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 50%;
    height: 150%;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 60%);
    pointer-events: none;
}

body.dark-mode .banner {
    background: linear-gradient(135deg, #020617 0%, #0f172a 60%, #1e293b 100%);
    border: 1px solid rgba(255,255,255,0.05);
}

.banner h2 {
    color: #fff;
    border: none;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.banner h2::after { display: none; }
.banner p {
    color: #E2E8F0;
    font-size: 1.15rem;
    max-width: 600px;
    margin: 1.2rem auto;
}
.banner .btn {
    position: relative;
    z-index: 2;
}

/* ---------- 8. FAQ 折叠面板 ---------- */
details {
    background: var(--bg-card-light);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.9rem;
    transition: all 0.3s ease;
    overflow: hidden;
}
body.dark-mode details {
    background: var(--bg-card-dark);
    border-color: var(--border-dark);
}
details:hover { border-color: rgba(var(--brand-accent-rgb), 0.4); }
details[open] {
    border-color: rgba(var(--brand-accent-rgb), 0.5);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
body.dark-mode details[open] { box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

summary {
    font-weight: 600;
    cursor: pointer;
    color: var(--text-heading-light);
    padding: 0.8rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.2s ease;
}
body.dark-mode summary { color: var(--text-heading-dark); }
summary::-webkit-details-marker { display: none; }
summary::before {
    content: '✦';
    color: var(--brand-accent);
    font-size: 0.8rem;
    flex-shrink: 0;
}
details[open] summary::before { content: '✦'; }
details[open] summary { margin-bottom: 0.5rem; }
details[open] summary::after {
    transform: rotate(45deg);
}

/* ---------- 9. 表格 ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-card-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}
body.dark-mode table { background: var(--bg-card-dark); box-shadow: var(--shadow-dark); }

th {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #111827;
    font-weight: 600;
    text-align: left;
    padding: 14px 16px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}
body.dark-mode th { background: linear-gradient(135deg, #1e293b, #0f172a); color: #F1F5F9; }

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s ease;
}
body.dark-mode td { border-color: var(--border-dark); color: var(--text-primary-dark); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(var(--brand-accent-rgb), 0.03); }

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
    font-size: 0.9rem;
    margin: 1.75rem 0;
    color: var(--text-secondary-light);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
body.dark-mode .breadcrumb { color: var(--text-secondary-dark); }
.breadcrumb a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}
body.dark-mode .breadcrumb a { color: var(--brand-blue-dark); }
.breadcrumb a:hover { color: var(--brand-accent); text-decoration: underline; }
.breadcrumb span { opacity: 0.7; }

/* ---------- 11. 文章卡片 ---------- */
.article-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}
.article-card:hover::before { transform: scaleX(1); }
.article-card h4 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}
.article-card:hover h4 { color: var(--brand-accent); }
.article-card .date {
    font-size: 0.85rem;
    color: var(--text-secondary-light);
    font-weight: 500;
}
body.dark-mode .article-card .date { color: var(--text-secondary-dark); }
.article-card p {
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 0.5rem;
}
.article-card a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--brand-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s ease, color 0.2s ease;
}
body.dark-mode .article-card a { color: var(--brand-blue-dark); }
.article-card a:hover { gap: 0.6rem; color: var(--brand-accent); }

/* ---------- 12. 搜索框 ---------- */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card-solid-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 0.25rem 0.25rem 0.25rem 1.25rem;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
body.dark-mode .search-box { background: var(--bg-card-solid-dark); border-color: var(--border-dark); }
.search-box:focus-within {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(var(--brand-accent-rgb), 0.1);
}
.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary-light);
    width: 160px;
    font-size: 0.9rem;
    padding: 0.4rem 0;
}
body.dark-mode .search-box input { color: var(--text-primary-dark); }
.search-box input::placeholder { color: var(--text-secondary-light); opacity: 0.7; }
body.dark-mode .search-box input::placeholder { color: var(--text-secondary-dark); }
.search-box button {
    background: linear-gradient(135deg, var(--brand-accent), #f59e0b);
    border: none;
    border-radius: var(--radius-full);
    padding: 0.5rem 1.4rem;
    color: #1E293B;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}
.search-box button:hover { filter: brightness(1.1); transform: scale(1.02); }

/* ---------- 13. Footer ---------- */
.footer {
    background: var(--footer-bg-light);
    color: var(--footer-text-light);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    transition: background 0.4s ease, color 0.4s ease;
}
body.dark-mode .footer { background: var(--footer-bg-dark); color: var(--footer-text-dark); }

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-accent), var(--brand-blue), var(--brand-accent));
    background-size: 200% 100%;
    animation: gradientShift 6s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.footer a {
    color: #93C5FD;
    transition: color 0.2s ease, opacity 0.2s ease;
}
.footer a:hover { color: #fff; opacity: 0.9; }
body.dark-mode .footer a { color: #93C5FD; }
body.dark-mode .footer a:hover { color: var(--brand-accent); }

.footer h4 {
    color: #F8FAFC;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}
.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--brand-accent);
    border-radius: var(--radius-full);
}
body.dark-mode .footer h4 { color: #F1F5F9; }

.footer .grid-3 {
    gap: 2.5rem;
    margin-bottom: 1rem;
}

.footer .copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.75rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    text-align: center;
    color: var(--footer-text-light);
    opacity: 0.9;
}
body.dark-mode .footer .copyright { color: var(--footer-text-dark); border-top-color: rgba(255,255,255,0.08); }
.footer .copyright p { margin-bottom: 0.5rem; color: inherit; }

/* ---------- 14. 返回顶部按钮 ---------- */
.to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--brand-accent), #f59e0b);
    color: #1E293B;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 999;
    display: none;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
.to-top.show {
    display: block;
    opacity: 1;
}
.to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.5);
}
body.dark-mode .to-top {
    background: linear-gradient(135deg, var(--brand-blue-dark), #3b82f6);
    color: #0B1121;
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.3);
}

/* ---------- 15. 暗黑模式切换按钮 (JS生成的) ---------- */
.theme-toggle-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 999;
    background: linear-gradient(135deg, var(--brand-blue), #1d4ed8);
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle-btn:hover {
    transform: translateY(-5px) rotate(15deg);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}
body.dark-mode .theme-toggle-btn {
    background: linear-gradient(135deg, var(--brand-accent), #f59e0b);
    color: #1E293B;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.3);
}

/* ---------- 16. 滚动动画 ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 阶段性延迟 */
.fade-in.delay-1 { transition-delay: 0.1s; }
.fade-in.delay-2 { transition-delay: 0.2s; }
.fade-in.delay-3 { transition-delay: 0.3s; }

/* ---------- 17. SVG占位符 ---------- */
.svg-placeholder {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    min-height: 100px;
    transition: background 0.3s ease;
}
body.dark-mode .svg-placeholder { background: linear-gradient(135deg, #1e293b, #0f172a); }
svg text { fill: #1F2937; }
body.dark-mode svg text { fill: #E2E8F0; }

/* ---------- 18. 链接组 (友情链接等) ---------- */
.link-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: center;
}
.link-group a {
    background: var(--bg-card-solid-light);
    border: 1px solid var(--border-light);
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
body.dark-mode .link-group a {
    background: var(--bg-card-solid-dark);
    border-color: var(--border-dark);
}
.link-group a:hover {
    border-color: var(--brand-accent);
    background: rgba(var(--brand-accent-rgb), 0.1);
    transform: translateY(-2px);
}

/* ---------- 19. 标签 / 徽章 ---------- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(var(--brand-accent-rgb), 0.15);
    color: var(--brand-accent);
    border: 1px solid rgba(var(--brand-accent-rgb), 0.3);
}
body.dark-mode .badge {
    background: rgba(var(--brand-accent-rgb), 0.1);
    color: var(--brand-accent);
}

/* ---------- 20. 响应式设计 ---------- */
@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    .nav-links { gap: 1.5rem; }
    .banner { padding: 3rem 1.5rem; }
}

@media (max-width: 768px) {
    body { font-size: 15px; }
    
    .nav-container { padding: 0.5rem 1rem; }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        background: var(--bg-card-solid-light);
        padding: 1rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-light);
        margin-top: 0.5rem;
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
    body.dark-mode .nav-links { background: var(--bg-card-solid-dark); box-shadow: var(--shadow-dark); }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 0.75rem 0.5rem; border-bottom: 1px solid rgba(0,0,0,0.05); }
    body.dark-mode .nav-links a { border-bottom-color: rgba(255,255,255,0.05); }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links a::after { display: none; }
    
    .mobile-menu-btn { display: block; }
    .search-box { display: none; }
    
    .banner { padding: 2.5rem 1.25rem; margin: 1.5rem 0; }
    .banner h2 { font-size: 1.75rem; }
    
    .card, .article-card { padding: 1.25rem; }
    
    .grid-3 { grid-template-columns: 1fr; gap: 1.25rem; }
    
    .to-top, .theme-toggle-btn { bottom: 20px; right: 20px; width: 46px; height: 46px; font-size: 1.2rem; }
    .theme-toggle-btn { bottom: 80px; right: 20px; }
    
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.6rem; }
    
    .footer .grid-3 { gap: 1.5rem; }
    
    table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .logo { font-size: 1.3rem; }
    .banner { padding: 2rem 1rem; }
    .banner p { font-size: 1rem; }
    .btn { padding: 0.65rem 1.5rem; font-size: 0.95rem; }
    .breadcrumb { font-size: 0.8rem; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
}

/* ---------- 21. 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in { opacity: 1; transform: none; }
}

/* ---------- 22. 打印样式 ---------- */
@media print {
    .navbar, .footer, .to-top, .theme-toggle-btn, .search-box, .mobile-menu-btn, .breadcrumb { display: none !important; }
    body { background: #fff; color: #000; }
    .card, .article-card { box-shadow: none; border: 1px solid #ddd; background: #fff; }
    .banner { background: #f0f0f0; color: #000; }
    .banner h2, .banner p { color: #000; }
}

/* ---------- 23. 工具类 ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-3 { margin-bottom: 3rem; }
.py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.py-2 { padding-top: 2rem; padding-bottom: 2rem; }
.py-3 { padding-top: 3rem; padding-bottom: 3rem; }
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-gradient {
    background: linear-gradient(135deg, var(--brand-accent), #f59e0b, var(--brand-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}