/* ==========================================================================
   满天星漫画 · mantianxingmha.cn
   style.css — 全站样式（含暗色模式、响应式、动画）
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
    --brand: #4a6cf7;
    --brand-dark: #2b4bd8;
    --brand-light: #8fa8ff;
    --brand-soft: rgba(74, 108, 247, .08);
    --brand-soft-2: rgba(74, 108, 247, .14);

    --bg: #f8f9fc;
    --bg-elevated: #ffffff;
    --bg-muted: #f0f2f8;
    --bg-glass: rgba(255, 255, 255, .92);
    --bg-footer: #1a1a2e;

    --text: #2c2c3a;
    --text-heading: #1a1a2e;
    --text-muted: #666;
    --text-subtle: #888;
    --text-faint: #999;
    --text-invert: #b8b8cc;

    --border: rgba(0, 0, 0, .06);
    --border-soft: #eeeeee;

    --shadow-xs: 0 1px 6px rgba(0, 0, 0, .04);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .08);
    --shadow-brand: 0 8px 24px rgba(74, 108, 247, .35);
    --shadow-brand-lg: 0 4px 16px rgba(74, 108, 247, .4);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 30px;

    --header-h: 64px;
    --ease: cubic-bezier(.4, 0, .2, 1);
    --dur: .2s;
    --dur-slow: .3s;
}

/* 暗色模式令牌 */
body.dark-mode {
    --bg: #12121c;
    --bg-elevated: #1a1a2e;
    --bg-muted: #1e1e30;
    --bg-glass: rgba(18, 18, 28, .92);
    --bg-footer: #0e0e18;

    --text: #d8d8e8;
    --text-heading: #e8e8f0;
    --text-muted: #aaaaaa;
    --text-subtle: #999999;
    --text-faint: #999999;
    --text-invert: #9898b0;

    --border: rgba(255, 255, 255, .08);
    --border-soft: #2a2a40;

    --shadow-xs: 0 1px 6px rgba(0, 0, 0, .3);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);

    --brand-soft: rgba(143, 168, 255, .12);
    --brand-soft-2: rgba(143, 168, 255, .18);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    transition: background-color var(--dur-slow) ease, color var(--dur-slow) ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--brand);
    text-decoration: none;
    transition: color var(--dur) ease;
}

a:hover {
    color: var(--brand-dark);
}

body.dark-mode a {
    color: var(--brand-light);
}

body.dark-mode a:hover {
    color: #b3c4ff;
}

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

button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.35;
    font-weight: 700;
    color: var(--text-heading);
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection {
    background: var(--brand);
    color: #fff;
}

/* ---------- 布局工具 ---------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- 顶部导航（毛玻璃） ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background var(--dur-slow) ease, box-shadow var(--dur-slow) ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, .08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-heading);
    flex-shrink: 0;
    transition: transform var(--dur) ease, opacity var(--dur) ease;
}

.logo:hover {
    color: var(--text-heading);
    transform: translateY(-1px);
    opacity: .92;
}

.logo svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    transition: transform var(--dur-slow) var(--ease);
}

.logo:hover svg {
    transform: rotate(-6deg) scale(1.05);
}

/* 主导航 */
.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-links a {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-weight: 500;
    color: #3a3a4a;
    transition: background var(--dur) ease, color var(--dur) ease,
        transform var(--dur) ease;
}

body.dark-mode .nav-links a {
    color: #c0c0d0;
}

.nav-links a:hover {
    background: var(--brand-soft);
    color: var(--brand);
    transform: translateY(-1px);
}

body.dark-mode .nav-links a:hover {
    background: var(--brand-soft);
    color: var(--brand-light);
}

/* 头部操作区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-muted);
    border-radius: 20px;
    padding: 4px 6px 4px 14px;
    transition: background var(--dur) ease, box-shadow var(--dur) ease;
}

.search-box:focus-within {
    background: var(--bg-elevated);
    box-shadow: 0 0 0 2px var(--brand-soft-2);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: .88rem;
    width: 140px;
    color: inherit;
    padding: 4px 0;
    transition: width var(--dur-slow) var(--ease);
}

.search-box input:focus {
    width: 180px;
}

.search-box input::placeholder {
    color: var(--text-faint);
}

.search-box button {
    border: none;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--dur) ease, transform var(--dur) ease;
}

.search-box button:hover {
    background: var(--brand-dark);
    transform: scale(1.08);
}

.search-box button:active {
    transform: scale(.94);
}

/* 主题切换 */
.theme-toggle {
    border: none;
    background: transparent;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: background var(--dur) ease, transform var(--dur-slow) var(--ease);
}

.theme-toggle:hover {
    background: var(--brand-soft);
    transform: rotate(20deg) scale(1.06);
}

.theme-toggle:active {
    transform: rotate(0) scale(.92);
}

/* 移动菜单按钮 */
.mobile-menu-btn {
    display: none;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background var(--dur) ease;
}

.mobile-menu-btn:hover {
    background: var(--brand-soft);
}

/* ---------- 移动菜单 ---------- */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-elevated);
    z-index: 999;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: menuFadeIn .25s var(--ease);
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu.active {
    display: block;
}

.mobile-menu li {
    margin-bottom: 4px;
}

.mobile-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text);
    transition: background var(--dur) ease, color var(--dur) ease,
        padding-left var(--dur) ease;
}

.mobile-menu a:hover {
    background: var(--brand-soft);
    color: var(--brand);
    padding-left: 22px;
}

body.dark-mode .mobile-menu a:hover {
    color: var(--brand-light);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-subtle);
    padding: 16px 0;
}

.breadcrumb a {
    color: var(--brand);
    transition: opacity var(--dur) ease;
}

.breadcrumb a:hover {
    opacity: .75;
}

.breadcrumb span {
    color: var(--text-faint);
}

/* ---------- Banner 轮播 ---------- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    margin: 24px auto;
    max-width: 1200px;
    box-shadow: var(--shadow-md);
    isolation: isolate;
}

.hero-slides {
    display: flex;
    transition: transform .6s var(--ease);
    will-change: transform;
}

.hero-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 48px;
    min-height: 340px;
    position: relative;
    overflow: hidden;
}

/* 装饰光斑 */
.hero-slide::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
    pointer-events: none;
}

.hero-slide h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    line-height: 1.3;
    margin-bottom: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.01em;
}

.hero-slide p {
    font-size: 1.05rem;
    max-width: 600px;
    opacity: .9;
    margin-bottom: 24px;
    color: #fff;
}

.hero-slide .cta {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    background: var(--brand);
    color: #fff;
    align-self: flex-start;
    transition: transform var(--dur) ease, box-shadow var(--dur) ease,
        background var(--dur) ease;
}

.hero-slide .cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
    color: #fff;
    background: var(--brand-dark);
}

.hero-slide .cta:active {
    transform: translateY(0);
}

/* 轮播控制 */
.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .5);
    padding: 0;
    transition: background var(--dur) ease, transform var(--dur) ease;
}

.hero-dots button:hover {
    background: rgba(255, 255, 255, .8);
}

.hero-dots button.active {
    background: #fff;
    transform: scale(1.2);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .25);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dur) ease, transform var(--dur) ease;
    z-index: 5;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, .45);
}

.hero-arrow:active {
    transform: translateY(-50%) scale(.92);
}

.hero-arrow.prev {
    left: 16px;
}

.hero-arrow.next {
    right: 16px;
}

/* ---------- 数据统计 ---------- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 36px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.stat-item {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-slow) var(--ease),
        box-shadow var(--dur-slow) var(--ease);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

body.dark-mode .stat-number {
    color: var(--brand-light);
}

.stat-label {
    font-size: .85rem;
    color: var(--text-subtle);
    margin-top: 4px;
}

/* ---------- 通用区块 ---------- */
.section {
    margin: 56px auto;
    max-width: 1200px;
    padding: 0 20px;
    scroll-margin-top: calc(var(--header-h) + 16px);
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-heading);
    letter-spacing: -.01em;
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(to bottom, var(--brand), var(--brand-light));
}

.section-subtitle {
    font-size: .95rem;
    color: var(--text-subtle);
    margin-bottom: 28px;
    padding-left: 16px;
}

.section-title .accent {
    color: var(--brand);
}

body.dark-mode .section-title .accent {
    color: var(--brand-light);
}

/* ---------- 卡片网格 ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-slow) var(--ease),
        box-shadow var(--dur-slow) var(--ease),
        border-color var(--dur-slow) ease;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

/* 顶部渐变高光 */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-slow) var(--ease);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-soft-2);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-heading);
    transition: color var(--dur) ease;
}

.card:hover h3 {
    color: var(--brand);
}

body.dark-mode .card:hover h3 {
    color: var(--brand-light);
}

.card p {
    font-size: .9rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 12px;
}

.card p:last-of-type {
    margin-bottom: 12px;
}

.card ul {
    font-size: .9rem;
    line-height: 2;
}

.card ul a {
    transition: padding-left var(--dur) ease, color var(--dur) ease;
}

.card ul a:hover {
    padding-left: 4px;
}

.card .meta {
    font-size: .8rem;
    color: var(--text-faint);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.card .meta span {
    display: inline-flex;
    align-items: center;
}

.card .meta span + span::before {
    content: "·";
    margin-right: 12px;
    opacity: .5;
}

.card .read-more {
    font-size: .88rem;
    font-weight: 600;
    color: var(--brand);
    align-self: flex-start;
    transition: transform var(--dur) ease, color var(--dur) ease;
}

.card .read-more:hover {
    transform: translateX(4px);
}

body.dark-mode .card .read-more {
    color: var(--brand-light);
}

/* ---------- FAQ 手风琴 ---------- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--dur) ease, border-color var(--dur) ease;
    border: 1px solid transparent;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item.open {
    border-color: var(--brand-soft-2);
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    border: none;
    background: transparent;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-heading);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: background var(--dur) ease, color var(--dur) ease;
}

.faq-question:hover {
    background: var(--brand-soft);
}

.faq-item.open .faq-question {
    color: var(--brand);
}

body.dark-mode .faq-item.open .faq-question {
    color: var(--brand-light);
}

.faq-question .icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform var(--dur-slow) var(--ease), color var(--dur) ease;
    color: var(--brand);
}

body.dark-mode .faq-question .icon {
    color: var(--brand-light);
}

.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    padding: 0 20px;
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.faq-answer p {
    padding-bottom: 4px;
}

.faq-item.open .faq-answer {
    max-height: 600px;
    padding: 0 20px 18px;
}

/* ---------- HowTo 步骤 ---------- */
.howto-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.howto-step {
    display: flex;
    gap: 20px;
    position: relative;
    padding-bottom: 28px;
}

.howto-step:last-child {
    padding-bottom: 0;
}

.howto-step::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand), transparent);
}

.howto-step:last-child::before {
    display: none;
}

.howto-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: .9rem;
    box-shadow: 0 4px 12px rgba(74, 108, 247, .3);
    transition: transform var(--dur-slow) var(--ease),
        box-shadow var(--dur-slow) var(--ease);
}

.howto-step:hover .howto-step-num {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(74, 108, 247, .45);
}

.howto-step-content {
    padding-top: 6px;
}

.howto-step-content h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-heading);
}

.howto-step-content p {
    font-size: .9rem;
    color: var(--text-muted);
}

/* ---------- 表格 ---------- */
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.info-table th,
.info-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

.info-table th {
    font-weight: 600;
    color: var(--text-heading);
    width: 140px;
    white-space: nowrap;
}

.info-table td {
    color: var(--text-muted);
    word-break: break-word;
}

.info-table tr {
    transition: background var(--dur) ease;
}

.info-table tbody tr:hover,
.info-table tr:hover {
    background: var(--brand-soft);
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--brand);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-brand-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.9);
    transition: opacity var(--dur-slow) ease, visibility var(--dur-slow) ease,
        transform var(--dur-slow) var(--ease), background var(--dur) ease;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: var(--brand-dark);
    transform: translateY(-2px) scale(1.05);
}

.back-to-top:active {
    transform: translateY(0) scale(.95);
}

/* ---------- 页脚 ---------- */
.site-footer {
    background: var(--bg-footer);
    color: var(--text-invert);
    padding: 48px 0 24px;
    margin-top: 64px;
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--brand));
    opacity: .8;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.footer-col h4 {
    color: #fff;
    font-size: .95rem;
    margin-bottom: 14px;
    font-weight: 600;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

.footer-col li {
    margin-bottom: 8px;
    font-size: .85rem;
    line-height: 1.6;
}

.footer-col a {
    color: var(--text-invert);
    font-size: .85rem;
    transition: color var(--dur) ease, padding-left var(--dur) ease;
    display: inline-block;
}

.footer-col a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: 36px;
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: .8rem;
    color: #777;
    line-height: 1.7;
}

/* ---------- 滚动动画 ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
    will-change: opacity, transform;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 交错延迟（网格内卡片） */
.card-grid .fade-up:nth-child(1) {
    transition-delay: 0s;
}

.card-grid .fade-up:nth-child(2) {
    transition-delay: .06s;
}

.card-grid .fade-up:nth-child(3) {
    transition-delay: .12s;
}

.card-grid .fade-up:nth-child(4) {
    transition-delay: .18s;
}

.card-grid .fade-up:nth-child(5) {
    transition-delay: .24s;
}

.card-grid .fade-up:nth-child(6) {
    transition-delay: .3s;
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1024px) {
    .nav-links a {
        padding: 8px 10px;
        font-size: .88rem;
    }

    .search-box input {
        width: 110px;
    }

    .search-box input:focus {
        width: 140px;
    }
}

/* ---------- 响应式：移动端 ---------- */
@media (max-width: 860px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-box input {
        width: 100px;
    }

    .search-box input:focus {
        width: 120px;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-slide {
        padding: 40px 24px;
        min-height: 280px;
    }

    .hero-arrow {
        display: none;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .section {
        margin: 44px auto;
    }

    .card {
        padding: 20px;
    }

    .info-table th {
        width: 110px;
        padding: 10px 12px;
    }

    .info-table td {
        padding: 10px 12px;
    }
}

/* ---------- 响应式：小屏手机 ---------- */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .header-inner {
        height: 56px;
    }

    :root {
        --header-h: 56px;
    }

    .logo {
        font-size: 1.1rem;
        gap: 8px;
    }

    .logo svg {
        width: 28px;
        height: 28px;
    }

    .search-box {
        display: none;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 28px auto;
    }

    .stat-item {
        padding: 18px 10px;
        border-radius: var(--radius-md);
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: .78rem;
    }

    .section {
        margin: 36px auto;
    }

    .section-title {
        font-size: 1.25rem;
        padding-left: 12px;
    }

    .section-subtitle {
        padding-left: 12px;
        font-size: .88rem;
        margin-bottom: 20px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card {
        padding: 18px;
        border-radius: var(--radius-md);
    }

    .hero {
        border-radius: var(--radius-lg);
        margin: 12px auto;
    }

    .hero-slide {
        padding: 32px 20px;
        min-height: 260px;
    }

    .hero-slide h1 {
        font-size: 1.4rem;
    }

    .hero-slide p {
        font-size: .92rem;
    }

    .hero-slide .cta {
        padding: 10px 24px;
        font-size: .9rem;
    }

    .hero-dots {
        bottom: 14px;
    }

    .faq-question {
        padding: 16px;
        font-size: .9rem;
    }

    .faq-answer {
        padding: 0 16px;
        font-size: .86rem;
    }

    .faq-item.open .faq-answer {
        padding: 0 16px 16px;
    }

    .howto-step {
        gap: 14px;
        padding-bottom: 22px;
    }

    .howto-step-num {
        width: 34px;
        height: 34px;
        font-size: .82rem;
    }

    .howto-step::before {
        left: 16px;
        top: 38px;
    }

    .back-to-top {
        bottom: 18px;
        right: 18px;
        width: 40px;
        height: 40px;
    }

    .site-footer {
        padding: 36px 0 20px;
        margin-top: 48px;
    }

    .footer-grid {
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        font-size: .76rem;
    }

    .info-table {
        font-size: .84rem;
    }

    .info-table th {
        width: 88px;
        white-space: normal;
    }
}

/* ---------- 极窄屏 ---------- */
@media (max-width: 360px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1rem;
    }
}

/* ---------- 无障碍：减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-up {
        opacity: 1;
        transform: none;
    }
}

/* ---------- 高对比度模式 ---------- */
@media (prefers-contrast: more) {
    :root {
        --text-muted: #444;
        --text-subtle: #555;
        --border-soft: #ccc;
    }

    body.dark-mode {
        --text-muted: #ccc;
        --text-subtle: #bbb;
        --border-soft: #444;
    }
}

/* ---------- 打印样式 ---------- */
@media print {

    .site-header,
    .mobile-menu,
    .hero,
    .back-to-top,
    .site-footer,
    .stats-bar,
    .search-box,
    .theme-toggle,
    .mobile-menu-btn {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .faq-answer {
        max-height: none !important;
        padding: 0 20px 18px !important;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}