/* ============================================================
   icyovo 导航页 · 样式 (Bento 玻璃拟态 · 2026-08)
   1. 主题变量  2. 基础  3. 背景层  4. 顶栏
   5. Hero  6. 搜索  7. Bento 卡片  8. 雪花/彩蛋
   9. 页脚备案  10. 响应式
   ============================================================ */

/* ---------- 1. 主题变量 ---------- */
:root,
:root.theme-dark {
    --bg: #0a0e1c;
    --card-bg: rgba(255, 255, 255, 0.045);
    --card-bg-hover: rgba(255, 255, 255, 0.075);
    --card-border: rgba(255, 255, 255, 0.09);
    --card-border-hover: rgba(125, 211, 252, 0.4);
    --accent: #7dd3fc;
    --accent-strong: #38bdf8;
    --accent-2: #a78bfa;
    --accent-3: #22d3ee;
    --accent-glow: rgba(56, 189, 248, 0.22);
    --text-main: #e6edf7;
    --text-dim: #93a1b6;
    --text-faint: #5f6e86;
    --dropdown-bg: rgba(13, 18, 33, 0.94);
    --flake-color: #dbeafe;
    --flake-shadow: 0 0 8px rgba(186, 230, 253, 0.7);
    --flake-burst-shadow: 0 0 8px rgba(186, 230, 253, 0.85);
    --overlay-bg: rgba(4, 8, 20, 0.6);
    --input-bg: rgba(0, 0, 0, 0.25);
    --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #eef2f8;
        --card-bg: rgba(255, 255, 255, 0.72);
        --card-bg-hover: rgba(255, 255, 255, 0.95);
        --card-border: rgba(15, 23, 42, 0.08);
        --card-border-hover: rgba(2, 132, 199, 0.4);
        --accent: #0284c7;
        --accent-strong: #0369a1;
        --accent-2: #7c3aed;
        --accent-3: #0891b2;
        --accent-glow: rgba(2, 132, 199, 0.14);
        --text-main: #1e293b;
        --text-dim: #64748b;
        --text-faint: #94a3b8;
        --dropdown-bg: rgba(255, 255, 255, 0.97);
        --flake-color: #38bdf8;
        --flake-shadow: 0 0 6px rgba(14, 165, 233, 0.45);
        --flake-burst-shadow: 0 0 8px rgba(14, 165, 233, 0.55);
        --overlay-bg: rgba(15, 23, 42, 0.4);
        --input-bg: rgba(0, 0, 0, 0.04);
    }
}

:root.theme-light {
    --bg: #eef2f8;
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-bg-hover: rgba(255, 255, 255, 0.95);
    --card-border: rgba(15, 23, 42, 0.08);
    --card-border-hover: rgba(2, 132, 199, 0.4);
    --accent: #0284c7;
    --accent-strong: #0369a1;
    --accent-2: #7c3aed;
    --accent-3: #0891b2;
    --accent-glow: rgba(2, 132, 199, 0.14);
    --text-main: #1e293b;
    --text-dim: #64748b;
    --text-faint: #94a3b8;
    --dropdown-bg: rgba(255, 255, 255, 0.97);
    --flake-color: #38bdf8;
    --flake-shadow: 0 0 6px rgba(14, 165, 233, 0.45);
    --flake-burst-shadow: 0 0 8px rgba(14, 165, 233, 0.55);
    --overlay-bg: rgba(15, 23, 42, 0.4);
    --input-bg: rgba(0, 0, 0, 0.04);
}

body.blizzard-active {
    background: #020617 !important;
    transition: background 1s ease;
}

/* ---------- 2. 基础 ---------- */
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg);
    background-image: radial-gradient(1200px 700px at 50% -12%, rgba(56, 189, 248, 0.10), transparent 60%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    transition: background 0.8s ease;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ---------- 3. 背景层 ---------- */
.aurora {
    position: fixed;
    inset: -20%;
    pointer-events: none;
    z-index: 0;
    filter: blur(70px);
    opacity: 0.5;
    transition: opacity 0.8s ease;
}
.aurora-band {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    animation: auroraDrift linear infinite alternate;
}
.aurora-band.a1 {
    width: 55vw; height: 55vw;
    left: -10%; top: -15%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.5), transparent 65%);
    animation-duration: 16s;
}
.aurora-band.a2 {
    width: 45vw; height: 45vw;
    right: -8%; top: 5%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.42), transparent 65%);
    animation-duration: 21s;
    animation-delay: -6s;
}
.aurora-band.a3 {
    width: 50vw; height: 50vw;
    left: 25%; bottom: -20%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 65%);
    animation-duration: 26s;
    animation-delay: -12s;
}
.aurora-band.a4 {
    width: 38vw; height: 38vw;
    right: 15%; bottom: -10%;
    background: radial-gradient(circle, rgba(232, 121, 249, 0.3), transparent 65%);
    animation-duration: 19s;
    animation-delay: -3s;
}
@keyframes auroraDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(4vw, -3vh) scale(1.15); }
    100% { transform: translate(-3vw, 4vh) scale(0.95); }
}
body.blizzard-active .aurora { opacity: 0.15; }

.stardust {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}
.star {
    position: absolute;
    background: var(--flake-color);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--flake-shadow);
    animation: twinkle ease-in-out infinite alternate;
}
@keyframes twinkle {
    from { opacity: 0.1; transform: scale(0.7); }
    to   { opacity: 0.9; transform: scale(1.2); }
}

/* ---------- 4. 顶栏 ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 32px 0;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 20;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
.brand-mark {
    width: 30px;
    height: 30px;
    display: block;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: transform 2.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: markPulse 5s ease-in-out infinite;
}
@keyframes markPulse {
    0%, 100% { filter: drop-shadow(0 0 6px var(--accent-glow)); }
    50%      { filter: drop-shadow(0 0 16px var(--accent-glow)); }
}
.brand-mark.blizzard-spin { transform: rotate(3600deg) scale(1.3); }
.brand-name {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-main);
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.brand-name em {
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* 顶栏右侧操作区 */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lock-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    cursor: pointer;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease,
                background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
.lock-btn:hover {
    border-color: var(--card-border-hover);
    color: var(--text-main);
    box-shadow: 0 0 15px var(--accent-glow);
}
.lock-btn.unlocked {
    color: var(--accent);
    border-color: var(--card-border-hover);
    box-shadow: 0 0 12px var(--accent-glow);
}
.lock-btn:active { transform: scale(0.92); }

/* 设置 */
.settings { position: relative; z-index: 200; }
.settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    cursor: pointer;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease, box-shadow 0.3s ease,
                background 0.3s ease, color 0.3s ease;
}
.settings-btn:hover {
    border-color: var(--card-border-hover);
    color: var(--text-main);
    box-shadow: 0 0 15px var(--accent-glow);
}
.settings.open .settings-btn {
    transform: rotate(90deg);
    border-color: var(--card-border-hover);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}
.settings-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--dropdown-bg);
    border: 1px solid var(--card-border-hover);
    border-radius: 16px;
    padding: 8px;
    min-width: 150px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    z-index: 201;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.settings.open .settings-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.settings-label {
    padding: 8px 12px 4px;
    font-size: 11px;
    color: var(--text-faint);
    letter-spacing: 1px;
}
.theme-option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
    opacity: 0;
    transform: translateX(-8px);
}
.settings.open .theme-option {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s, color 0.2s;
}
.settings.open .theme-option:nth-child(2) { transition-delay: 0.04s; }
.settings.open .theme-option:nth-child(3) { transition-delay: 0.08s; }
.settings.open .theme-option:nth-child(4) { transition-delay: 0.12s; }
.theme-option:hover {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
    transform: translateX(3px);
}
.theme-option.active {
    color: var(--accent);
    font-weight: 600;
}
.theme-option.active::before { content: '✓ '; }

/* ---------- 5. Hero ---------- */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 20px 20px;
    position: relative;
    z-index: 10;
}
.hero {
    text-align: center;
    margin-bottom: 28px;
}
.greeting {
    font-size: 34px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--text-main);
    animation: greetingIn 0.9s cubic-bezier(0.2, 1, 0.3, 1) both;
}
@keyframes greetingIn {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sub-motto {
    font-size: 14px;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-top: 10px;
    min-height: 1.5em;
    transition: opacity 0.5s ease;
    animation: greetingIn 0.9s 0.12s cubic-bezier(0.2, 1, 0.3, 1) both;
}
.sub-motto.fade { opacity: 0; }

/* ---------- 6. 搜索（命令栏） ---------- */
.search-section {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 36px;
    padding: 0 20px;
    z-index: 100;
    position: relative;
    animation: greetingIn 0.9s 0.2s cubic-bezier(0.2, 1, 0.3, 1) both;
}
.search-box {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    display: flex;
    align-items: center;
    padding: 6px 8px 6px 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    transition: all 0.3s;
    position: relative;
    /* 不能 overflow:hidden，否则裁剪引擎下拉菜单 */
}
.search-glow {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.search-glow::before {
    content: '';
    position: absolute;
    inset: -150%;
    background: conic-gradient(from var(--angle, 0deg),
        transparent 0deg, var(--accent-glow) 60deg,
        transparent 120deg, transparent 180deg,
        rgba(167, 139, 250, 0.12) 240deg,
        transparent 300deg);
    animation: searchSweep 6s linear infinite;
}
@keyframes searchSweep {
    to { --angle: 360deg; }
}
.search-box > *:not(.search-glow) { position: relative; z-index: 1; }
.search-box:focus-within {
    border-color: var(--card-border-hover);
    box-shadow: 0 0 0 1px var(--card-border-hover), 0 0 30px var(--accent-glow), 0 12px 40px rgba(0, 0, 0, 0.2);
}
.engine-selector {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.engine-selector:hover { background: rgba(128, 128, 128, 0.1); }
.engine-icon { width: 24px; height: 24px; border-radius: 7px; object-fit: contain; flex-shrink: 0; }
.engine-badge {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}
.engine-caret {
    color: var(--text-faint);
    transition: transform 0.2s ease;
}
.engine-caret.flip { transform: rotate(180deg); }
.engine-list {
    position: absolute;
    top: 48px;
    left: 0;
    background: var(--dropdown-bg);
    border: 1px solid var(--card-border-hover);
    border-radius: 14px;
    padding: 6px;
    min-width: 168px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-glow);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.engine-list.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.engine-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-6px);
}
.engine-list.active .engine-item {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s, color 0.2s;
}
.engine-list.active .engine-item:nth-child(1) { transition-delay: 0.03s; }
.engine-list.active .engine-item:nth-child(2) { transition-delay: 0.07s; }
.engine-list.active .engine-item:nth-child(3) { transition-delay: 0.11s; }
.engine-list.active .engine-item:nth-child(4) { transition-delay: 0.15s; }
.engine-list.active .engine-item:nth-child(5) { transition-delay: 0.19s; }
.engine-item:hover {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent);
    transform: translateX(3px);
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font-size: 16px;
    padding: 12px 8px;
    min-width: 0;
}
.search-input::placeholder { color: var(--text-faint); }
.search-kbd {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 2px 7px;
    margin-right: 6px;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.search-box:focus-within .search-kbd { opacity: 0; }
.search-clear {
    border: none;
    background: rgba(128, 128, 128, 0.15);
    color: var(--text-main);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.search-clear:hover { background: rgba(128, 128, 128, 0.3); transform: scale(1.1); }
.search-btn {
    border: none;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}
.search-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.08);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}
.search-btn:active { transform: scale(0.96); }

/* ---------- 7. Bento 卡片 ---------- */
.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    perspective: 1200px;
}
.bento-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(0.94);
    filter: blur(6px);
    animation: slideUp 0.7s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    will-change: transform, opacity, filter;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* 时钟卡 */
.clock-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 26px;
    min-height: 150px;
    animation-delay: 0.06s;
}
.card-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 6px;
}
.clock-card .clock {
    font-family: var(--font-mono);
    font-size: 38px;
    font-weight: 300;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
    line-height: 1.1;
    text-shadow: 0 0 24px var(--accent-glow);
    animation: clockGlow 4s ease-in-out infinite;
}
@keyframes clockGlow {
    0%, 100% { text-shadow: 0 0 14px var(--accent-glow); }
    50%      { text-shadow: 0 0 30px var(--accent-glow); }
}
.clock-card .date {
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-top: 8px;
}

/* 导航子站卡 */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    padding: 24px 26px;
    min-height: 150px;
    cursor: pointer;
    color: var(--text-main);
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out, background 0.3s ease,
                border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav-item:hover {
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 25px var(--accent-glow);
}
.nav-item:active { transform: scale(0.96) !important; }
.nav-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    object-fit: contain;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-item:hover .nav-icon { transform: scale(1.12) rotate(-5deg); }
.nav-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 16px var(--accent-glow);
}
.nav-label {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    word-break: break-all;
    line-height: 1.3;
    color: var(--text-main);
}
.nav-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
}
.nav-hotkey {
    position: absolute;
    top: 12px;
    right: 14px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-faint);
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 2px 7px;
    opacity: 0;
    transition: opacity 0.3s;
}
.nav-item:hover .nav-hotkey { opacity: 1; }

/* 卡片旋转渐变边框（hover 时出现，仅子站卡） */
.nav-item::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(from var(--angle, 0deg),
        var(--accent-strong), var(--accent-2), var(--accent-3), var(--accent-strong));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderSpin 3s linear infinite;
    pointer-events: none;
}
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes borderSpin {
    to { --angle: 360deg; }
}
.nav-item:hover::before { opacity: 1; }

/* 入场交错动画 */
@keyframes slideUp {
    0%   { opacity: 0; transform: translateY(34px) scale(0.92); filter: blur(8px); }
    55%  { opacity: 1; transform: translateY(-6px) scale(1.02); filter: blur(0); }
    75%  { transform: translateY(3px) scale(0.99); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ---------- 8. 雪花 / 彩蛋 ---------- */
.snow-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}
.snowflake {
    position: absolute;
    top: -10vh;
    color: var(--flake-color);
    text-shadow: var(--flake-shadow);
    user-select: none;
    animation: fall linear forwards;
    z-index: 5;
    will-change: transform, left;
    filter: blur(var(--flake-blur, 0px));
}
@keyframes fall {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(var(--sway1, 15px), 27vh) rotate(var(--spin1, 90deg)); }
    50%  { transform: translate(var(--sway2, -20px), 55vh) rotate(var(--spin2, 180deg)); }
    75%  { transform: translate(var(--sway3, 18px), 82vh) rotate(var(--spin3, 270deg)); }
    100% { transform: translate(var(--sway4, -12px), 110vh) rotate(var(--spin4, 360deg)); }
}
.cursor-flake {
    position: fixed;
    pointer-events: none;
    color: var(--flake-color);
    font-size: 12px;
    z-index: 9998;
    text-shadow: var(--flake-burst-shadow);
    animation: cursorFlakeFade 1s ease-out forwards;
}
@keyframes cursorFlakeFade {
    0%   { opacity: 0.85; transform: translate(-50%, -50%) scale(0.6) rotate(0deg); }
    100% { opacity: 0;    transform: translate(-50%, 20px)  scale(0.3) rotate(180deg); }
}
.burst-flake {
    position: fixed;
    pointer-events: none;
    color: var(--flake-color);
    font-size: 14px;
    z-index: 9998;
    text-shadow: var(--flake-burst-shadow);
    animation: burstFlake 0.9s ease-out forwards;
}
@keyframes burstFlake {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.4) rotate(0deg); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(540deg); }
}

/* ---------- 9. 页脚（备案） ---------- */
#gb {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 40px 0 32px;
    width: 100%;
    z-index: 10;
    position: relative;
}
#gb a {
    font-size: 12px;
    color: var(--text-faint);
    text-decoration: none;
    display: flex;
    align-items: center;
    opacity: 0.85;
    transition: 0.3s;
}
#gb a:hover { opacity: 1; color: var(--accent); }
#gb img { height: 16px; margin-right: 8px; }
.beian-fallback { height: 16px; width: 16px; margin-right: 8px; flex-shrink: 0; }

/* ---------- 9.6 歌词播放层 ---------- */
.song-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(60vw 40vw at 15% 20%, rgba(56, 189, 248, 0.14), transparent 60%),
        radial-gradient(50vw 40vw at 85% 70%, rgba(167, 139, 250, 0.14), transparent 60%),
        rgba(4, 8, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: overlayIn 0.4s ease both;
}
@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.song-stage {
    position: relative;
    text-align: center;
    max-width: 680px;
    width: 90%;
    padding: 50px 24px 40px;
    animation: stageIn 0.5s cubic-bezier(0.2, 1, 0.3, 1) both;
}
@keyframes stageIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.song-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #93a1b6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s, border-color 0.25s, transform 0.4s;
}
.song-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.32);
    transform: rotate(90deg);
}
.song-meta { margin-bottom: 8px; }
.song-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #e6edf7;
    margin-bottom: 6px;
}
.song-artist {
    font-size: 13px;
    color: #93a1b6;
    letter-spacing: 1px;
}
.lyrics-viewport {
    position: relative;
    height: 320px;
    overflow: hidden;
    margin: 24px 0 16px;
    cursor: grab;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
    touch-action: pan-y;
}
.lyrics-viewport:active { cursor: grabbing; }
.lyrics-list {
    transition: transform 0.45s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: transform;
}
.lyrics-list.dragging { transition: none; }
.lyric-line {
    font-size: clamp(14px, 4.2vw, 19px);
    letter-spacing: 1px;
    line-height: 1.45;
    padding: 11px 0;
    color: rgba(255, 255, 255, 0.28);
    opacity: 0.35;
    transform: scale(0.94);
    transition: color 0.45s ease, font-size 0.45s ease, opacity 0.45s ease, transform 0.45s ease;
    white-space: nowrap;
}
.lyric-line.past {
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.55;
}
.lyric-line.current {
    font-size: clamp(16px, 5.2vw, 26px);
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(120deg, #7dd3fc, #a78bfa, #f0abfc, #7dd3fc);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 20px rgba(125, 211, 252, 0.45));
    animation: lyricPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), lyricFlow 3s linear infinite;
}
@keyframes lyricPop {
    0%   { transform: scale(0.7) translateY(12px); opacity: 0; }
    55%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes lyricFlow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
.spectrum {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 56px;
    margin: 0 auto 18px;
}
.spectrum-bar {
    width: 4px;
    height: 8%;
    border-radius: 2px;
    background: linear-gradient(180deg, #a78bfa, #38bdf8);
    transition: height 0.08s linear;
}
.song-progress {
    width: 240px;
    height: 3px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
}
.song-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #a78bfa);
    border-radius: 2px;
    transition: width 0.3s linear;
}

/* ---------- 10. 响应式与动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
@media (max-width: 860px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .greeting { font-size: 28px; }
    .topbar { padding: 18px 20px 0; }
}
@media (max-width: 520px) {
    .bento { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .bento-card { padding: 20px 18px; min-height: 130px; }
    .clock-card .clock { font-size: 30px; }
    .greeting { font-size: 24px; }
    .content { padding-top: 36px; }
    .brand-name { font-size: 16px; }
    .search-kbd { display: none; }
    .lyrics-viewport { height: 260px; }
    .song-stage { padding: 40px 16px 32px; }
    .song-title { font-size: 20px; }
}
