/* ============================================================
   全新主题样式 · 二次元清新轻拟感 + 少量赛博极客
   设计：浅色=白天(白→浅天蓝) / 深色=夜晚(深淡粉→深淡紫+电蓝辉光)
   导航栏按需求原样保留（#navbar 作用域内还原原始变量）
   本文件从零设计，不基于旧 css 修改
   ============================================================ */

/* ========== 全局变量与重置 ========== */
:root {
    /* 浅色（白天） */
    --bg-primary: #e9f4ff;
    --bg-secondary: rgba(255, 255, 255, 0.6);
    --bg-card: #eef6ff;
    --text-primary: #23425e;
    --text-secondary: #4f6f8c;
    --text-muted: #7d97ad;
    --accent: #38bdf8;                /* 亮青蓝 */
    --accent-glow: rgba(56, 189, 248, 0.4);
    --accent-secondary: #7fe3ff;
    --border: rgba(56, 189, 248, 0.18);
    --card-border: rgba(56, 189, 248, 0.28);
    --neu-edge: rgba(95, 184, 230, 0.85);

    /* 软拟物阴影（浅色） */
    --shadow-sm: 0 2px 10px rgba(140, 170, 205, 0.22);
    --shadow-md: 0 10px 30px rgba(140, 170, 205, 0.28);
    --shadow-lg: 0 22px 55px rgba(140, 170, 205, 0.34);
    --shadow-glow: 0 0 36px rgba(56, 189, 248, 0.4);
    --shadow-neu: 7px 7px 18px rgba(140, 170, 205, 0.55), -7px -7px 18px rgba(255, 255, 255, 0.95);
    --shadow-neu-hover: 11px 11px 24px rgba(140, 170, 205, 0.65), -9px -9px 20px rgba(255, 255, 255, 1);

    --hero-bg: linear-gradient(150deg, #eaf6ff 0%, #dcefff 30%, #f2fbff 60%, #e8f6ff 100%);
    --hero-text: #16324b;
    --hero-subtitle: #2c79ad;
    --hero-desc: #3f5d77;
    --hero-cta-bg: rgba(56, 189, 248, 0.12);
    --hero-cta-border: rgba(56, 189, 248, 0.35);
    --hero-cta-text: #1577ad;
    --scroll-indicator-color: #5f93b8;

    --nav-blur: blur(20px) saturate(180%);
    --bg-nav: rgba(238, 245, 252, 0.26);
    --card-blur: blur(14px);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-xl: 48px;

    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    --font-h1: 'Georgia', 'Noto Serif SC', 'STSong', 'Songti SC', serif;
    --font-heading: 'LXGW WenKai Screen', 'Georgia', 'Noto Serif SC', 'STSong', 'Songti SC', serif;
    --font-body: 'LXGW WenKai Screen', 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Heiti SC', sans-serif;
    --font-note: 'LXGW WenKai Screen', 'Comic Sans MS', cursive;
    --font-mono: ui-monospace, 'Sarasa Mono SC', 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;

    --max-width: 1300px;
}

[data-theme="dark"] {
    /* 深色（夜晚：深淡粉 → 深淡紫 + 赛博电蓝） */
    --bg-primary: #202840;
    --bg-secondary: rgba(44, 52, 82, 0.6);
    --bg-card: #2b2c46;
    --text-primary: #eaf1ff;
    --text-secondary: #b9c7e8;
    --text-muted: #8b94c2;
    --accent: #4cc9ff;                /* 电光蓝 */
    --accent-glow: rgba(76, 201, 255, 0.55);
    --accent-secondary: #7fe3ff;
    --border: rgba(150, 130, 200, 0.2);
    --card-border: rgba(150, 130, 200, 0.32);
    --neu-edge: rgba(165, 135, 205, 0.42);

    --shadow-sm: 0 2px 10px rgba(12, 6, 20, 0.5);
    --shadow-md: 0 10px 30px rgba(12, 6, 20, 0.55), 0 0 22px rgba(76, 201, 255, 0.12);
    --shadow-lg: 0 22px 55px rgba(12, 6, 20, 0.65), 0 0 34px rgba(76, 201, 255, 0.2);
    --shadow-glow: 0 0 42px rgba(76, 201, 255, 0.55);
    --shadow-neu: 7px 7px 18px rgba(12, 6, 20, 0.6), -7px -7px 18px rgba(70, 52, 92, 0.28);
    --shadow-neu-hover: 11px 11px 24px rgba(12, 6, 20, 0.7), -9px -9px 20px rgba(82, 62, 108, 0.32);

    --hero-bg: linear-gradient(150deg, #1f2942 0%, #242440 40%, #231c3c 70%, #2a2348 100%);
    --hero-text: #eef3ff;
    --hero-subtitle: #8fb6e8;
    --hero-desc: #aab6dd;
    --hero-cta-bg: rgba(76, 201, 255, 0.12);
    --hero-cta-border: rgba(76, 201, 255, 0.4);
    --hero-cta-text: #7fe3ff;
    --scroll-indicator-color: #aebbe6;

    --nav-blur: blur(20px) saturate(180%);
    --bg-nav: rgba(12, 28, 48, 0.14);
    --card-blur: blur(16px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

a { text-decoration: none; color: inherit; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    background-image: linear-gradient(180deg, #ffffff 0%, #e9f5ff 50%, #dcefff 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
[data-theme="dark"] body {
    background-image: linear-gradient(180deg, #202840 0%, #242440 50%, #2c2348 100%);
}

body.loading-locked { overflow: hidden; height: 100vh; }
body.loading-locked #live2dcanvas { visibility: hidden !important; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ============ 流动形状背景画布（治愈系） ============ */
#flowCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============ 星空粒子 Canvas ============ */
#particleCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.72;
    transition: opacity var(--transition-smooth);
}
[data-theme="dark"] #particleCanvas { opacity: 0.75; }

/* ============ 加载页（战术 HUD · 来自 deepseek 参考） ============ */
#loadingOverlay {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color: var(--lk-text);
    background:
        radial-gradient(ellipse at 50% 60%, var(--lk-accent-soft), transparent 55%),
        linear-gradient(180deg, var(--lk-bg1) 0%, var(--lk-bg2) 100%);
    transition: opacity 0.55s ease, visibility 0.55s ease;
}
#loadingOverlay {
    --lk-bg1:#05080f; --lk-bg2:#080d18;
    --lk-panel: rgba(10,18,30,0.72);
    --lk-border:#0d1a2b; --lk-border-accent:#1a3a5c;
    --lk-accent:#00d4ff; --lk-accent-bright:#66e0ff;
    --lk-accent-dim: rgba(0,212,255,0.3); --lk-accent-soft: rgba(0,212,255,0.15);
    --lk-text:#c8dbe8; --lk-text-2:#6a8fa8; --lk-text-mute:#2a4a60;
    /* 兼容 deepseek 命名（自动跟随主题） */
    --bg-panel: var(--lk-panel);
    --border-accent: var(--lk-border-accent);
    --border-active: var(--lk-accent);
    --text-primary: var(--lk-text);
    --text-secondary: var(--lk-text-2);
    --text-muted: var(--lk-text-mute);
    --accent: var(--lk-accent);
    --accent-bright: var(--lk-accent-bright);
    --accent-dim: var(--lk-accent-dim);
    --accent-glow: var(--lk-accent-soft);
    --accent-strong: var(--lk-accent-dim);
}
[data-theme="light"] #loadingOverlay {
    color: var(--lk-text);
    --lk-bg1:#e9eef5; --lk-bg2:#dbe6f1;
    --lk-panel: rgba(255,255,255,0.78);
    --lk-border:#9fb6c7; --lk-border-accent:#4a7ea3;
    --lk-accent:#0090c8; --lk-accent-bright:#0a9fd6;
    --lk-accent-dim: rgba(0,144,200,0.28); --lk-accent-soft: rgba(0,144,200,0.12);
    --lk-text:#0d2433; --lk-text-2:#3d5a6e; --lk-text-mute:#6b8294;
}
#loadingOverlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---- 动态背景层 ---- */
#loaderBg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bg-grid-overlay {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background-image:
        linear-gradient(rgba(0,180,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,180,255,0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: lkGridPulse 4s ease-in-out infinite;
}
@keyframes lkGridPulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }
.bg-glow {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 60%, rgba(0,120,255,0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 20%, rgba(0,200,255,0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(0,100,200,0.07) 0%, transparent 45%);
    animation: lkGlowBreathe 6s ease-in-out infinite;
}
@keyframes lkGlowBreathe { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
.scanline-overlay {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,212,255,0.012) 3px, rgba(0,212,255,0.012) 5px);
    animation: lkScanMove 6s linear infinite;
}
@keyframes lkScanMove { 0% { background-position-y: 0; } 100% { background-position-y: 60px; } }
.scan-beam {
    position: absolute; left: 0; right: 0; height: 120px; z-index: 2; pointer-events: none; top: -15%;
    background: linear-gradient(180deg, transparent, rgba(0,180,255,0.05), rgba(0,212,255,0.10), rgba(0,180,255,0.05), transparent);
    animation: lkBeamSweep 7s ease-in-out infinite; opacity: 0.7;
}
@keyframes lkBeamSweep {
    0% { top: -15%; opacity: 0.3; }
    25% { opacity: 0.8; }
    50% { top: 110%; opacity: 0.2; }
    75% { opacity: 0.6; }
    100% { top: -15%; opacity: 0.3; }
}
.loading-container { position: relative; z-index: 10; }

/* 加载卡片（来自 deepseek 参考，元素 id 保留给 JS 驱动） */
.loading-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 3.5rem 4.5rem;
    min-width: min(92vw, 500px); max-width: 580px;
    background: var(--bg-panel);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 2px;
    box-shadow: 0 0 60px rgba(0,180,255,0.05), 0 0 120px rgba(0,120,255,0.03), inset 0 0 40px rgba(0,100,200,0.02);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.6,0,0.2,1), visibility 0.7s;
}
.loading-container::before {
    content: ''; position: absolute; inset: -1px; border-radius: 2px; pointer-events: none;
    background: linear-gradient(135deg, var(--accent-dim), transparent 30%, transparent 70%, var(--accent-dim));
    opacity: 0.6;
}
.corner-frame { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.corner-frame .corner {
    position: absolute; width: 32px; height: 32px;
    border-color: var(--border-accent); border-style: solid; border-width: 0; opacity: 0.8;
    transition: all 0.5s ease;
}
.corner-frame .corner::after {
    content: ''; position: absolute; width: 3px; height: 3px; background: var(--accent); border-radius: 50%;
    opacity: 0.5; animation: lkCornerDot 2s ease-in-out infinite;
}
@keyframes lkCornerDot { 0%,100% { opacity: 0.3; box-shadow: 0 0 2px var(--accent); } 50% { opacity: 0.9; box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent); } }
.corner.tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner.tl::after { top: 5px; left: 5px; }
.corner.tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner.tr::after { top: 5px; right: 5px; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner.bl::after { bottom: 5px; left: 5px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.corner.br::after { bottom: 5px; right: 5px; }

.inner-border { position: absolute; inset: 14px; border: 1px solid rgba(0,180,255,0.06); pointer-events: none; transition: border-color 0.5s ease; z-index: 1; }

.top-line, .bottom-line {
    position: absolute; left: 28px; right: 28px; height: 1px; pointer-events: none; opacity: 0.6; z-index: 1;
    background: linear-gradient(90deg, transparent, var(--border-accent), var(--accent-dim), var(--border-accent), transparent);
}
.top-line { top: 14px; } .bottom-line { bottom: 14px; }
.side-line-left, .side-line-right {
    position: absolute; top: 50%; transform: translateY(-50%); width: 24px; height: 1px; pointer-events: none; opacity: 0.4; z-index: 1;
}
.side-line-left { left: 10px; background: linear-gradient(90deg, var(--accent-dim), transparent); }
.side-line-right { right: 10px; background: linear-gradient(-90deg, var(--accent-dim), transparent); }

.top-label, .bottom-label {
    position: absolute; left: 50%; transform: translateX(-50%);
    font-size: 9px; letter-spacing: 3px; text-transform: uppercase; white-space: nowrap; z-index: 3; font-weight: 300;
}
.top-label { top: -9px; color: var(--accent-dim); background: var(--lk-bg1); padding: 0 12px; text-shadow: 0 0 8px var(--accent-glow); }
.bottom-label { bottom: -8px; color: var(--text-muted); background: var(--lk-bg1); padding: 0 10px; }

/* 中央图标：旋转环 + 菱形 + 脉冲点 */
.icon-area { position: relative; width: 76px; height: 76px; margin-bottom: 34px; display: flex; align-items: center; justify-content: center; z-index: 2; }
.rotating-ring { position: absolute; width: 62px; height: 62px; border: 1px dashed rgba(0,200,255,0.25); border-radius: 50%; animation: lkRingSpin 5s linear infinite; }
.rotating-ring::after { content: ''; position: absolute; top: -3px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent-glow); }
@keyframes lkRingSpin { to { transform: rotate(360deg); } }
.rotating-diamond { position: absolute; width: 38px; height: 38px; border: 1.5px solid var(--accent-dim); transform: rotate(45deg); animation: lkDiamondSpin 4s cubic-bezier(.65,0,.35,1) infinite; opacity: 0.8; }
.rotating-diamond::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(0,212,255,0.3); }
.rotating-diamond::before { content: ''; position: absolute; inset: 12px; background: rgba(0,180,255,0.15); border-radius: 1px; }
@keyframes lkDiamondSpin { 0% { transform: rotate(45deg); opacity: 0.7; } 25% { opacity: 0.95; border-color: var(--accent); } 50% { transform: rotate(225deg); opacity: 0.5; } 75% { opacity: 0.9; } 100% { transform: rotate(405deg); opacity: 0.7; } }
.inner-diamond { position: absolute; width: 16px; height: 16px; border: 1px solid rgba(0,212,255,0.6); transform: rotate(45deg); animation: lkInnerDiamondSpin 3s linear infinite reverse; opacity: 0.6; }
@keyframes lkInnerDiamondSpin { to { transform: rotate(405deg); } }
.center-dot { position: absolute; width: 5px; height: 5px; background: var(--accent-bright); border-radius: 50%; opacity: 0.8; animation: lkDotPulse 1.8s ease-in-out infinite; z-index: 2; }
@keyframes lkDotPulse { 0%,100% { opacity: 0.5; transform: scale(1); box-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent-glow); } 50% { opacity: 1; transform: scale(1.5); box-shadow: 0 0 14px var(--accent), 0 0 28px var(--accent), 0 0 50px var(--accent-strong); } }

/* 文本 */
.loading-text { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-bottom: 28px; min-height: 52px; justify-content: center; z-index: 2; text-align: center; }
.main-loading-text { font-size: 15px; font-weight: 300; letter-spacing: 7px; color: var(--text-primary); text-transform: uppercase; transition: all 0.4s ease; white-space: nowrap; min-height: 20px; text-shadow: 0 0 20px rgba(0,180,255,0.3); position: relative; }
.main-loading-text.glitch { animation: lkGlitch 3s infinite; }
@keyframes lkGlitch {
    0%,92%,100% { transform: translateX(0); text-shadow: 0 0 20px rgba(0,180,255,0.3); }
    93% { transform: translateX(-2px); text-shadow: -2px 0 6px rgba(0,212,255,0.6), 2px 0 6px rgba(0,100,255,0.4); }
    95% { transform: translateX(2px); text-shadow: 2px 0 6px rgba(0,212,255,0.6), -2px 0 6px rgba(0,100,255,0.4); }
    97% { transform: translateX(-1px); text-shadow: -1px 0 4px rgba(0,212,255,0.5), 1px 0 4px rgba(0,100,255,0.3); }
}
.sub-loading-text { font-size: 10px; font-weight: 300; letter-spacing: 2.5px; color: var(--text-secondary); text-transform: uppercase; transition: all 0.4s ease; white-space: nowrap; min-height: 14px; text-shadow: 0 0 10px rgba(0,150,255,0.2); }
.lk-cursor { display: inline-block; width: 7px; height: 14px; background: var(--accent); margin-left: 5px; vertical-align: middle; animation: lkBlink 1s step-end infinite; box-shadow: 0 0 6px var(--accent-glow); }
@keyframes lkBlink { 0%,100% { opacity: 0.7; } 50% { opacity: 0; } }

/* 进度条 */
.progress-section { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2; }
.progress-track { position: relative; width: 100%; height: 3px; background: rgba(0,150,255,0.06); border-radius: 1px; }
.progress-track::before { content: ''; position: absolute; inset: -3px -5px; background: radial-gradient(ellipse at center, rgba(0,180,255,0.05), transparent 80%); pointer-events: none; border-radius: 4px; }
.progress-fill { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: linear-gradient(90deg, rgba(0,100,200,0.6), var(--accent), var(--accent-bright)); transition: width 0.15s ease-out; box-shadow: 0 0 10px var(--accent-glow), 0 0 25px var(--accent-glow), 0 0 45px rgba(0,212,255,0.1); border-radius: 1px; }
.progress-head { position: absolute; top: 50%; left: 0%; width: 7px; height: 7px; background: var(--accent-bright); border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 12px var(--accent), 0 0 28px var(--accent), 0 0 50px rgba(0,212,255,0.5), 0 0 80px rgba(0,212,255,0.2); transition: left 0.15s ease-out; pointer-events: none; z-index: 2; }
.progress-ticks { position: absolute; top: 50%; left: 0; width: 100%; height: 10px; transform: translateY(-50%); pointer-events: none; z-index: 1; }
.lk-tick { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 1px; height: 7px; background: rgba(0,180,255,0.10); transition: all 0.3s ease; }
.lk-tick.active { background: var(--accent-dim); box-shadow: 0 0 6px var(--accent-glow); height: 10px; }
.progress-info { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); }
.progress-status { color: var(--text-secondary); transition: color 0.3s ease; font-size: 8px; letter-spacing: 3px; display: flex; align-items: center; gap: 5px; }
.status-dot { display: inline-block; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; animation: lkDotPulse 1.5s ease-in-out infinite; opacity: 0.7; box-shadow: 0 0 6px var(--accent-glow); }
.progress-percent { font-size: 13px; font-weight: 400; letter-spacing: 1px; color: var(--text-primary); transition: color 0.3s ease; font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; text-shadow: 0 0 10px rgba(0,180,255,0.4); }

/* 完成状态（ACCESS GRANTED 高亮，重辉光） */
.loading-container.complete .main-loading-text { color: var(--accent-bright); letter-spacing: 10px; text-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent-glow); }
.loading-container.complete .progress-fill { background: var(--accent); box-shadow: 0 0 16px var(--accent-strong), 0 0 35px var(--accent-glow), 0 0 60px rgba(0,212,255,0.2); }
.loading-container.complete .progress-head { box-shadow: 0 0 18px var(--accent), 0 0 36px var(--accent), 0 0 60px rgba(0,212,255,0.6), 0 0 100px rgba(0,212,255,0.3); width: 9px; height: 9px; }
.loading-container.complete .corner { border-color: var(--accent); opacity: 1; box-shadow: 0 0 12px var(--accent-glow); }
.loading-container.complete .inner-border { border-color: rgba(0,212,255,0.15); }
.loading-container.complete .top-line, .loading-container.complete .bottom-line { background: linear-gradient(90deg, transparent, var(--accent-dim), var(--accent), var(--accent-dim), transparent); opacity: 0.8; }

@media (max-width: 540px) {
    .loading-container { padding: 2.5rem 2rem; min-width: unset; }
    .main-loading-text { font-size: 12px; letter-spacing: 5px; }
    .sub-loading-text { font-size: 8px; letter-spacing: 1.5px; }
    .progress-section { max-width: 300px; }
    .icon-area { width: 60px; height: 60px; margin-bottom: 26px; }
    .rotating-diamond { width: 30px; height: 30px; }
    .rotating-ring { width: 46px; height: 46px; }
    .inner-diamond { width: 12px; height: 12px; }
}

/* ============ 测试中横幅（柔和 BA 提示条） ============ */
.test-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
    background: linear-gradient(135deg, #9ad0ff, #c0b0ff);
    color: #1c2a3a;
    text-align: center; font-size: 14px; line-height: 1.4;
    padding: 9px 40px;
    box-shadow: 0 2px 14px rgba(120,150,220,0.4);
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.test-banner.closing { transform: translateY(-100%); opacity: 0; }
.test-banner.hidden-banner { display: none; }
body.banner-shown { padding-top: var(--banner-h, 38px); transition: padding-top 0.35s ease; }
body.banner-shown #navbar { top: var(--banner-nav-top, 53px); }
body.banner-shown #navbar.scrolled { top: var(--banner-nav-top, 53px); }
.banner-close {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #1c2a3a; font-size: 20px; line-height: 1;
    cursor: pointer; padding: 4px 8px; opacity: 0.8;
}
.banner-close:hover { opacity: 1; }
.banner-link {
    color: #0a4a8f; font-weight: 600; text-decoration: underline;
    text-underline-offset: 2px; margin-left: 2px;
}
.banner-link:hover { color: #073a73; }
@media (max-width: 768px) { .test-banner { font-size: 12px; padding: 7px 36px; } }

/* ============================================================
   导航栏：原样保留（作用域内还原原始变量，使其外观不变）
   ============================================================ */
#navbar {
    --border: rgba(63, 167, 240, 0.12);
    --accent: #3fa7f0;
    --accent-secondary: #7bd5f5;
    --accent-glow: rgba(63, 167, 240, 0.35);
    --shadow-md: 0 10px 30px rgba(56, 130, 190, 0.1);
    --shadow-lg: 0 22px 55px rgba(56, 130, 190, 0.16);
    --shadow-glow: 0 0 40px rgba(63, 167, 240, 0.22);
    --nav-blur: blur(20px) saturate(180%);
    --nav-inner: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    --text-secondary: #4e6e8c;
    --text-muted: #7a93ab;
    --bg-card: rgba(255, 255, 255, 0.82);
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-xl: 48px;
}
[data-theme="dark"] #navbar {
    --border: rgba(122, 197, 255, 0.14);
    --accent: #58b4f5;
    --accent-secondary: #8adef6;
    --accent-glow: rgba(88, 180, 245, 0.45);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 28px rgba(88, 180, 245, 0.16);
    --shadow-lg: 0 22px 55px rgba(0, 0, 0, 0.45), 0 0 40px rgba(88, 180, 245, 0.24);
    --shadow-glow: 0 0 50px rgba(88, 180, 245, 0.28);
    --nav-blur: blur(20px) saturate(180%);
    --nav-inner: inset 0 1px 0 rgba(190, 225, 255, 0.2);
    --text-secondary: #aec6e0;
    --text-muted: #7089a6;
    --bg-card: rgba(18, 40, 66, 0.82);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.14)), var(--bg-nav);
}

#navbar {
    position: fixed;
    top: 14px; left: 50%; transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 36px);
    max-width: var(--max-width);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04)), var(--bg-nav);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0 26px;
    display: flex; align-items: center; justify-content: space-between;
    height: 54px;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-md), var(--nav-inner);
}
#navbar.scrolled { top: 6px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg), var(--nav-inner); height: 48px; }
.nav-brand {
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 1.3rem; font-weight: 700; color: var(--accent);
    white-space: nowrap; cursor: pointer; text-decoration: none;
    display: flex; align-items: center; gap: 8px;
    transition: color var(--transition-fast);
}
.nav-brand:hover { color: var(--accent-secondary); }
.nav-brand svg { width: 22px; height: 22px; }
.logo { width: 32px; height: 32px; display: block; transition: opacity var(--transition-fast); }
[data-theme="light"] .logo-light { display: block; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.nav-links {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; flex: 1; margin: 0 20px; list-style: none;
}
.nav-links a {
    text-decoration: none; color: var(--text-secondary);
    font-size: 0.88rem; font-weight: 500;
    padding: 7px 15px; border-radius: 24px;
    transition: all var(--transition-fast); white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: rgba(63, 167, 240, 0.15); }
.nav-links a.active { font-weight: 600; background: rgba(63, 167, 240, 0.12); }
.theme-toggle {
    gap: 12px; flex-shrink: 0;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1.5px solid var(--border); background: transparent;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all var(--transition-fast); color: var(--text-secondary);
    position: relative; overflow: hidden;
}
.theme-toggle:hover { background: rgba(63,167,240,0.15); border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-glow); }
.theme-toggle .icon-wrap {
    position: absolute; transition: all var(--transition-bounce);
    display: flex; align-items: center; justify-content: center; width: 20px; height: 20px;
}
.theme-toggle .icon-wrap svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
[data-theme="light"] .theme-toggle .icon-moon-wrap { opacity: 0; transform: rotate(180deg) scale(0.4); }
[data-theme="dark"] .theme-toggle .icon-sun-wrap { opacity: 0; transform: rotate(-180deg) scale(0.4); }
[data-theme="light"] .theme-toggle .icon-sun-wrap { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .icon-moon-wrap { opacity: 1; transform: rotate(0) scale(1); }
[data-theme-preference="auto"] .theme-toggle .icon-auto-wrap { opacity: 1; transform: rotate(0) scale(1); }
[data-theme-preference="auto"] .theme-toggle .icon-sun-wrap,
[data-theme-preference="auto"] .theme-toggle .icon-moon-wrap { opacity: 0; transform: rotate(180deg) scale(0.4); }
.theme-toggle .icon-auto-wrap { opacity: 0; transform: rotate(180deg) scale(0.4); transition: all var(--transition-bounce); }
.hamburger {
    display: none; flex-direction: column; gap: 5px; cursor: pointer;
    background: transparent; border: none; width: 38px; height: 38px;
    align-items: center; justify-content: center; border-radius: 50%;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all var(--transition-fast); transform-origin: center; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu {
    display: none; position: fixed; top: 76px; left: 18px; right: 18px;
    background: var(--bg-nav); backdrop-filter: var(--nav-blur); -webkit-backdrop-filter: var(--nav-blur);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px; z-index: 999; flex-direction: column; gap: 6px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-16px); opacity: 0; pointer-events: none;
    transition: all var(--transition-bounce);
}
.mobile-menu.active { display: flex; transform: translateY(0); opacity: 1; pointer-events: all; }
.mobile-menu a {
    display: block; padding: 11px 16px; text-decoration: none;
    color: var(--text-secondary); border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 500;
}
.mobile-menu a:hover, .mobile-menu a.active { background: rgba(63,167,240,0.12); color: var(--accent); }

/* ============ 设置按钮与下拉菜单（保留原样） ============ */
.settings-container { position: relative; flex-shrink: 0; }
.settings-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1.5px solid var(--border); background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition-fast); color: var(--text-secondary); position: relative;
}
.settings-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.settings-icon { width: 18px; height: 18px; display: block; transition: opacity var(--transition-fast); }
[data-theme="light"] .settings-icon-light { display: block; }
[data-theme="light"] .settings-icon-dark { display: none; }
[data-theme="dark"] .settings-icon-light { display: none; }
[data-theme="dark"] .settings-icon-dark { display: block; }
.settings-btn:hover { background: rgba(63, 167, 240, 0.15); border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-glow); }
.settings-dropdown {
    position: absolute; top: calc(100% + 12px); right: 0; min-width: 160px;
    background: var(--bg-card); backdrop-filter: var(--nav-blur); -webkit-backdrop-filter: var(--nav-blur);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 8px 0; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all var(--transition-smooth); z-index: 1100;
}
.settings-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; font-size: 0.85rem; color: var(--text-secondary);
    white-space: nowrap; transition: background var(--transition-fast);
}
.dropdown-item:hover { background: rgba(63, 167, 240, 0.08); }
.switch { position: relative; display: inline-block; width: 40px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--text-muted); transition: 0.3s; border-radius: 20px;
}
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: 0.3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(20px); }
.mobile-fps-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 16px; color: var(--text-secondary); font-size: 0.95rem; font-weight: 500;
}
.mobile-fps-item:first-of-type { margin-top: 8px; border-top: 1px solid var(--border); }
@media (max-width: 768px) { .settings-container { display: none; } }

/* ============ Hero 区域 ============ */
#hero {
    position: relative; z-index: 1; width: 100%; height: 100vh; min-height: 580px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; background: var(--hero-bg); overflow: hidden;
    transition: background var(--transition-smooth);
}
.hero-video-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; display: block; }
.hero-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: background var(--transition-smooth); }
[data-theme="light"] .hero-overlay { background: rgba(255, 255, 255, 0.45); }
[data-theme="dark"] .hero-overlay { background: rgba(26, 16, 38, 0.45); }
.hero-content { position: relative; z-index: 2; padding: 0 20px; max-width: 1900px; }
.hero-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--hero-subtitle); margin-bottom: 16px;
    opacity: 0; animation: fadeInUpFast 0.6s ease forwards; animation-delay: 0.15s;
}
.hero-title {
    font-family: var(--font-h1); font-size: clamp(2.5rem, 5.5vw, 4.8rem);
    font-weight: 900; color: var(--hero-text); line-height: 1.12; margin-bottom: 10px;
    min-height: 0.7em;
}
.hero-title .highlight {
    background: linear-gradient(135deg, #7fe3ff, #38bdf8, #b9a8ff);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
}
[data-theme="light"] .hero-title .highlight { background: linear-gradient(135deg, #1f8fce, #0f5e9c, #2f9fd6); -webkit-background-clip: text; background-clip: text; }
@keyframes shimmer { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.hero-desc { font-size: 1.05rem; color: var(--hero-desc); max-width: 520px; margin: 0 auto 32px; opacity: 0; animation: fadeInUpFast 0.6s ease forwards; animation-delay: 0.4s; }
.hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 32px; margin: 0 6px;
    border-radius: 50px;
    background: var(--hero-cta-bg);
    border: 1.5px solid var(--hero-cta-border);
    color: var(--hero-cta-text); text-decoration: none; font-weight: 600;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: all var(--transition-smooth);
}
.hero-cta:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-glow); color: var(--accent); }
.hero-cta svg { width: 16px; height: 16px; }
@keyframes fadeInUpFast { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.scroll-indicator {
    position: absolute; bottom: 32px; z-index: 2; display: flex; flex-direction: column;
    align-items: center; gap: 6px; animation: bounceDown 2s ease-in-out infinite; cursor: pointer;
    color: var(--scroll-indicator-color); font-family: var(--font-body); font-size: 0.7rem; font-weight: 500;
}
.scroll-indicator svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }
@keyframes bounceDown { 0%,100% { transform: translateY(0); } 50% { transform: translateY(12px); } }

/* Hero 标题打字机光标 */
.cursor { display: inline-block; width: 3px; height: 1.15em; background: var(--accent); margin-left: 3px; vertical-align: text-bottom; border-radius: 2px; opacity: 0; transition: opacity 0.15s ease; }
.cursor.active { opacity: 1; }

/* ============ 内容区域 ============ */
.content-wrapper { position: relative; z-index: 1; }
section { padding: 80px 20px; position: relative; z-index: 1; }
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-label {
    display: inline-block; font-family: var(--font-body);
    font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--accent); font-weight: 600; margin-bottom: 8px;
    padding: 5px 14px; border-radius: 20px;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.section-title { font-family: var(--font-h1); font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 700; color: var(--text-primary); margin-bottom: 12px; text-align: center; }
.section-desc { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: 0 auto 44px; text-align: center; }

/* 通用软拟物卡片基底 */
.card-soft, .author-note, .hobby-card-inner, .resource-card, .contact-panel, .message-panel, .email-modal {
    background: var(--bg-card);
    border: 1px solid var(--neu-edge);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-neu);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

/* ============ 作者的话 ============ */
#author-words { padding: 26px 20px 0; }
.author-note { position: relative; max-width: 660px; margin: 0 auto; padding: 42px 46px 34px; }
.author-note::before {
    content: '\201C'; position: absolute; top: 8px; left: 16px;
    font-size: 8rem; line-height: 1; font-family: Georgia, 'Times New Roman', serif;
    color: color-mix(in srgb, var(--accent) 18%, transparent); pointer-events: none;
}
.author-note-title {
    position: relative; display: flex; align-items: center; gap: 10px;
    font-family: var(--font-h1); font-size: 1.15rem; font-weight: 700;
    color: var(--accent); margin-bottom: 14px;
}
.author-note-title::before {
    content: ''; width: 10px; height: 10px; border-radius: 3px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    box-shadow: 0 0 10px var(--accent-glow);
}
.author-note-text { position: relative; font-size: 1.02rem; line-height: 2.1; color: var(--text-secondary); margin: 0; }
.author-note-sign { position: relative; text-align: right; margin-top: 20px; font-family: var(--font-h1); font-size: 0.95rem; font-weight: 700; color: var(--accent); }
@media (max-width: 768px) { .author-note { padding: 34px 24px 28px; } .author-note-text { font-size: 0.97rem; } }

/* ============ 关于我（结构不变，套新主题） ============ */
.about-head { text-align: center; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; margin: 0 auto; max-width: 920px; }
.about-image {
    aspect-ratio: 1; border-radius: var(--radius-md);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--bg-card)), color-mix(in srgb, var(--accent-secondary) 32%, var(--bg-card)));
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); color: var(--accent); overflow: hidden;
    box-shadow: var(--shadow-neu);
}
.about-image svg { width: 55%; height: 55%; opacity: 0.75; }
.about-text { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.about-text h3 { font-family: var(--font-h1); font-size: 1.4rem; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.about-text p { color: var(--text-secondary); margin-bottom: 12px; font-size: 15px; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.stat-item {
    text-align: center; padding: 16px 8px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-radius: 16px; border: 1px solid var(--border);
    transition: all var(--transition-fast);
}
.stat-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.stat-number { font-size: 1.5rem; font-weight: 800; color: var(--accent); display: block; font-family: var(--font-heading); }
[data-theme="dark"] .stat-number { text-shadow: 0 0 14px var(--accent-glow); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }

/* ============ 我的兴趣爱好（轮播 · 软拟物 + 悬停电蓝辉光） ============ */
.hobby-deck { position: relative; display: flex; align-items: center; justify-content: center; }
.deck-stage { position: relative; width: 840px; height: 560px; }
.deck-card {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    transition: left 0.7s cubic-bezier(0.22, 0.9, 0.28, 1), top 0.7s cubic-bezier(0.22, 0.9, 0.28, 1), transform 0.7s cubic-bezier(0.22, 0.9, 0.28, 1), z-index 0s 0.08s;
}
@media (max-width: 768px) { .deck-card .hobby-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg-card); } }
.deck-card .hobby-card { width: 560px; cursor: default; transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1); }
.deck-card:hover .hobby-card { transform: translateY(-14px) scale(1.03); }
.deck-nav {
    flex-shrink: 0; margin: 0 14px; width: 46px; height: 46px; border-radius: 50%;
    background: var(--bg-card); border: 1.5px solid var(--card-border);
    color: var(--accent); display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow-neu); transition: all var(--transition-smooth);
}
.deck-nav svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.deck-nav:hover { box-shadow: var(--shadow-neu-hover), var(--shadow-glow); border-color: var(--accent); transform: translateY(-3px); }
.deck-nav:active { transform: scale(0.94); }
.hobby-card-inner {
    padding: 28px 30px 32px; height: 100%;
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
    position: relative; overflow: hidden; transform-style: preserve-3d; will-change: transform;
    transition: transform 0.4s ease, box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.hobby-card-inner.tilting { transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth); }
.hobby-card-inner::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 60%);
    pointer-events: none; opacity: 0; transition: opacity var(--transition-smooth); z-index: 0;
}
.hobby-card-inner > * { position: relative; z-index: 1; }
.hobby-card:hover .hobby-card-inner { box-shadow: var(--shadow-neu-hover), var(--shadow-glow); border-color: var(--accent); }
.hobby-card:hover .hobby-card-inner::before { opacity: 1; }
.hobby-card-img {
    width: 100%; height: 250px; border-radius: 18px; overflow: hidden;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent-secondary) 22%, transparent));
}
.hobby-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hobby-card-img.img-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 44px; }
.hobby-card-img.img-placeholder small { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }
.hobby-icon {
    width: 60px; height: 60px; border-radius: 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent-secondary) 24%, transparent));
    border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.hobby-icon svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hobby-card-title { font-family: var(--font-h1); font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.hobby-card-excerpt { color: var(--text-muted); font-size: 1rem; line-height: 1.7; min-height: 3.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ 我的资源（软拟物网格） ============ */
.resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; grid-auto-rows: minmax(200px, calc(50vh - 166px)); }
.resource-card {
    display: flex; align-items: center; gap: 16px; padding: 26px 24px;
    color: var(--text-primary); text-decoration: none; position: relative; overflow: hidden;
}
.resource-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%);
    opacity: 0; transition: opacity var(--transition-smooth);
}
.resource-card > * { position: relative; z-index: 1; }
.resource-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-neu-hover), var(--shadow-glow); border-color: var(--accent); }
.resource-card:hover::before { opacity: 1; }
.resource-icon {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    box-shadow: 0 6px 16px var(--accent-glow);
}
.resource-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.resource-text { flex: 1; }
.resource-text h3 { font-family: var(--font-h1); font-size: 1.05rem; font-weight: 700; }
.resource-text p { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.resource-arrow { color: var(--accent); font-size: 1.2rem; opacity: 0; transform: translateX(-6px); transition: all var(--transition-smooth); }
.resource-card:hover .resource-arrow { opacity: 1; transform: translateX(0); }

.resource-card.resource-img { display: block; padding: 0; min-height: 96px; }
.resource-card.resource-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.resource-card.resource-img .placeholder-bg {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px; font-size: 48px;
    background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 10%, transparent) 0 22px, color-mix(in srgb, var(--accent) 18%, transparent) 22px 44px);
}
.resource-card.resource-img .placeholder-bg > span:first-child { line-height: 1; }
.resource-card.resource-img .placeholder-bg .php-text { font-size: 14px; font-weight: 600; letter-spacing: 2px; white-space: nowrap; color: var(--text-secondary); }
.resource-card.resource-img .img-mask {
    position: absolute; top: 0; left: 0; bottom: 0; width: 62%; z-index: 2;
    display: flex; align-items: center; justify-content: flex-start; padding-left: 26px;
    background: linear-gradient(90deg, rgba(20, 12, 32, 0.62) 25%, rgba(20, 12, 32, 0.28) 65%, transparent);
    transform: translateX(-100%); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.resource-card.resource-img:hover .img-mask { transform: translateX(0); }
.resource-card.resource-img .img-mask svg { width: 34px; height: 34px; color: #fff; stroke: currentColor; fill: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45)); flex-shrink: 0; }
.resource-card.resource-img .img-mask-right { left: auto; right: 0; justify-content: flex-end; padding-left: 0; padding-right: 26px; background: linear-gradient(270deg, rgba(20, 12, 32, 0.62) 25%, rgba(20, 12, 32, 0.28) 65%, transparent); transform: translateX(100%); }
.resource-card.resource-img:hover .img-mask-right { transform: translateX(0); }

/* ============ 联系我 + 留言（合并区块） ============ */
.contact-panel { max-width: 860px; margin: 0 auto 36px; padding: 40px 32px; }
.contact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-item {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border: 1px solid var(--border); color: var(--text-secondary); text-decoration: none;
    transition: all var(--transition-fast);
}
.contact-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); border-color: var(--accent); color: var(--text-primary); }
.contact-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    box-shadow: 0 5px 14px var(--accent-glow);
}
.contact-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-icon img { width: 22px; height: 22px; }
.contact-label { font-weight: 600; color: var(--text-primary); min-width: 64px; }
.contact-value { color: var(--text-muted); font-size: 0.88rem; }
.contact-note { text-align: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }

/* 留言墙作为联系卡片内的内嵌卡片 */
.contact-panel .message-panel {
    margin-top: 28px;
    background: color-mix(in srgb, var(--accent) 5%, var(--bg-secondary));
    box-shadow: var(--shadow-neu);
}

/* 看板娘对话气泡 */
.kanban-bubble {
    position: fixed; left: 16px; bottom: 290px; z-index: 998;
    max-width: 240px; padding: 12px 16px;
    background: var(--bg-card); color: var(--text-primary);
    border: 1.5px solid var(--accent); border-radius: 18px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
                var(--shadow-neu),
                0 0 14px color-mix(in srgb, var(--accent) 50%, transparent);
    font-family: var(--font-body); font-size: 0.92rem; line-height: 1.6;
    opacity: 0; transform: translateY(8px); pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.kanban-bubble.show { opacity: 1; transform: translateY(0); }
.kanban-bubble::before {
    content: ''; position: absolute; top: 100%; left: 24px;
    width: 0; height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 10px solid var(--accent);
}
.kanban-bubble::after {
    content: ''; position: absolute; top: 100%; left: 25.5px;
    width: 0; height: 0;
    border-left: 7.5px solid transparent;
    border-right: 7.5px solid transparent;
    border-top: 8.5px solid var(--bg-card);
}
@media (max-width: 768px) { .kanban-bubble { bottom: 170px; max-width: 200px; font-size: 0.85rem; } }

/* 联系卡片：加宽式揭示（桌面端从窄到宽展开）；移动端保持原竖向揭示 */
@media (min-width: 769px) {
    .contact-panel.reveal { transform: translateY(42px) scaleX(0.9); transform-origin: center; }
    .contact-panel.reveal.revealed { transform: translateY(0) scaleX(1); }
}

.message-block { margin-top: 64px; }
.message-panel {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between;
    gap: 28px; max-width: 860px; margin: 0 auto; padding: 36px 40px;
}
.msg-note {
    position: absolute; z-index: 0; padding: 8px 14px; border-radius: 6px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px;
    transform: rotate(var(--rot, 0deg)); box-shadow: 0 6px 14px rgba(40, 60, 100, 0.12);
    opacity: 0.6; user-select: none; pointer-events: none; font-family: var(--font-note);
}
.msg-note::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 11px 11px 0; border-color: transparent rgba(255, 255, 255, 0.5) transparent transparent; }
.n1 { --rot: -8deg; top: 18px; left: 26px; background: #ffd6e7; color: #7a2450; }
.n2 { --rot: 5deg; top: 14px; right: 88px; background: #bfe3f2; color: #154a63; }
.n3 { --rot: -3deg; bottom: 20px; left: 116px; background: #ffc2e0; color: #7a2450; }
.n4 { --rot: 6deg; bottom: 16px; right: 30px; background: #cdeecb; color: #2a5c1f; }
[data-theme="dark"] .msg-note { opacity: 0.45; }
.msg-left { position: relative; z-index: 1; flex: 1; min-width: 0; text-align: left; }
.msg-title { font-family: var(--font-h1); font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.msg-text { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.message-btn {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 38px; border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    color: #fff; font-size: 1.02rem; font-weight: 600; letter-spacing: 0.5px; text-decoration: none;
    box-shadow: 0 8px 24px var(--accent-glow);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}
.message-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px var(--accent-glow), var(--shadow-glow); filter: brightness(1.06); }
.message-btn:active { transform: translateY(0); }
.message-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ============ 页脚 ============ */
footer {
    text-align: center; padding: 36px 20px; color: var(--text-muted); font-size: 0.82rem;
    border-top: 1px solid var(--border); background: var(--bg-secondary);
    backdrop-filter: var(--card-blur); display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
footer svg { width: 14px; height: 14px; }
.site-stats { display: inline-block; margin-top: 6px; font-size: 0.9em; color: var(--text-secondary); }
.site-stats b { color: var(--accent); font-weight: 700; font-family: var(--font-heading); }
.site-uptime { display: inline; font-size: 0.9em; color: var(--text-secondary); font-family: var(--font-heading); }

/* ============ 邮箱模态框 ============ */
.contact-item.email-trigger { cursor: pointer; }
.contact-item:hover .contact-value,
.contact-item:focus .contact-value,
.contact-item:active .contact-value,
.contact-item.email-trigger:hover .contact-value { color: var(--accent); }
.email-modal-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(20, 12, 32, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease;
}
.email-modal-overlay.show { display: flex; opacity: 1; visibility: visible; }
.email-modal {
    padding: 36px 32px 28px; width: min(92vw, 380px); text-align: center; position: relative;
    transform: scale(0.92); transition: transform 0.25s ease; border-radius: 20px;
}
.email-modal-overlay.show .email-modal { transform: scale(1); }
.email-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-muted); font-size: 1.4rem; line-height: 1; cursor: pointer; transition: color 0.2s ease; }
.email-modal-close:hover { color: var(--text-primary); }
.email-modal-icon {
    width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    box-shadow: 0 8px 20px var(--accent-glow);
}
.email-modal-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.email-modal-title { font-family: var(--font-h1); font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.email-modal-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.email-modal-row { display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px dashed var(--card-border); border-radius: 12px; padding: 10px 12px 10px 16px; }
.email-modal-addr { flex: 1; text-align: left; font-size: 1rem; color: var(--accent); font-weight: 600; letter-spacing: 0.5px; word-break: break-all; font-family: var(--font-heading); }
.email-modal-row-copy { flex-shrink: 0; padding: 6px 14px; border-radius: 10px; border: none; cursor: pointer; font-size: 0.82rem; font-weight: 600; background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); color: #fff; transition: transform 0.2s ease; }
.email-modal-row-copy:hover { transform: translateY(-1px); }
.email-modal-actions { display: flex; gap: 10px; justify-content: center; }
.email-modal-btn { flex: 1; padding: 10px 16px; border-radius: 12px; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); color: #fff; box-shadow: 0 6px 16px var(--accent-glow); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.email-modal-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px var(--accent-glow); }
.email-modal-btn-ghost { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text-secondary); box-shadow: none; }
.email-modal-btn-ghost:hover { box-shadow: none; opacity: 0.85; }

/* ============ 回到顶部 ============ */
#backToTop {
    position: fixed; bottom: 28px; right: 28px; z-index: 999; width: 48px; height: 48px;
    border-radius: 50%; background: var(--bg-card); border: 1.5px solid var(--border);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-neu); transition: all var(--transition-smooth);
    opacity: 0; transform: translateY(18px); pointer-events: none;
}
#backToTop.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
#backToTop:hover { box-shadow: var(--shadow-neu-hover), var(--shadow-glow); border-color: var(--accent); transform: translateY(-4px); }
#backToTop svg.progress-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
#backToTop .progress-circle { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 138; stroke-dashoffset: 138; transition: stroke-dashoffset 0.1s ease-out; }
#backToTop .arrow-up-svg { position: relative; z-index: 1; width: 18px; height: 18px; stroke: var(--text-primary); fill: none; stroke-width: 2.5; }
#backToTop:hover .arrow-up-svg { stroke: var(--accent); }

/* ============ 滚动揭示 ============ */
.reveal { opacity: 0; transform: translateY(42px); transition: opacity 0.55s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    #navbar { width: calc(100% - 18px); border-radius: var(--radius-lg); padding: 0 14px; height: 46px; top: 8px; }
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .hobby-deck { position: relative; gap: 0; padding: 0; }
    .deck-card { height: 100%; }
    .deck-card .hobby-card { width: 220px; height: 100%; }
    .deck-stage { width: 260px; height: 480px; }
    .deck-nav { width: 36px; height: 36px; margin: 0; }
    .hobby-card-img { height: 160px; }
    .hobby-card-inner { padding: 20px 18px 24px; }
    .hobby-card-excerpt { display: block; overflow: visible; min-height: 0; }
    .resource-grid { grid-template-columns: 1fr; gap: 14px; grid-auto-rows: auto; }
    .resource-card.resource-img { min-height: 150px; }
    .about-grid { grid-template-columns: 1fr; max-width: 460px; }
    .about-text { padding: 24px 20px; }
    #about, #interests, #resources, #contact { padding: 80px 16px 76px; }
    .contact-panel { padding: 28px 20px; }
    .contact-list { grid-template-columns: 1fr; }
    .contact-value { font-size: 0.8rem; }
    .message-panel { flex-direction: column; align-items: stretch; gap: 20px; padding: 28px 22px; }
    .msg-left { text-align: left; }
    .message-btn { justify-content: center; }
    .msg-note { opacity: 0.4; }
    .n3, .n4 { display: none; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 1.7rem; }
}
