/* ═══════════════════════════════════════════════════════════════════
   VisionForge Design System — "Observatory" v3
   深色天文台美学：极光渐变、玻璃拟态、粒子主视觉。
   全部视觉效果由 CSS/SVG/Canvas 程序化生成，无外部版权素材。
   向后兼容 v2 全部 class 契约（见 PROGRESS.md）。
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Tokens ─────────────────────────────────────────────────── */
:root {
    --bg: #06070c;
    --bg-alt: #0a0c14;
    --bg-2: #0a0c14;
    --surface: rgba(255, 255, 255, 0.028);
    --surface-solid: #0e1119;
    --surface-hover: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.07);
    --border-light: rgba(255, 255, 255, 0.13);
    --text: #eef1f8;
    --text-secondary: #9aa3ba;
    --text-muted: #5d6579;
    --primary: #7c6ff0;
    --primary-strong: #8b7ff5;
    --primary-glow: rgba(124, 111, 240, 0.35);
    --primary-soft: rgba(124, 111, 240, 0.12);
    --accent: #67e8f9;
    --accent-glow: rgba(103, 232, 249, 0.28);
    --accent-soft: rgba(103, 232, 249, 0.10);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --error: #f87171;
    --error-soft: rgba(248, 113, 113, 0.12);
    --grad-aurora: linear-gradient(120deg, #c4b5fd 0%, #7c6ff0 45%, #67e8f9 100%);
    --grad-brand: linear-gradient(135deg, #a78bfa, #7c6ff0);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 8px 40px rgba(124, 111, 240, 0.18);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 420ms var(--ease-out);
    --font-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
}

/* ── 2. Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* Lenis 推荐样式（内联自 lenis@1.3.25 dist/lenis.css） */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

/* 环境光背景：两片极光 + 细噪点，纯 CSS 生成，仅 transform/opacity 动画 */
body::before {
    content: '';
    position: fixed;
    inset: -20%;
    z-index: -2;
    background:
        radial-gradient(38% 32% at 18% 8%, rgba(124, 111, 240, 0.13) 0%, transparent 70%),
        radial-gradient(30% 26% at 85% 78%, rgba(103, 232, 249, 0.07) 0%, transparent 70%),
        radial-gradient(24% 22% at 70% 12%, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
    animation: aurora-drift 36s var(--ease-out) infinite alternate;
    will-change: transform;
    pointer-events: none;
}
@keyframes aurora-drift {
    from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
    to   { transform: translate3d(1.5%, 1.5%, 0) scale(1.04); }
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.028;
    pointer-events: none;
}

::selection { background: rgba(124, 111, 240, 0.35); color: #fff; }

/* 细滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); }

a { color: var(--primary-strong); text-decoration: none; transition: color var(--transition); }
a:hover { color: #b3a7ff; }

code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── 3. 页面转场幕布 ───────────────────────────────────────────── */
.page-veil {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background:
        radial-gradient(60% 50% at 50% 42%, rgba(124, 111, 240, 0.14) 0%, transparent 70%),
        var(--bg);
    display: none;
    pointer-events: none;
}
/* 仅在 JS 可用时武装幕布（无 JS 时内容永远可见，渐进增强） */
html.fx .page-veil {
    display: block;
    transform: translateY(0);
    animation: veil-out 0.72s var(--ease-out) 0.04s forwards;
}
@keyframes veil-out {
    to { transform: translateY(-101%); visibility: hidden; }
}
html.fx.fx-leaving .page-veil {
    animation: none;
    visibility: visible;
    transform: translateY(101%);
    transition: transform 0.36s cubic-bezier(0.55, 0, 0.55, 0.2);
}
html.fx.fx-leaving.fx-veil-in .page-veil { transform: translateY(0); }
/* rAF/合成器冻结环境的硬兜底：fx.js 定时器在入场动画结束后彻底移除幕布 */
.page-veil.veil-done { display: none !important; }

/* ── 4. Navbar ─────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background var(--transition-slow), border-color var(--transition-slow),
                backdrop-filter var(--transition-slow);
}
.navbar.scrolled {
    background: rgba(8, 10, 16, 0.66);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
.nav-container {
    max-width: 1160px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    height: 60px; padding: 0 1.5rem;
    transition: height var(--transition-slow);
}
.navbar.scrolled .nav-container { height: 52px; }
.nav-brand {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em;
    background: var(--grad-brand);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-brand:hover { opacity: 0.85; }
.nav-brand .brand-mark { width: 22px; height: 22px; flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 0.35rem; }
.nav-links a {
    position: relative;
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.875rem; font-weight: 500; padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition);
}
.nav-links a::after {
    content: '';
    position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.2rem;
    height: 1.5px; border-radius: 2px;
    background: var(--grad-aurora);
    transform: scaleX(0); opacity: 0;
    transform-origin: left;
    transition: transform 0.32s var(--ease-out), opacity 0.32s var(--ease-out);
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.nav-links a:hover::after { transform: scaleX(1); opacity: 1; }
.nav-links a.nav-user {
    color: var(--text); font-weight: 600;
    background: var(--primary-soft); border: 1px solid rgba(124, 111, 240, 0.24);
}
.nav-links a.nav-user::after { display: none; }
.nav-links form button:hover { text-decoration: none; }

/* ── 5. Layout ─────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 7rem 1.5rem 3rem; }
.container.container-flush { max-width: none; margin: 0; padding: 0; }
.section-inner { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }

.footer {
    position: relative;
    text-align: center; padding: 2.75rem 1.5rem;
    color: #8a93a6; font-size: 0.8rem;
    margin-top: 4rem;
    letter-spacing: 0.02em;
}
.footer::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: min(680px, 80%); height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 111, 240, 0.4), rgba(103, 232, 249, 0.3), transparent);
}

/* ── 6. Alerts ─────────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1.15rem; border-radius: var(--radius); margin-bottom: 1.25rem;
    font-size: 0.875rem; font-weight: 500;
    display: flex; align-items: center; gap: 0.55rem;
    backdrop-filter: blur(8px);
    animation: slideDown 0.3s var(--ease-out);
}
.alert::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    flex-shrink: 0; background: currentColor;
    box-shadow: 0 0 10px currentColor;
}
.alert-error { background: var(--error-soft); color: var(--error); border: 1px solid rgba(248, 113, 113, 0.22); }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(52, 211, 153, 0.22); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ── 7. Cards ──────────────────────────────────────────────────── */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.6rem; margin-bottom: 1.1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color var(--transition), box-shadow var(--transition-slow),
                transform var(--transition-slow);
}
.card:hover { border-color: var(--border-light); box-shadow: var(--shadow); }
.card.card-highlight { border-color: rgba(124, 111, 240, 0.45); box-shadow: 0 0 0 1px var(--primary-glow), var(--shadow-glow); }

/* ── 8. Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.6rem 1.35rem; border: none; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none;
    letter-spacing: -0.01em; white-space: nowrap;
    font-family: inherit; color: var(--text);
    transition: transform var(--transition), box-shadow var(--transition-slow),
                background var(--transition), border-color var(--transition), color var(--transition);
    position: relative; overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, transparent 60%);
    pointer-events: none;
}
.btn:hover { transform: translateY(-1.5px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn::after { transition: opacity var(--transition); }

.btn-primary {
    background: linear-gradient(135deg, #8577f2, #6d5ce7 60%, #5f51d9);
    color: #fff;
    box-shadow: 0 0 0 0 var(--primary-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}
.btn-primary:hover { box-shadow: 0 6px 26px var(--primary-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }

.btn-secondary {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-light); background: var(--surface-hover); }

.btn-danger { background: linear-gradient(135deg, #f87171, #e85d5d); color: #fff; }
.btn-danger:hover { box-shadow: 0 6px 20px rgba(248, 113, 113, 0.28); color: #fff; }

.btn-sm { padding: 0.38rem 0.9rem; font-size: 0.8rem; border-radius: var(--radius-sm); }

.btn-outline {
    background: transparent; color: var(--primary-strong);
    border: 1.5px solid rgba(124, 111, 240, 0.35);
}
.btn-outline:hover { border-color: var(--primary); background: var(--primary-soft); }

/* 点击涟漪（JS 注入 .ripple 元素） */
.btn .ripple {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 65%);
    transform: scale(0); pointer-events: none;
    animation: ripple-expand 0.55s var(--ease-out) forwards;
}
@keyframes ripple-expand { to { transform: scale(2.6); opacity: 0; } }

/* ── 9. Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.15rem; }
.form-group label {
    display: block; margin-bottom: 0.42rem; font-size: 0.825rem;
    font-weight: 600; color: var(--text-secondary); letter-spacing: 0.01em;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.68rem 0.95rem;
    background: rgba(6, 8, 13, 0.6); border: 1.5px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: 0.925rem;
    font-family: inherit; transition: border-color var(--transition), box-shadow var(--transition-slow), background var(--transition);
    outline: none;
}
.form-group select option { background: var(--surface-solid); color: var(--text); }
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: var(--border-light); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(9, 11, 18, 0.8);
    box-shadow: 0 0 0 3.5px var(--primary-soft), 0 0 24px rgba(124, 111, 240, 0.08);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }

/* ── 10. Tables ────────────────────────────────────────────────── */
.table-wrap {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: auto;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.table-responsive { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
thead { background: rgba(10, 12, 20, 0.85); }
thead th { position: sticky; top: 0; z-index: 2; backdrop-filter: blur(8px); }
th {
    padding: 0.8rem 1.05rem; text-align: left; font-size: 0.75rem;
    font-weight: 700; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.06em; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
td {
    padding: 0.75rem 1.05rem; font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: rgba(124, 111, 240, 0.045); }
tbody tr:last-child td { border-bottom: none; }

/* ── 11. Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.22em 0.7em; border-radius: 100px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em;
    white-space: nowrap;
    background: var(--surface-hover); color: var(--text-secondary);
    border: 1px solid var(--border);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-active, .badge-success { background: var(--success-soft); color: var(--success); border-color: rgba(52, 211, 153, 0.2); }
.badge-unused { background: var(--primary-soft); color: var(--primary-strong); border-color: rgba(124, 111, 240, 0.22); }
.badge-expired, .badge-revoked { background: var(--error-soft); color: var(--error); border-color: rgba(248, 113, 113, 0.2); }
.badge-delivered { background: var(--success-soft); color: var(--success); border-color: rgba(52, 211, 153, 0.2); }
.badge-paid { background: var(--success-soft); color: var(--success); border-color: rgba(52, 211, 153, 0.2); }
.badge-pending { background: var(--warning-soft); color: var(--warning); border-color: rgba(251, 191, 36, 0.2); }
.badge-pending::before { animation: badge-pulse 1.6s ease-in-out infinite; }
@keyframes badge-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); } 50% { opacity: 0.6; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0); } }

/* ── 12. Stats ─────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.4rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: border-color var(--transition), box-shadow var(--transition-slow), transform var(--transition-slow);
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 111, 240, 0.5), transparent);
    opacity: 0; transition: opacity var(--transition-slow);
}
.stat-card:hover { border-color: var(--border-light); box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card:hover::before { opacity: 1; }
.stat-value {
    font-size: 2.05rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; font-weight: 500; }

/* ── 13. Page header ───────────────────────────────────────────── */
.page-header { margin-bottom: 1.75rem; }
.page-header h2 {
    font-size: 1.55rem; font-weight: 750; letter-spacing: -0.025em;
    display: flex; align-items: center; gap: 0.65rem;
}
.page-header h2::before {
    content: ''; width: 4px; height: 1.15em; border-radius: 3px;
    background: var(--grad-aurora); flex-shrink: 0;
}
.page-header p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.3rem; }

/* ── 14. Hero（落地页主视觉） ─────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    overflow: hidden;
}
.hero #hero-particles {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.hero::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
    background: linear-gradient(180deg, transparent, var(--bg));
    z-index: 1; pointer-events: none;
}
.hero > * { position: relative; z-index: 2; }
.hero-inner { max-width: 900px; }

.hero .status-pill {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.42rem 1.05rem; border-radius: 100px;
    background: rgba(124, 111, 240, 0.08);
    border: 1px solid rgba(124, 111, 240, 0.28);
    color: #c4b5fd; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
    margin-bottom: 2.2rem;
    backdrop-filter: blur(8px);
}
.hero .status-pill .pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.65; }
}

.hero h1, .hero .hero-title {
    font-size: clamp(2.6rem, 7.5vw, 5.2rem);
    font-weight: 800; letter-spacing: -0.045em;
    line-height: 1.08; margin-bottom: 1.4rem;
    text-wrap: balance;
}
.hero .hero-title .line { display: block; }
.gradient-text {
    background: var(--grad-aurora);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p, .hero .hero-sub {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 540px; margin: 0 auto 2.4rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { font-size: 0.95rem; padding: 0.75rem 1.9rem; }

.scroll-cue {
    position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.28em;
    text-transform: uppercase; z-index: 2;
}
.scroll-cue .cue-line {
    width: 1px; height: 44px; overflow: hidden; position: relative;
    background: rgba(255, 255, 255, 0.08);
}
.scroll-cue .cue-line::after {
    content: ''; position: absolute; left: 0; top: -50%;
    width: 100%; height: 50%;
    background: var(--grad-aurora);
    animation: cue-drop 1.8s var(--ease-out) infinite;
}
@keyframes cue-drop {
    0% { top: -50%; } 60%, 100% { top: 110%; }
}

/* ── 15. Sections / Feature / Pricing ──────────────────────────── */
.section-block { padding: 4.5rem 0 3.5rem; position: relative; }
.section-title {
    text-align: center; font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 750;
    margin-bottom: 0.5rem; letter-spacing: -0.025em;
}
.section-subtitle { text-align: center; color: var(--text-muted); font-size: 0.92rem; margin-bottom: 2.4rem; }

/* 排版跑马灯（纯装饰，aria-hidden） */
.marquee {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.95rem 0;
    background: rgba(255, 255, 255, 0.012);
    user-select: none;
}
.marquee-track {
    display: flex; width: max-content;
    animation: marquee-scroll 32s linear infinite;
    will-change: transform;
}
.marquee-track span {
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.34em;
    color: var(--text-muted); white-space: nowrap; padding-right: 3rem;
}
.marquee-track span b { color: rgba(124, 111, 240, 0.75); font-weight: 600; }
@keyframes marquee-scroll { to { transform: translate3d(-50%, 0, 0); } }

/* 联系卡片 */
.contact-card {
    max-width: 560px; margin: 0 auto;
    text-align: center; padding: 2.6rem 2.2rem;
}
.contact-card h2 { font-size: 1.25rem; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 0.9rem; }
.contact-card p { color: var(--text-secondary); line-height: 2; }
.contact-card a {
    color: var(--accent); font-weight: 600;
    border-bottom: 1px solid rgba(103, 232, 249, 0.3);
    transition: color var(--transition), border-color var(--transition);
}
.contact-card a:hover { color: #a5f3fc; border-color: rgba(103, 232, 249, 0.7); }
.contact-card .contact-icon {
    width: 46px; height: 46px; margin: 0 auto 1.2rem;
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); border: 1px solid rgba(103, 232, 249, 0.22);
    color: var(--accent);
}

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.feature-card {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.6rem;
    backdrop-filter: blur(10px);
    transition: border-color var(--transition), box-shadow var(--transition-slow), transform var(--transition-slow);
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 111, 240, 0.55), rgba(103, 232, 249, 0.4), transparent);
    opacity: 0; transition: opacity var(--transition-slow);
}
.feature-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.feature-card:hover::before { opacity: 1; }
.feature-card .feature-icon {
    width: 44px; height: 44px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
    background: var(--primary-soft);
    border: 1px solid rgba(124, 111, 240, 0.2);
    color: #c4b5fd;
}
.feature-card .feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.feature-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.65; }

.pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.1rem; max-width: 960px; margin: 0 auto;
}
.pricing-card {
    position: relative;
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.9rem 1.35rem;
    text-align: center; backdrop-filter: blur(10px);
    transition: border-color var(--transition), box-shadow var(--transition-slow), transform var(--transition-slow);
}
.pricing-card:hover { border-color: var(--border-light); box-shadow: var(--shadow); transform: translateY(-3px); }
.pricing-card.featured {
    border-color: rgba(124, 111, 240, 0.55);
    box-shadow: 0 0 0 1px var(--primary-glow), var(--shadow-glow);
}
.pricing-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.pricing-card .price { font-size: 2.1rem; font-weight: 800; margin: 0.55rem 0; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pricing-card .price-desc { font-size: 0.825rem; color: var(--text-muted); margin-bottom: 1.35rem; }

/* ── 16. Shop QR ───────────────────────────────────────────────── */
.qr-card {
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem; text-align: center; margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}
.qr-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.75rem; }
.qr-card .qr-box {
    background: #fff; display: inline-block; padding: 0.75rem;
    border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ── 17. Filter bar ────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-bar a, .filter-bar span {
    padding: 0.32rem 0.8rem; border-radius: 100px;
    font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
    border: 1px solid transparent; transition: all var(--transition);
}
.filter-bar a:hover { color: var(--text); border-color: var(--border); }
.filter-bar a.active, .filter-bar span { color: var(--primary-strong); background: var(--primary-soft); border-color: rgba(124, 111, 240, 0.2); }

/* ── 18. Auth ──────────────────────────────────────────────────── */
.auth-wrap {
    min-height: calc(100svh - 60px);
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 1.25rem;
    position: relative; z-index: 1;
}
.auth-cosmos { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 2.4rem 2.2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    position: relative; overflow: hidden;
}
.auth-card::before {
    content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 111, 240, 0.65), rgba(103, 232, 249, 0.45), transparent);
}
.auth-card h2 { font-size: 1.45rem; font-weight: 750; letter-spacing: -0.02em; }
.auth-card .auth-sub { color: var(--text-muted); font-size: 0.875rem; margin: 0.35rem 0 1.8rem; }
.auth-card h2:not(:last-child) { margin-bottom: 0; }
.auth-card > h2:only-child, .auth-card > h2:last-child { margin-bottom: 1.5rem; }
.auth-logo {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-soft); border: 1px solid rgba(124, 111, 240, 0.28);
    margin-bottom: 1.4rem; color: #c4b5fd;
    box-shadow: 0 0 30px rgba(124, 111, 240, 0.15);
}
.auth-footer { margin-top: 1.4rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); }

/* ── 19. Empty state ───────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state p { margin-bottom: 0.75rem; font-size: 0.9rem; }
.empty-state .empty-icon {
    width: 54px; height: 54px; margin: 0 auto 1.1rem;
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
}

/* ── 20. 错误页 ────────────────────────────────────────────────── */
.error-page {
    min-height: calc(100svh - 60px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 3rem 1.5rem;
}
.error-code {
    font-size: clamp(5.5rem, 18vw, 10rem); font-weight: 800; letter-spacing: -0.05em;
    line-height: 1;
    background: linear-gradient(180deg, rgba(238, 241, 248, 0.9), rgba(124, 111, 240, 0.25));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}
.error-page p { color: var(--text-secondary); margin-bottom: 1.75rem; }

/* ── 21. Admin shell ───────────────────────────────────────────── */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 232px; min-width: 232px;
    background: rgba(10, 12, 19, 0.72);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    z-index: 50;
}
.sidebar-header {
    padding: 1.2rem 1.3rem; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 0.6rem;
}
.sidebar-logo {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-size: 1rem; font-weight: 750; color: var(--text); text-decoration: none;
    letter-spacing: -0.01em;
}
.sidebar-logo .brand-mark { width: 20px; height: 20px; }
.sidebar-nav { flex: 1; padding: 0.8rem 0.65rem; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.55rem 0.8rem; margin-bottom: 2px;
    font-size: 0.875rem; font-weight: 500;
    color: var(--text-secondary); text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition), transform var(--transition);
    position: relative;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); transform: translateX(2px); }
.nav-item.active {
    color: var(--text); background: var(--primary-soft); font-weight: 600;
}
.nav-item.active::before {
    content: ''; position: absolute; left: -0.65rem; top: 20%; bottom: 20%;
    width: 3px; border-radius: 0 3px 3px 0;
    background: var(--grad-aurora);
    box-shadow: 0 0 12px var(--primary-glow);
}
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; transition: background var(--transition), box-shadow var(--transition); }
.nav-item.active .nav-dot { background: var(--primary-strong); box-shadow: 0 0 8px var(--primary-glow); }
.nav-dot.muted { background: var(--border-light); }
.sidebar-footer { padding: 0.7rem 0.65rem; border-top: 1px solid var(--border); }

.admin-main { flex: 1; padding: 2rem 2.2rem; overflow-x: auto; min-width: 0; }

/* ── 21.5. Admin v2 · 工作台组件层（分组导航 / 顶栏面包屑 / 卡片头 / 表单栅格） ── */
/* 分组导航 */
.nav-group { margin-top: 1rem; }
.nav-group:first-child { margin-top: 0; }
.nav-group-label {
    padding: 0 0.8rem 0.35rem; font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.12em; color: var(--text-muted);
}
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active .nav-icon { opacity: 1; color: var(--primary-strong); }

/* 顶栏 + 面包屑 */
.admin-topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin: -2rem -2.2rem 1.75rem; padding: 0.85rem 2.2rem;
    background: rgba(8, 10, 16, 0.72);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid var(--border);
}
.breadcrumb { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--text-muted); min-width: 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .crumb-sep { opacity: 0.45; }
.breadcrumb .crumb-current { color: var(--text); font-weight: 600; }
.user-chip {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.28rem 0.8rem 0.28rem 0.3rem;
    border: 1px solid var(--border); border-radius: 100px;
    background: var(--surface); font-size: 0.8rem; font-weight: 600; flex-shrink: 0;
}
.user-chip .avatar {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-brand); color: #fff; font-size: 0.72rem; font-weight: 700;
}
.user-chip .chip-role { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }

/* 页面头（标题区 + 动作区） */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-header-main { min-width: 0; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* 卡片头（标题 + 副描述 + 右侧操作） */
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.card-header h3 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; }
.card-header .card-desc { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.3rem; line-height: 1.6; }
.card-header .card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.card.card-danger { border-color: rgba(248, 113, 113, 0.28); }

/* 表单栅格与操作行 */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.85rem; }
.form-grid-tight { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.form-grid .form-group { margin-bottom: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.9rem; flex-wrap: wrap; }
.form-hint { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.3rem; }
.checkbox-line { display: flex; align-items: center; gap: 0.45rem; font-size: 0.875rem; color: var(--text-secondary); padding: 0.68rem 0; }

/* 表格工具条 / 数字列 / 操作按钮组 */
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.table-toolbar .toolbar-note { color: var(--text-muted); font-size: 0.8rem; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.btn-group { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.btn-group form { display: inline; }

/* 徽章补充语义 */
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(251, 191, 36, 0.2); }
.badge-info { background: var(--accent-soft); color: var(--accent); border-color: rgba(103, 232, 249, 0.22); }
.badge-neutral { background: var(--surface-hover); color: var(--text-secondary); }
.badge-critical { background: var(--error-soft); color: var(--error); border-color: rgba(248, 113, 113, 0.3); }

/* KPI 卡（图标 + 数值横排） */
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.stat-card { display: flex; align-items: center; gap: 1rem; text-align: left; padding: 1.15rem 1.25rem; }
.stat-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-soft); border: 1px solid rgba(124, 111, 240, 0.2); color: #c4b5fd;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-body { min-width: 0; }
.stat-card .stat-value { font-size: 1.65rem; }
.stat-card .stat-label { margin-top: 0.2rem; }
.stat-link { text-decoration: none; color: inherit; cursor: pointer; }
.stat-link:hover { color: inherit; }
.tone-success .stat-icon { background: var(--success-soft); border-color: rgba(52, 211, 153, 0.2); color: var(--success); }
.tone-warning .stat-icon { background: var(--warning-soft); border-color: rgba(251, 191, 36, 0.2); color: var(--warning); }
.tone-error .stat-icon { background: var(--error-soft); border-color: rgba(248, 113, 113, 0.2); color: var(--error); }
.tone-info .stat-icon { background: var(--accent-soft); border-color: rgba(103, 232, 249, 0.2); color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-secondary { color: var(--text-secondary); }

/* 描述列表（画像 / 属性） */
.desc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.65rem 1.5rem; }
.desc-list dt { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.desc-list dd { font-size: 0.9rem; font-weight: 600; word-break: break-all; }

/* 卡片网格 / 迷你卡 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.mini-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }

/* 密钥复制行 / 二维码 */
.copy-field { display: flex; gap: 0.5rem; }
.copy-field input { flex: 1; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.qr-thumb { margin: 1rem 0; text-align: center; background: #fff; border-radius: var(--radius-sm); padding: 0.75rem; }
.qr-thumb img { display: block; max-width: 180px; width: 100%; margin: auto; }

@media (max-width: 900px) {
    .admin-topbar { margin: -1.25rem -1rem 1.25rem; padding: 0.7rem 1rem; }
    .nav-group { margin-top: 0; display: flex; gap: 0.15rem; }
    .nav-group-label { display: none; }
    .breadcrumb .crumb-group, .breadcrumb .crumb-sep-group { display: none; }
}
@media (max-width: 640px) {
    .user-chip .chip-name { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .stat-card .stat-value { font-size: 1.5rem; }
}

/* ── 21.6. Admin 驾驶舱图表 ──────────────────────────────────── */
.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.chart-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.chart-box { position: relative; height: 240px; }
.chart-box-lg { height: 280px; }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-tip {
    position: absolute; pointer-events: none; z-index: 5;
    background: rgba(10, 12, 20, 0.94); border: 1px solid var(--border-light);
    border-radius: 8px; padding: 0.45rem 0.65rem;
    font-size: 0.75rem; line-height: 1.55; white-space: nowrap;
    color: var(--text-secondary); box-shadow: var(--shadow);
    opacity: 0; transition: opacity 0.15s;
}
.chart-tip.on { opacity: 1; }
.chart-tip b { color: var(--text); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-top: 0.75rem; font-size: 0.78rem; color: var(--text-secondary); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 0.35rem; }
.chart-legend .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

@media (max-width: 1100px) {
    .chart-grid, .chart-grid-3 { grid-template-columns: 1fr; }
}

/* ── 21.7. Shop 时长商店旗舰页 ───────────────────────────────── */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.shop-hero {
    position: relative; min-height: 52svh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
    padding: 6.5rem 1.5rem 3.5rem;
}
#shop-cosmos { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.shop-beams { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.shop-beams .beam {
    position: absolute; width: 140vmax; height: 140vmax;
    left: 50%; top: 50%; translate: -50% -50%;
    mix-blend-mode: screen; opacity: 0.5; filter: blur(2px);
}
.shop-beams .beam-a {
    background: conic-gradient(from 0deg, transparent 0deg, rgba(124, 111, 240, 0.10) 24deg, transparent 68deg, transparent 180deg, rgba(103, 232, 249, 0.07) 208deg, transparent 252deg);
    animation: beam-spin 26s linear infinite;
}
.shop-beams .beam-b {
    background: conic-gradient(from 120deg, transparent 0deg, rgba(167, 139, 250, 0.08) 30deg, transparent 84deg, transparent 200deg, rgba(124, 111, 240, 0.06) 236deg, transparent 290deg);
    animation: beam-spin 38s linear infinite reverse;
}
@keyframes beam-spin { to { transform: rotate(360deg); } }
.shop-hero::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
    background: linear-gradient(180deg, transparent, var(--bg)); z-index: 1; pointer-events: none;
}
.shop-hero-inner { position: relative; z-index: 2; max-width: 820px; }
.shop-hero .status-pill {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.42rem 1.05rem; border-radius: 100px;
    background: rgba(124, 111, 240, 0.08); border: 1px solid rgba(124, 111, 240, 0.28);
    color: #c4b5fd; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
    margin-bottom: 1.6rem; backdrop-filter: blur(8px);
}
.shop-hero .status-pill .pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
    animation: pulse-dot 2.2s ease-in-out infinite;
}
.shop-hero h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.12; margin-bottom: 1.1rem; text-wrap: balance; }
.shop-hero .hero-sub { font-size: clamp(0.95rem, 1.5vw, 1.1rem); color: var(--text-secondary); max-width: 520px; margin: 0 auto; line-height: 1.7; }
.shop-alert { max-width: 720px; margin: 0 auto 1.5rem; }

/* 套餐矩阵 */
.shop-plans {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 1.1rem; max-width: 1240px; margin: 0 auto; padding: 1rem 1.5rem 2.5rem;
    align-items: stretch;
}
.plan-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 2rem 1.35rem 1.6rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0));
    transition: border-color var(--transition), box-shadow var(--transition-slow);
    will-change: transform;
}
.plan-card::before { /* 指针镜面流光 */
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.09), transparent 65%);
    opacity: 0; transition: opacity var(--transition);
}
.plan-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-lg); --lift: -6px; }
.plan-card:hover::before { opacity: 1; }
.plan-card > * { position: relative; z-index: 1; }
.plan-card.featured {
    border: 1.5px solid transparent;
    background:
        linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
        conic-gradient(from var(--ang), #7c6ff0, #67e8f9, #a78bfa, #67e8f9, #7c6ff0) border-box;
    animation: ang-spin 5s linear infinite;
    box-shadow: 0 0 0 1px rgba(124, 111, 240, 0.18), var(--shadow-glow);
}
@keyframes ang-spin { to { --ang: 360deg; } }
.plan-ribbon {
    position: absolute; top: 1rem; right: -2.2rem; z-index: 2;
    padding: 0.22rem 2.6rem; transform: rotate(38deg);
    background: var(--grad-brand); color: #fff;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
    box-shadow: 0 4px 16px rgba(124, 111, 240, 0.4);
}
.plan-ribbon.ribbon-alt { background: linear-gradient(135deg, #22d3ee, #0ea5e9); box-shadow: 0 4px 16px rgba(103, 232, 249, 0.3); }
.plan-tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 0.9rem; }
.plan-hours { font-size: 3.1rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; background: var(--grad-aurora); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.plan-hours-unit { font-size: 0.95rem; font-weight: 600; margin-left: 0.3rem; -webkit-text-fill-color: var(--text-secondary); }
.plan-price { margin-top: 0.85rem; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan-currency { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); margin-right: 0.15rem; }
.plan-unit { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.plan-desc { font-size: 0.83rem; color: var(--text-secondary); margin: 0.9rem 0 1.3rem; flex: 1; }
.plan-buy { width: 100%; }

/* 信任条 */
.shop-trust {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem; max-width: 980px; margin: 0 auto; padding: 0 1.5rem 4rem;
}
.trust-item {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); backdrop-filter: blur(10px);
}
.trust-item svg { width: 26px; height: 26px; flex-shrink: 0; color: #c4b5fd; }
.trust-item b { display: block; font-size: 0.88rem; }
.trust-item span { font-size: 0.76rem; color: var(--text-muted); }

/* 支付台 */
.shop-pay { position: relative; display: flex; justify-content: center; padding: 0.5rem 1.25rem 5rem; }
.pay-card {
    position: relative; overflow: hidden;
    width: 100%; max-width: 540px; text-align: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 2.2rem 2rem 1.8rem; backdrop-filter: blur(16px); box-shadow: var(--shadow-lg);
}
.pay-card::before {
    content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 111, 240, 0.65), rgba(103, 232, 249, 0.45), transparent);
}
.pay-head h2 { font-size: 1.25rem; font-weight: 750; letter-spacing: -0.02em; }
.pay-order { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.45rem; flex-wrap: wrap; }
.pay-amount { margin: 1.2rem 0 1.3rem; font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; background: var(--grad-aurora); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.pay-currency { font-size: 1.2rem; -webkit-text-fill-color: var(--text-secondary); margin-right: 0.1rem; }
.pay-method-tabs { display: inline-flex; gap: 0.35rem; padding: 0.3rem; border: 1px solid var(--border); border-radius: 100px; background: rgba(6, 8, 13, 0.5); margin-bottom: 1.4rem; }
.pay-tab {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.5rem 1.15rem; border: 0; border-radius: 100px; cursor: pointer;
    background: transparent; color: var(--text-secondary);
    font-size: 0.85rem; font-weight: 600; font-family: inherit;
    transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}
.pay-tab svg { width: 17px; height: 17px; }
.pay-tab.active[data-method="wechat"] { background: rgba(52, 211, 153, 0.14); color: var(--success); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.3); }
.pay-tab.active[data-method="alipay"] { background: rgba(103, 232, 249, 0.12); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.3); }
.qr-stage { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.qr-frame {
    position: relative; padding: 0.85rem; background: #fff; border-radius: var(--radius-lg);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 44px rgba(124, 111, 240, 0.22);
    overflow: hidden;
}
.qr-frame img { display: block; width: 230px; max-width: 56vw; }
.qr-corner { position: absolute; width: 18px; height: 18px; border: 2.5px solid #7c6ff0; }
.qr-corner.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.qr-corner.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.qr-corner.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.qr-corner.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.qr-scanline {
    position: absolute; left: 8%; right: 8%; top: 8%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(124, 111, 240, 0.9), rgba(103, 232, 249, 0.9), transparent);
    box-shadow: 0 0 14px rgba(124, 111, 240, 0.65);
    animation: qr-scan 2.6s var(--ease-out) infinite alternate;
}
@keyframes qr-scan { from { top: 8%; opacity: 0.9; } to { top: 90%; opacity: 0.7; } }
.pay-status { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; }
.pay-status .status-pill {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.4rem 1rem; border-radius: 100px;
    background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--warning); font-size: 0.8rem; font-weight: 600;
}
.pay-status .status-pill .pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulse-dot 1.8s ease-in-out infinite; }
.pay-status .status-pill.ok { background: var(--success-soft); border-color: rgba(52, 211, 153, 0.3); color: var(--success); }
.pay-status .status-pill.fail { background: var(--error-soft); border-color: rgba(248, 113, 113, 0.3); color: var(--error); }
.pay-hint { font-size: 0.8rem; color: var(--text-muted); max-width: 380px; line-height: 1.6; }
.pay-hint b { color: var(--text-secondary); }
.pay-countdown { font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.pay-back { margin-top: 1.4rem; }

/* 到账成功覆盖层 */
.pay-success {
    position: absolute; inset: 0; z-index: 5;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem;
    background: rgba(8, 10, 16, 0.88); backdrop-filter: blur(10px);
    animation: fade-in 0.45s var(--ease-out);
}
.pay-success[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.success-check { width: 74px; height: 74px; color: var(--success); filter: drop-shadow(0 0 18px rgba(52, 211, 153, 0.45)); }
.success-check .check-ring { stroke-dasharray: 176; stroke-dashoffset: 176; animation: draw 0.7s var(--ease-out) 0.1s forwards; }
.success-check .check-mark { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.45s var(--ease-out) 0.65s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pay-success h3 { font-size: 1.35rem; font-weight: 800; color: var(--success); letter-spacing: -0.02em; }
.pay-success p { font-size: 0.88rem; color: var(--text-secondary); }
#pay-confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

@media (max-width: 640px) {
    .shop-hero { min-height: 46svh; padding: 5.5rem 1.1rem 2.8rem; }
    .shop-plans { padding: 0.75rem 1.1rem 2rem; }
    .pay-card { padding: 1.8rem 1.2rem 1.5rem; }
    .pay-amount { font-size: 2.4rem; }
    .shop-trust { padding-bottom: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .shop-beams .beam, .qr-scanline, .plan-card.featured { animation: none; }
    .success-check .check-ring, .success-check .check-mark { animation: none; stroke-dashoffset: 0; }
}

/* ── 21.8. 炫酷层（光标光影 / 极光边框 / 实时脉冲 / 按钮扫光） ── */
.cursor-glow {
    position: fixed; left: 0; top: 0; z-index: 0;
    width: 520px; height: 520px; pointer-events: none;
    background: radial-gradient(circle, rgba(124, 111, 240, 0.13) 0%, rgba(103, 232, 249, 0.05) 38%, transparent 68%);
    opacity: 0; transition: opacity 0.6s;
    mix-blend-mode: screen; will-change: transform;
}

/* 极光旋转边框（复用 §21.7 注册的 @property --ang） */
.border-beam, .border-beam:hover {
    border: 1.5px solid transparent;
    background:
        linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
        conic-gradient(from var(--ang), rgba(124, 111, 240, 0.9), rgba(103, 232, 249, 0.65), rgba(167, 139, 250, 0.9), rgba(103, 232, 249, 0.65), rgba(124, 111, 240, 0.9)) border-box;
    animation: ang-spin 6s linear infinite;
}
.card.border-beam, .card.border-beam:hover, .auth-card.border-beam, .auth-card.border-beam:hover { border-color: transparent; }

/* 实时脉冲点 */
.live-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--success); box-shadow: 0 0 10px var(--success);
    animation: pulse-dot 1.6s ease-in-out infinite;
    margin-left: 0.4rem; vertical-align: middle;
}

/* 主按钮扫光 */
.btn-primary::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%;
    width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-18deg); transition: left 0.6s var(--ease-out);
    pointer-events: none;
}
.btn-primary:hover::before { left: 120%; }

/* 错误页大字号漂浮 */
.error-code { animation: error-float 5s ease-in-out infinite; }
@keyframes error-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
    .cursor-glow { display: none; }
    .border-beam { animation: none; }
    .error-code { animation: none; }
}

/* ── 22. Reveal 动效（IO 驱动，CSS 过渡实现 60fps） ───────────── */
html.fx [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
html.fx [data-reveal].reveal-in { opacity: 1; transform: translateY(0); }
html.fx [data-reveal="fade"] { transform: none; }
html.fx [data-reveal="left"] { transform: translateX(-26px); }
html.fx [data-reveal="right"] { transform: translateX(26px); }
html.fx [data-reveal="scale"] { transform: scale(0.94); }
html.fx [data-reveal].reveal-in { transform: none; }

/* ── 23. 杂项工具类 ────────────────────────────────────────────── */
.text-mono { font-family: var(--font-mono); font-size: 0.85em; }
.flex { display: flex; }
.gap-sm { gap: 0.5rem; }
.items-center { align-items: center; }

/* ── 24. Reduced Motion 降级 ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body::before { animation: none; }
    .page-veil { display: none !important; }
    html.fx [data-reveal] { opacity: 1 !important; transform: none !important; }
    .scroll-cue .cue-line::after { animation: none; }
    .hero .status-pill .pulse-dot { animation: none; }
    .badge-pending::before { animation: none; }
}

/* ── 25. 响应式 ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar {
        width: 100%; min-width: 0; height: auto;
        position: sticky; top: 0;
        border-right: none; border-bottom: 1px solid var(--border);
        flex-direction: row; align-items: center;
        padding: 0 0.5rem;
    }
    .sidebar-header { border-bottom: none; padding: 0.7rem 0.75rem; }
    .sidebar-nav {
        display: flex; gap: 0.15rem; padding: 0.4rem 0;
        overflow-x: auto; overflow-y: hidden; flex: 1;
        scrollbar-width: none;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .nav-item { white-space: nowrap; margin-bottom: 0; padding: 0.5rem 0.7rem; font-size: 0.82rem; }
    .nav-item:hover { transform: none; }
    .nav-item.active::before { left: 12%; right: 12%; top: auto; bottom: -1px; width: auto; height: 2.5px; border-radius: 3px 3px 0 0; }
    .sidebar-footer { border-top: none; padding: 0.4rem 0; display: flex; gap: 0.15rem; }
    .admin-main { padding: 1.25rem 1rem; }
}

@media (max-width: 640px) {
    .container { padding: 5.5rem 1.1rem 2.5rem; }
    .nav-container { padding: 0 1.1rem; }
    .hero { padding: 4rem 1.1rem 3.5rem; }
    .hero-actions .btn { width: 100%; }
    .auth-card { padding: 2rem 1.5rem; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .stat-value { font-size: 1.7rem; }
    th, td { padding: 0.65rem 0.75rem; }
    .footer { margin-top: 2.5rem; }
}
