/* ============================================
   Nav Home — 全新设计系统
   ============================================ */

/* ---------- 变量 ---------- */
:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --bg: #06060e;
    --bg-elevated: rgba(255,255,255,0.03);
    --bg-card: rgba(255,255,255,0.03);
    --bg-card-hover: rgba(255,255,255,0.05);
    --surface: rgba(255,255,255,0.06);
    --text-1: #f0f0f5;
    --text-2: #8b8ba7;
    --text-3: #4e4e6a;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --accent: #7c5cfc;
    --accent-2: #5eead4;
    --radius: 14px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg: #f4f4f8;
    --bg-elevated: rgba(0,0,0,0.02);
    --bg-card: rgba(255,255,255,0.7);
    --bg-card-hover: rgba(255,255,255,0.9);
    --surface: rgba(0,0,0,0.04);
    --text-1: #111118;
    --text-2: #6b6b80;
    --text-3: #a0a0b0;
    --border: rgba(0,0,0,0.07);
    --border-hover: rgba(0,0,0,0.14);
}

/* View Transitions — 主题切换圆形扩散 */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

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

html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* 滚动条 */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,92,252,0.3); border-radius: 5px; }

/* ======================================
   多层背景系统
   ====================================== */
.bg-system {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 渐变光斑 */
.bg-gradient-orbs { position: absolute; inset: 0; }
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    will-change: transform;
}
.orb-1 {
    width: 600px; height: 600px;
    background: var(--accent);
    top: -15%; left: -10%;
    animation: orbFloat1 20s ease-in-out infinite;
}
.orb-2 {
    width: 500px; height: 500px;
    background: #ec4899;
    bottom: -10%; right: -5%;
    animation: orbFloat2 25s ease-in-out infinite;
}
.orb-3 {
    width: 400px; height: 400px;
    background: var(--accent-2);
    top: 40%; left: 50%;
    animation: orbFloat3 18s ease-in-out infinite;
}

[data-theme="light"] .orb { opacity: 0.08; }

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 60px) scale(1.1); }
    66% { transform: translate(-40px, 100px) scale(0.95); }
}
@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -80px) scale(1.05); }
    66% { transform: translate(50px, -30px) scale(0.9); }
}
@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, 0) scale(1); }
    50% { transform: translate(-50%, -60px) scale(1.15); }
}

/* 常驻斜切瓷砖背景 */
.bg-tiles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.035;
}
.bg-tiles-inner {
    position: absolute;
    inset: -30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    transform: rotate(-15deg) scale(1.3);
}
.bg-tile-row {
    display: flex;
    will-change: transform;
    backface-visibility: hidden;
}
.bg-tile-row-set {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
    padding-right: 14px;
}
.bg-tile-row:nth-child(odd)  { animation: tileSlide 14s linear infinite; }
.bg-tile-row:nth-child(even) { animation: tileSlideReverse 14s linear infinite; }
.bg-tile-row:nth-child(1) { animation-delay: 0s; }
.bg-tile-row:nth-child(2) { animation-delay: -8.7s; }
.bg-tile-row:nth-child(3) { animation-delay: -3.3s; }
.bg-tile-row:nth-child(4) { animation-delay: -11.9s; }
.bg-tile-row:nth-child(5) { animation-delay: -6.7s; }
.bg-tile-row:nth-child(6) { animation-delay: -1.4s; }
.bg-tile {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    contain: layout style;
}
.bg-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 统一环形滚动 keyframe：2×row-set 结构，平移恰好一个 set 宽度 */
@keyframes tileSlide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@keyframes tileSlideReverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}
[data-theme="light"] .bg-tiles { opacity: 0.06; }

/* 网格 */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.4;
    mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
}

/* ======================================
   启动遮罩 (Splash)
   ====================================== */
.splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.8, 0.4);
    overflow: hidden;
    cursor: pointer;
}
.splash::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 50% 40%, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 0%, transparent 75%);
    pointer-events: none;
}

/* 心跳波动线条 */
.splash-wave {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 120px;
    transform: translateY(-30%);
    fill: none;
    stroke: var(--accent);
    stroke-width: 0.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.25;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: splashWaveDraw 8s ease-in-out infinite;
    pointer-events: none;
}
.splash-content {
    position: relative;
    z-index: 2;
}
@keyframes splashWaveDraw {
    0% { stroke-dashoffset: 1200; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1200; }
}
[data-theme="light"] .splash-wave {
    stroke-width: 0.6;
    opacity: 0.2;
}

.splash::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -55%);
    background: radial-gradient(circle, rgba(124,92,252,0.12) 0%, rgba(94,234,212,0.04) 40%, transparent 70%);
    pointer-events: none;
    animation: splashGlowPulse 4s ease-in-out infinite;
}
@keyframes splashGlowPulse {
    0%, 100% { opacity: 0.8; transform: translate(-50%, -55%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -55%) scale(1.08); }
}
.splash.slide-up {
    transform: translateY(-100%);
    pointer-events: none;
}
[data-theme="light"] .splash::before {
    background-image:
        linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
}
[data-theme="light"] .splash::after {
    background: radial-gradient(circle, rgba(124,92,252,0.08) 0%, rgba(94,234,212,0.03) 40%, transparent 70%);
}

/* 动画期间禁止滚动 */
body.animating {
    overflow: hidden;
}

.splash-content {
    text-align: center;
    animation: splashFadeIn 0.8s ease-out both;
    position: relative;
    margin-top: -40px;
}
@keyframes splashFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.splash-logo {
    color: var(--accent);
    margin-bottom: 24px;
    animation: splashLogoBreath 3s ease-in-out infinite;
}
.splash-logo img {
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(124,92,252,0.15);
}
[data-theme="light"] .splash-logo img {
    box-shadow: 0 4px 24px rgba(124,92,252,0.1);
}
@keyframes splashLogoBreath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
.splash-logo svg {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: svgDraw 2s ease forwards, splashLogoPulse 3s ease-in-out 2s infinite;
}
@keyframes svgDraw {
    to { stroke-dashoffset: 0; }
}
@keyframes splashLogoPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

.splash-title {
    font-size: clamp(32px, 6vw, 52px);
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(90deg, var(--text-1) 0%, var(--accent) 50%, var(--accent-2) 80%, var(--text-1) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    animation: splashTitleShimmer 5s ease-in-out infinite;
}
@keyframes splashTitleShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}
.splash-desc {
    color: var(--text-2);
    font-size: 15px;
    font-weight: 300;
    margin-bottom: 0;
}

/* 底部箭头引导 */
.splash-arrow-wrap {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    animation: splashArrowIn 0.8s ease-out 1s forwards;
}
.splash-arrow-wrap:hover {
    opacity: 1;
}
@keyframes splashArrowIn {
    to { opacity: 0.7; }
}
.splash-hint {
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 1px;
}
.splash-arrow {
    color: var(--text-1);
    animation: bounceDown 2s ease-in-out infinite;
}
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.splash-footer {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-3);
    font-size: 11px;
    opacity: 0.3;
}

/* ======================================
   斜切背景动画 (Stage)
   ====================================== */
.stage {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--bg);
    overflow: hidden;
    cursor: pointer;
    transition: background 0.4s ease;
}
.stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, transparent 30%, var(--bg) 80%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}
/* 飞散过渡：背景 + 遮罩同步消失，露出下方内容 */
.stage.flyaway {
    background: transparent;
    overflow: visible;
    pointer-events: none;
}
.stage.flyaway::after {
    opacity: 0;
}

.stage-tiles {
    position: absolute;
    inset: -30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    transform: rotate(-15deg) scale(1.3);
}

.stage-row {
    display: flex;
    will-change: transform;
    backface-visibility: hidden;
}
.stage-row-set {
    display: flex;
    gap: 14px;
    flex-shrink: 0;
    padding-right: 14px;
}
.stage-row:nth-child(odd)  { animation: tileSlide 8s linear infinite; }
.stage-row:nth-child(even) { animation: tileSlideReverse 8s linear infinite; }
.stage-row:nth-child(1) { animation-delay: 0s; }
.stage-row:nth-child(2) { animation-delay: -4.9s; }
.stage-row:nth-child(3) { animation-delay: -1.9s; }
.stage-row:nth-child(4) { animation-delay: -6.8s; }
.stage-row:nth-child(5) { animation-delay: -3.8s; }
.stage-row:nth-child(6) { animation-delay: -0.9s; }

.stage-tile {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    contain: layout style;
}
.stage-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* 噪点纹理 */
.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}
[data-theme="light"] .bg-noise { opacity: 0.04; }

/* 粒子 Canvas */
#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

/* ======================================
   页面容器
   ====================================== */
.page {
    position: relative;
    z-index: 2;
}

/* ======================================
   顶部导航栏
   ====================================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    background: rgba(6,6,14,0.6);
    backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
}
[data-theme="light"] .topbar {
    background: rgba(244,244,248,0.7);
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-mark {
    color: var(--accent);
    display: flex;
}
.brand-name {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.3px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 搜索触发器 */
.search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-3);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.search-trigger:hover {
    border-color: var(--border-hover);
    color: var(--text-2);
}
.search-trigger kbd {
    font-family: var(--font);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-3);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.icon-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-1);
    background: var(--bg-elevated);
}

/* 主题切换图标 */
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ======================================
   搜索弹窗
   ====================================== */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.search-modal.open {
    opacity: 1;
    visibility: visible;
}

.search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
[data-theme="light"] .search-backdrop {
    background: rgba(0,0,0,0.3);
}

.search-dialog {
    position: relative;
    width: 560px;
    max-width: 92vw;
    background: rgba(18,18,32,0.95);
    border: 1px solid var(--border-hover);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    transform: translateY(-10px) scale(0.98);
    transition: transform 0.3s var(--ease);
}
[data-theme="light"] .search-dialog {
    background: rgba(255,255,255,0.97);
}
.search-modal.open .search-dialog {
    transform: translateY(0) scale(1);
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}
.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-1);
    font-size: 16px;
    font-family: var(--font);
    outline: none;
}
.search-input-wrap input::placeholder { color: var(--text-3); }
.search-input-wrap kbd {
    font-family: var(--font);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-3);
    cursor: pointer;
    transition: color 0.2s;
}
.search-input-wrap kbd:hover { color: var(--text-1); }

.search-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}
.search-results:empty::after {
    content: '输入关键词开始搜索';
    display: block;
    padding: 24px;
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
}
.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.15s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.search-item:hover { background: var(--surface); }
.search-item .si-icon { font-size: 16px; color: var(--text-3); width: 20px; text-align: center; }
.search-item .si-text { flex: 1; }
.search-item .si-title { font-size: 14px; font-weight: 500; }
.search-item .si-desc { font-size: 12px; color: var(--text-3); }
.search-item .si-arrow { color: var(--text-3); }

.search-no-result {
    padding: 32px;
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
}

/* ======================================
   Hero 区域
   ====================================== */
.hero {
    padding: clamp(24px, 4vw, 40px) clamp(16px, 3vw, 24px) clamp(20px, 3vw, 32px);
}
.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(18px, 3vw, 28px) clamp(20px, 4vw, 36px);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.hero-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124,92,252,0.3), transparent);
    z-index: 3;
}
/* 有视频时的卡片 */
.hero-inner.has-video {
    padding: 0;
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.hero-inner.has-video .hero-content {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    padding: clamp(18px, 3vw, 28px) clamp(20px, 4vw, 36px);
}
[data-theme="light"] .hero-inner.has-video .hero-content {
    background: rgba(255,255,255,0.55);
}
.hero-inner.has-video .hero-title,
.hero-inner.has-video .stat-num {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.hero-inner.has-video .hero-desc,
.hero-inner.has-video .stat-label {
    color: rgba(255,255,255,0.8);
}
[data-theme="light"] .hero-inner.has-video .hero-title,
[data-theme="light"] .hero-inner.has-video .stat-num {
    color: var(--text-1);
    text-shadow: none;
}
[data-theme="light"] .hero-inner.has-video .hero-desc,
[data-theme="light"] .hero-inner.has-video .stat-label {
    color: var(--text-2);
}
.hero-mute-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 4;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 6px;
    color: #fff;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-mute-btn:hover { opacity: 1; }
.hero-mute-btn .icon-unmuted { display: none; }
.hero-mute-btn.unmuted .icon-muted { display: none; }
.hero-mute-btn.unmuted .icon-unmuted { display: block; }
.hero-content {
    display: flex;
    align-items: center;
    gap: 32px;
}
.hero-text {
    text-align: left;
    flex: 1;
    min-width: 0;
}
.hero-title {
    font-size: clamp(26px, 5vw, 36px);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
    color: var(--text-1);
    margin-bottom: 4px;
}
.hero-desc {
    color: var(--text-2);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
}
.hero-divider {
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, transparent, var(--border), transparent);
    flex-shrink: 0;
}
.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.stat-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-1);
}
.stat-label {
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 0.5px;
}
.stat-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}
@media (max-width: 640px) {
    .hero-inner { padding: 18px; }
    .hero-inner.has-video { padding: 0; }
    .hero-inner.has-video .hero-content { padding: 18px; }
    .hero-content {
        flex-direction: column;
        gap: 12px;
    }
    .hero-text { text-align: center; }
    .hero-title { font-size: 22px; }
    .hero-desc { font-size: 13px; }
    .hero-divider { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
    .hero-stats { gap: 18px; }
    .stat-num { font-size: 20px; }
    .stat-label { font-size: 10px; }
    .hero-mute-btn { bottom: 6px; right: 6px; padding: 5px; }
}

/* ======================================
   内容区
   ====================================== */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 24px) clamp(32px, 5vw, 60px);
}

/* ======================================
   分类区块
   ====================================== */
.section {
    margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: clamp(12px, 2vw, 18px);
    padding-bottom: clamp(10px, 1.5vw, 14px);
    border-bottom: 1px solid color-mix(in srgb, var(--cat-color, #7c5cfc) 25%, transparent);
}
.section-tag {
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.section-tag img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
}
.section-info {
    flex: 1;
    min-width: 0;
}
.section-head h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.section-desc {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}
.section-count {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--cat-color, var(--text-3));
    padding: 3px 10px;
    border-radius: 100px;
}

/* ======================================
   卡片网格
   ====================================== */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1.5vw, 14px);
    justify-content: flex-start;
}
.grid > .card {
    flex: 0 1 calc(33.333% - 10px);
    min-width: 200px;
    max-width: calc(50% - 7px);
}

/* ======================================
   卡片
   ====================================== */
.card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    cursor: pointer;
    display: block;
    contain: layout style paint;
}

/* 外发光层 */
.card-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
        color-mix(in srgb, var(--cat-color, #7c5cfc) 15%, transparent) 0%, transparent 60%);
    z-index: 0;
}

.card:hover .card-glow { opacity: 1; }

.card-body {
    position: relative;
    z-index: 1;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-radius: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
[data-theme="light"] .card-body {
    border-top: 1px solid rgba(255,255,255,0.6);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.card:hover .card-body {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(124,92,252,0.08);
}
[data-theme="light"] .card:hover .card-body {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 0 0 1px rgba(124,92,252,0.1);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px -12px rgba(124,92,252,0.15);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.1);
}

.card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.card-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: 8px;
    transition: background 0.3s;
}
.card:hover .card-icon {
    background: rgba(124,92,252,0.12);
}
[data-theme="light"] .card:hover .card-icon {
    background: rgba(124,92,252,0.08);
}
.card-icon .iconfont {
    font-size: 18px;
    line-height: 1;
}
.section-tag .iconfont {
    font-size: 18px;
    line-height: 1;
}
.card-name {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s;
}
.card:hover .card-name {
    color: var(--accent);
}

/* 标签 */
.tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    text-transform: uppercase;
}
.tag-blue { background: rgba(59,130,246,0.12); color: #60a5fa; }
.tag-purple { background: rgba(139,92,246,0.12); color: #a78bfa; }
.tag-green { background: rgba(34,197,94,0.12); color: #4ade80; }
.tag-red { background: rgba(239,68,68,0.12); color: #f87171; }
.tag-orange { background: rgba(249,115,22,0.12); color: #fb923c; }
.tag-pink { background: rgba(236,72,153,0.12); color: #f472b6; }
.tag-cyan { background: rgba(6,182,212,0.12); color: #22d3ee; }
.tag-yellow { background: rgba(234,179,8,0.12); color: #facc15; }

.card-desc {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.card-url {
    font-size: 12px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s;
}
.card:hover .card-url {
    color: var(--text-2);
}
.card-arrow {
    color: var(--text-3);
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: all 0.3s var(--ease);
}
.card:hover .card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* ======================================
   页脚
   ====================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 24px);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}

/* ======================================
   入场动画
   ====================================== */

/* 页面内容初始隐藏 */
.page {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}
body.content-in .page {
    opacity: 1;
}

/* 分层入场 — 固定延迟 */
.topbar {
    opacity: 0;
    transform: translateY(-20px);
}
.hero-inner {
    opacity: 0;
    transform: translateY(30px);
}
.section {
    opacity: 0;
    transform: translateY(24px);
}
.topbar.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.hero-inner.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease) 0.15s, transform 0.8s var(--ease) 0.15s;
}
.section.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.card {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
}
.card.in-view {
    animation: cardBounceIn 0.6s var(--ease) forwards;
}
@keyframes cardBounceIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.97); }
    60% { opacity: 1; transform: translateY(-3px) scale(1.008); }
    80% { transform: translateY(1px) scale(0.999); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.card.in-view:hover {
    transform: translateY(-3px) scale(1);
}

/* 卡片 3D tilt */
.card {
    transform-style: preserve-3d;
    perspective: 800px;
}

/* 滚动进度条 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 9999;
    transition: width 0.05s linear;
    pointer-events: none;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, background 0.2s, border-color 0.2s;
    pointer-events: none;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-1);
}

/* ======================================
   搜索过滤隐藏
   ====================================== */
.card.filtered-out { display: none; }
.section.filtered-out { display: none; }

/* ======================================
   响应式
   ====================================== */
@media (max-width: 768px) {
    .stage-tiles {
        inset: -40%;
        gap: 14px;
        transform: rotate(-12deg) scale(1.4);
    }
    .stage-tile {
        width: 140px;
        height: 90px;
        border-radius: 10px;
    }
    .stage-row-set { gap: 12px; padding-right: 12px; }
    .bg-tile-row-set { gap: 12px; padding-right: 12px; }

    .bg-tiles-inner {
        inset: -40%;
        transform: rotate(-12deg) scale(1.4);
    }
    .bg-tile {
        width: 140px;
        height: 90px;
    }

    .topbar { padding: 0 16px; }
    .topbar-inner { height: 52px; }
    .search-trigger .search-hint,
    .search-trigger kbd { display: none; }
    .search-trigger { padding: 7px 10px; }

    .hero-title { letter-spacing: -1px; }
    .hero-desc { font-size: 15px; }
    .hero-stats { gap: 14px; }
    .stat-num { font-size: 18px; }

    .grid > .card { flex: 0 1 calc(50% - 6px); min-width: 0; max-width: none; }

    .card-body { padding: 12px; }
    .section-head h2 { font-size: 16px; }
    .section-tag { width: 24px; height: 24px; font-size: 16px; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 14px; }
    .hero-badge { font-size: 11px; }
    .hero-desc { font-size: 13px; }

    .grid > .card { flex: 0 1 calc(50% - 5px); min-width: 0; max-width: none; }
    .card-name { font-size: 13px; }
    .card-body { padding: 10px; }
    .card-desc { display: none; }
    .card-foot { margin-top: 6px; padding-top: 4px; }
    .card-url { font-size: 11px; }
    .tag { font-size: 9px; padding: 1px 5px; }
    .card-icon { width: 24px; height: 24px; font-size: 14px; border-radius: 6px; }
    .card-icon .iconfont { font-size: 14px; }

    .section-head h2 { font-size: 15px; }
    .section-tag { width: 22px; height: 22px; font-size: 14px; }
    .section-count { font-size: 11px; padding: 2px 8px; }

    #particles { display: none; }
    .bg-grid { display: none; }
}

/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .stage-row, .bg-tile-row { animation-duration: 0s !important; }
    .card.in-view { animation: none; opacity: 1; transform: none; }
    .splash { transition-duration: 0.1s; }
    .page { transition-duration: 0.1s; }
}

/* ======================================
   通用弹窗
   ====================================== */
.nav-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}
/* 模糊层独立，不参与 opacity 过渡，避免每帧重算 backdrop-filter */
.nav-modal-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.nav-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.nav-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 32px 28px 24px;
    max-width: 360px;
    width: 90vw;
    text-align: center;
    box-shadow:
        0 24px 80px -12px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.06);
    transform: scale(0.9) translateY(16px);
    transition: transform 0.35s cubic-bezier(0.16, 1.2, 0.3, 1);
    position: relative;
    overflow: hidden;
}
/* 弹窗背景 logo —— 铺满 + 磨砂玻璃 */
.nav-modal-bg-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.nav-modal-bg-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0 !important;
    filter: blur(18px) saturate(1.6);
    transform: scale(1.3);
    opacity: 0.18;
}
.nav-modal-bg-icon .iconfont {
    font-size: 160px !important;
    filter: blur(12px);
    opacity: 0.12;
}
/* emoji 类型 */
.nav-modal-bg-icon > span {
    font-size: 140px;
    filter: blur(10px);
    opacity: 0.12;
}
/* 磨砂玻璃遮罩 */
.nav-modal-bg-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--bg-card) 72%, transparent);
    backdrop-filter: blur(2px);
}
[data-theme="light"] .nav-modal-bg-icon img {
    opacity: 0.22;
    filter: blur(18px) saturate(1.8);
}
[data-theme="light"] .nav-modal-bg-icon::after {
    background: color-mix(in srgb, var(--bg-card) 78%, transparent);
}
[data-theme="light"] .nav-modal {
    border-top: 1px solid rgba(255,255,255,0.8);
    box-shadow:
        0 24px 80px -12px rgba(0,0,0,0.15),
        0 0 0 1px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.8);
}
.nav-modal-overlay.active .nav-modal {
    transform: scale(1) translateY(0);
}
.nav-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}
.nav-modal-close:hover {
    color: var(--text-1);
    background: var(--bg-hover);
}
.nav-modal-icon {
    position: relative;
    z-index: 1;
    font-size: 32px;
    margin-bottom: 10px;
    line-height: 1;
}
.nav-modal-icon img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-modal-icon .iconfont {
    font-size: 32px !important;
}
.nav-modal-title {
    position: relative;
    z-index: 1;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 6px;
}
.nav-modal-desc {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 18px;
    line-height: 1.6;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
}
[data-theme="light"] .nav-modal-desc {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.06);
}
.nav-modal-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
}
.nav-modal-btn {
    flex: 1;
    padding: 11px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s var(--ease), box-shadow 0.2s, filter 0.2s;
}
.nav-modal-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.nav-modal-btn:active {
    transform: translateY(0) scale(0.97);
    filter: brightness(0.95);
}
.nav-modal-btn.primary {
    --_accent: var(--modal-accent, #7c5cfc);
    background: linear-gradient(135deg, var(--_accent), color-mix(in srgb, var(--_accent) 70%, #fff));
    color: #fff;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--_accent) 40%, transparent);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.nav-modal-btn.primary:hover {
    box-shadow: 0 6px 24px color-mix(in srgb, var(--_accent) 55%, transparent);
}
.nav-modal-btn.secondary {
    background: var(--surface);
    color: var(--text-2);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.nav-modal-btn.secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-1);
}
/* 复制成功提示 */
.nav-modal-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 1px solid rgba(255,255,255,0.08);
    color: var(--text-1);
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s var(--ease);
    pointer-events: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
}
.nav-modal-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
