﻿*{
    padding: 0;
    margin: 0;
    list-style: none;
    box-sizing: border-box;
}
::-webkit-scrollbar{ display: none; }
*{ scrollbar-width: none; }
body{
    background: #0a0a14;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* 欢迎遮罩 */
#welcome-overlay{
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #0a0a14;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
#welcome-text{
    font-family: 'Ma Shan Zheng', cursive;
    font-size: clamp(28px, 5vw, 48px);
    color: #c084fc;
    letter-spacing: 4px;
    animation: welcomePulse 1.8s ease-in-out infinite;
}
@keyframes welcomePulse{
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.06); }
}
@keyframes itemSpawnPulse{
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.12); }
}
@keyframes killShake{
    0%   { transform: translateX(0); }
    15%  { transform: translateX(-4px) translateY(2px); }
    30%  { transform: translateX(4px) translateY(-2px); }
    45%  { transform: translateX(-3px); }
    60%  { transform: translateX(3px); }
    75%  { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}
.kill-shake{ animation: killShake 0.4s ease-out; }
.title-add{
    font-family: 'Ma Shan Zheng', 楷体, cursive;
    font-size: 65px;
    text-align: center;
    height: 120px;
    line-height: 120px;
    background: linear-gradient(135deg, #c084fc, #a855f7, #7c3aed, #581c87);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.6))
            drop-shadow(0 0 24px rgba(139, 92, 246, 0.3));
    letter-spacing: 12px;
    transition: filter 0.3s ease;
    position: relative;
}
.title-add:hover{
    filter: drop-shadow(0 0 18px rgba(192, 132, 252, 0.8))
            drop-shadow(0 0 36px rgba(168, 85, 247, 0.5));
}
#version-badge{
    position: absolute;
    top: 18px;
    left: 93px;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    background: linear-gradient(180deg, #ef4444 0%, #f87171 40%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 6px rgba(239,68,68,0.5));
    animation: heartbeat 1.2s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartbeat{
    0%, 100% { transform: scale(1); }
    15%      { transform: scale(1.22); }
    30%      { transform: scale(1); }
    45%      { transform: scale(1.14); }
    60%      { transform: scale(1); }
}
#version-badge:hover{
    filter: drop-shadow(0 0 12px rgba(239,68,68,0.7));
}

/* ========== 主菜单新布局 ========== */
#box-add{
    display: flex;
    background: linear-gradient(135deg, #0c0a1a 0%, #0f1025 40%, #0a0f1f 100%);
    min-height: 100vh;
    overflow: hidden;
}
#menu-left{
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
#deco-canvas{
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
#menu-right{
    width: 340px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px;
    gap: 8px;
    background: rgba(15,16,37,0.85);
    border-left: 1px solid rgba(124,58,237,0.2);
    overflow-y: auto;
    max-height: 100vh;
    box-shadow: -4px 0 24px rgba(124,58,237,0.08);
    z-index: 10;
}
#menu-right .title-add{
    font-size: 52px;
    height: auto;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 4px;
}
.menu-btn-start{
    display: block;
    width: 100%;
    padding: 18px;
    margin: 6px 0 2px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 6px;
    cursor: pointer;
    transition: all 0.25s;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}
.menu-btn-start:hover{
    box-shadow: 0 0 24px rgba(124,58,237,0.5);
    transform: scale(1.02);
}
.menu-info-row{
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 4px 0 8px;
}
#points-display, #checkin-days-display{
    font-size: 13px;
    color: #93c5fd;
    font-weight: bold;
    letter-spacing: 1px;
}
.menu-nav-list{
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.menu-nav-item{
    padding: 11px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    color: #c4b5fd;
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.15);
    transition: all 0.2s;
    position: relative;
}
.menu-nav-item:hover{
    background: rgba(124,58,237,0.2);
    border-color: rgba(124,58,237,0.4);
    color: #e0d5ff;
    box-shadow: 0 0 12px rgba(124,58,237,0.2);
}
.menu-nav-ver{
    color: #60a5fa;
    border-color: rgba(59,130,246,0.2);
    background: rgba(59,130,246,0.06);
}
.menu-nav-ver:hover{
    color: #93c5fd;
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 0 12px rgba(59,130,246,0.2);
}
/* ========== 分类导航（新） ========== */
.menu-nav-category{
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: left;
    color: #e0d5ff;
    background: rgba(124,58,237,0.15);
    border: 1px solid rgba(124,58,237,0.25);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.menu-nav-category:hover{
    background: rgba(124,58,237,0.25);
    border-color: rgba(124,58,237,0.4);
    box-shadow: 0 0 12px rgba(124,58,237,0.2);
}
.menu-nav-category.open{
    border-color: rgba(124,58,237,0.4);
    background: rgba(124,58,237,0.22);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.cat-arrow{
    display: inline-block;
    font-size: 11px;
    transition: transform 0.25s ease;
    color: #a78bfa;
    line-height: 1;
}
.menu-nav-category.open .cat-arrow{
    transform: rotate(90deg);
}
.category-sub{
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 4px 0 4px 14px;
    margin-bottom: 2px;
    background: rgba(124,58,237,0.03);
    border: 1px solid rgba(124,58,237,0.12);
    border-top: none;
    border-radius: 0 0 8px 8px;
    animation: catSlideIn 0.2s ease;
}
.category-sub.open{
    display: flex;
}
@keyframes catSlideIn{
    from{ opacity: 0; transform: translateY(-6px); }
    to{ opacity: 1; transform: translateY(0); }
}
.category-sub .menu-nav-item{
    padding: 8px 16px;
    font-size: 13px;
    background: transparent;
    border: none;
    border-radius: 6px;
    text-align: left;
    letter-spacing: 1px;
}
.category-sub .menu-nav-item:hover{
    background: rgba(124,58,237,0.12);
    border: none;
    box-shadow: none;
}
/* 版本号 */
#version-display{
    text-align: center;
    margin-top: auto;
    padding: 12px 0 4px;
    font-family: 楷体, KaiTi, serif;
    font-size: 14px;
    color: #c0c0c0;
    letter-spacing: 2px;
    opacity: 0.7;
}
/* ========== 弹窗 ========== */
.modal-overlay{
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 10, 20, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active{ display: flex; }
.modal-box{
    width: 520px; height: 520px;
    background: #12122a;
    border: 2px solid #7c3aed;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3), inset 0 0 20px rgba(124, 58, 237, 0.05);
    border-radius: 8px;
    position: relative;
    padding: 40px 36px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.9;
    overflow-y: auto;
    animation: modalIn 0.25s ease;
}
@keyframes modalIn{
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.modal-close{
    position: absolute;
    top: 10px; right: 18px;
    font-size: 28px;
    color: #a78bfa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.modal-close:hover{ color: #c084fc; }
.modal-content h3{
    font-size: 22px;
    color: #c084fc;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 3px;
}
.modal-content .highlight{ color: #38bdf8; font-weight: bold; }
.modal-box.disclaimer p{ color: #fbbf24; }
.modal-content img{
    display: block;
    width: 260px; height: 260px;
    margin: 20px auto 0;
    border-radius: 8px;
    border: 1px solid #374151;
}

/* 调试按钮 */
#debug-btn{
    display: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, box-shadow 0.2s;
}
#debug-btn:hover{
    background: rgba(124, 58, 237, 0.25);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}
#debug-btn.show{ display: inline-block; }

/* 浮动调试面板 */
#debug-backdrop{
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
}
#debug-backdrop.show{ display: block; }
#debug-float{
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-height: 70vh;
    background: #12122a;
    border: 2px solid #7c3aed;
    border-radius: 12px;
    z-index: 10001;
    padding: 20px 24px;
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
    overflow-y: auto;
}
#debug-float.show{ display: block; }
.debug-float-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    color: #c084fc;
    font-size: 18px;
    letter-spacing: 3px;
}
#debug-float-close{
    background: none;
    border: none;
    color: #a78bfa;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
#debug-float-close:hover{ color: #c084fc; }

/* 调试面板 */
.debug-panel{
    margin-top: 4px;
}
.debug-row{
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 4px 0;
}
.debug-label{
    width: 90px;
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
    cursor: default;
}
.debug-slider{
    flex: 1;
    accent-color: #7c3aed;
    height: 20px;
    cursor: pointer;
}
.debug-val{
    width: 38px;
    font-size: 12px;
    color: #fbbf24;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.debug-reset{
    display: block;
    margin: 14px auto 0;
    padding: 8px 28px;
    font-size: 13px;
    background: transparent;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    color: #fbbf24;
    cursor: pointer;
    letter-spacing: 2px;
    transition: background 0.2s;
}
.debug-reset:hover{
    background: rgba(251, 191, 36, 0.15);
}

/* 皮肤商城 */
.skin-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.skin-slot{
    aspect-ratio: 1;
    background: #0f0f20;
    border: 2px dashed #374151;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.skin-slot:hover{
    border-color: #a78bfa;
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.5);
    animation: skinSpin 0.4s ease-out;
}
@keyframes skinSpin{
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes skinSpinRev{
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}
.skin-slot small{
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.2;
}
.skin-thumb{
    display: block;
    border-radius: 4px;
}
.skin-slot.owned{ border-color: #7c3aed; border-style: solid; }
.skin-slot.equipped{ border-color: #fbbf24; border-style: solid; box-shadow: 0 0 10px rgba(251,191,36,0.3); }
.coll-tab{
    padding: 6px 14px;
    background: rgba(55,65,81,0.5);
    border: 1px solid #4b5563;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.coll-tab:hover{ background: rgba(124,58,237,0.3); border-color: #7c3aed; color: #c4b5fd; }
.coll-tab-active{ background: #7c3aed; border-color: #7c3aed; color: #fff; }

/* 美术馆 */
.gal-sfx-btn{
    padding:5px 10px;margin:2px;
    background:#374151;border:1px solid #4b5563;border-radius:4px;
    color:#e2e8f0;cursor:pointer;font-size:12px;
    transition:all 0.2s;
}
.gal-sfx-btn:hover{
    background:#4b5563;border-color:#7c3aed;color:#c4b5fd;
    box-shadow:0 0 8px rgba(124,58,237,0.3);
}
.gal-sfx-btn:active{ transform:scale(0.95); }
.gal-sfx-btn.playing{ background:#7c3aed;border-color:#7c3aed;color:#fff; }
.gal-music-row{
    display:flex;align-items:center;justify-content:space-between;
    padding:8px 12px;border-bottom:1px solid rgba(55,65,81,0.3);
    transition:background 0.2s;cursor:default;border-radius:4px;
}
.gal-music-row:hover{ background:rgba(124,58,237,0.1); }
.gm-btn{
    padding:5px 14px;background:#7c3aed;border:none;border-radius:6px;
    color:#fff;cursor:pointer;font-size:12px;transition:all 0.2s;
}
.gm-btn:hover{ filter:brightness(1.2);box-shadow:0 0 8px rgba(124,58,237,0.4); }
.gm-btn:active{ transform:scale(0.95); }
.gal-skin-cell{
    text-align:center;background:rgba(55,65,81,0.3);border-radius:4px;
    padding:4px;transition:all 0.2s;cursor:default;
}
.gal-skin-cell:hover{
    background:rgba(124,58,237,0.2);
    box-shadow:0 0 10px rgba(124,58,237,0.3);
    transform:scale(1.05);
}
.gal-item-cell{
    text-align:center;background:rgba(55,65,81,0.3);border-radius:8px;
    padding:12px;transition:all 0.2s;cursor:default;
}
.gal-item-cell:hover{
    background:rgba(124,58,237,0.15);
    box-shadow:0 0 12px rgba(124,58,237,0.25);
    transform:scale(1.05);
}
.gal-item-cell img{ transition:transform 0.3s;image-rendering:pixelated; }
.gal-item-cell:hover img{ transform:scale(1.12); }
.gal-cat-title{
    color:#fbbf24;font-size:13px;font-weight:bold;
    margin-bottom:4px;border-bottom:1px solid rgba(251,191,36,0.2);padding-bottom:2px;
}
.gal-col-title{
    color:#c084fc;font-size:14px;font-weight:bold;
    margin-bottom:6px;border-bottom:1px solid rgba(192,132,252,0.2);padding-bottom:2px;
}
/* 美术馆 下载 & 布局 */
.gal-sfx-wrap{
    display:inline-flex;align-items:center;gap:4px;
    margin:2px;padding:3px 6px 3px 2px;
    background:rgba(55,65,81,0.3);border:1px solid transparent;
    border-radius:6px;transition:all 0.2s;
}
.gal-sfx-wrap:hover{ border-color:#4b5563;background:rgba(55,65,81,0.5); }
.gal-sfx-name{ color:#cbd5e1;font-size:12px; }
.gal-dl-btn{
    padding:2px 6px;background:transparent;border:1px solid #4b5563;
    border-radius:4px;color:#6b7280;cursor:pointer;font-size:11px;
    transition:all 0.2s;line-height:1.4;
}
.gal-dl-btn:hover{ color:#34d399;border-color:#34d399;background:rgba(52,211,153,0.1); }
.gal-dl-btn:active{ transform:scale(0.9); }
.gal-music-actions{ display:inline-flex;align-items:center;gap:6px; }

/* 排名表格 */
.rank-table{
    width: 100%;
    font-size: 14px;
}
.rank-header{
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    color: #a78bfa;
    font-weight: bold;
    border-bottom: 1px solid #374151;
    letter-spacing: 2px;
}
.rank-row{
    display: flex;
    justify-content: space-between;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.3);
    color: #a78bfa;
    transition: background 0.2s;
}
.rank-row:hover{ background: rgba(124, 58, 237, 0.08); }
.rank-row.player{
    color: #fbbf24;
    font-weight: bold;
    background: rgba(251, 191, 36, 0.06);
}
.rank-num{ width: 60px; text-align: left; }
.rank-name{ flex: 1; text-align: center; }
.rank-time{ width: 90px; text-align: right; font-variant-numeric: tabular-nums; }

/* ========== 游戏界面 ========== */
#game-screen{
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #000;
    z-index: 2000;
    overflow: hidden;
}
#game-screen.active{ display: block; }

#game-inner{
    width: 100%; height: 100%;
    transform-origin: center center;
    transition: transform 0.6s ease;
}

/* 倒计时 — 全屏加载 */
#countdown{
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    pointer-events: none;
}
#countdown.active{ display: block; }
#countdown-bg{
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 10, 20, 0.85);
}
#countdown-content{
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10% 12%;
}
#countdown-tip-section{
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}
#countdown-tip-label{
    color: #a78bfa;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 2px;
}
#countdown-tip-text{
    color: #e2e8f0;
    font-size: clamp(14px, 2.5vw, 22px);
    line-height: 1.6;
    font-family: 'Ma Shan Zheng', cursive, sans-serif;
    text-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}
#countdown-preview-wrap{
    width: 280px; height: 280px;
    margin: 10px auto 30px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(192,132,252,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}
#countdown-preview{
    width: 280px; height: 280px;
}
#countdown-bar-section{
    width: 80%;
    max-width: 400px;
    margin: 0 auto;
}
#countdown-bar-track{
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
}
#countdown-bar-fill{
    width: 0%;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
    transition: width 3s linear;
}

/* HUD */
#game-hud{
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    padding: 16px 20px;
    z-index: 5;
    pointer-events: none;
    justify-content: space-between;
    align-items: center;
}
#game-hud.active{ display: flex; }

/* HUD 提示栏 */
#hud-notify{
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;
    pointer-events: none;
    min-height: 22px;
    line-height: 22px;
}
#hud-notify .notify-msg{
    display: inline-block;
    animation: notifyIn 0.3s ease, notifyOut 0.5s ease 1s forwards;
}
#hud-notify .notify-msg.persist{
    animation: notifyIn 0.3s ease;
}
@keyframes notifyIn{
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes notifyOut{
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(-6px); }
}
.notify-red    { color: #ef4444; text-shadow: 0 0 8px rgba(239,68,68,0.4); }
.notify-green  { color: #34d399; text-shadow: 0 0 8px rgba(52,211,153,0.4); }
.notify-gold   { color: #fbbf24; text-shadow: 0 0 8px rgba(251,191,36,0.4); }
.notify-purple { color: #c084fc; text-shadow: 0 0 8px rgba(192,132,252,0.4); }

#hp-display{
    display: flex;
    gap: 6px;
}
.heart-icon{
    display: inline-block;
    width: 32px; height: 32px;
    background: #ef4444;
    clip-path: path('M16 28 C8 18 0 12 0 6 C0 2 3 0 6 0 C8.5 0 12 2 16 6 C20 2 23.5 0 26 0 C29 0 32 2 32 6 C32 12 24 18 16 28Z');
    transition: opacity 0.3s;
}
.heart-icon.lost{ opacity: 0.15; }
#pause-btn{
    display: none;
    margin-top: 6px;
    padding: 3px 12px;
    font-size: 12px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 4px;
    color: #a78bfa;
    cursor: pointer;
    letter-spacing: 2px;
    transition: background 0.2s;
    pointer-events: auto;
}
#pause-btn:hover{ background: rgba(124, 58, 237, 0.3); }
#pause-btn.show{ display: block; }

#special-count{
    font-size: 10px;
    color: #a855f7;
    letter-spacing: 1px;
    text-align: right;
    margin-top: 1px;
}
#monster-speed{
    font-size: 10px;
    color: #f59e0b;
    letter-spacing: 1px;
    text-align: right;
    margin-top: 1px;
    font-variant-numeric: tabular-nums;
}
#diff-indicator{
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: right;
    margin-top: 1px;
}
#diff-indicator.easy{ color: #3b82f6; }
#diff-indicator.normal{ color: #34d399; }
#diff-indicator.hard{ color: #ef4444; }

#monster-count{
    font-size: 14px;
    font-weight: bold;
    color: #94a3b8;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
#timer-display{
    font-size: 22px;
    font-weight: bold;
    color: #a78bfa;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    transition: color 0.4s;
}
#timer-display.record{
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}
#record-indicator{
    display: none;
    font-size: 16px;
    font-weight: bold;
    color: #fbbf24;
    letter-spacing: 2px;
    animation: recordPulse 0.5s ease-in-out infinite alternate;
    margin-right: 8px;
}
#record-indicator.show{ display: inline; }
#game-points-display{
    font-size: 13px;
    font-weight: bold;
    color: #fbbf24;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    transition: transform 0.2s, color 0.3s;
    min-height: 18px;
}
#game-points-display.pop{ transform: scale(1.25); color: #fde68a; }
#rank-points-display{
    font-size: 13px;
    font-weight: bold;
    color: #34d399;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    transition: transform 0.2s, color 0.3s;
    min-height: 18px;
}
#rank-points-display.pop{ transform: scale(1.25); }

/* Canvas */
#game-canvas{
    display: block;
    width: 100%; height: 100%;
    touch-action: none;
}

/* 成就列表滚动条 */
.ach-list::-webkit-scrollbar {
  width: 6px;
}
.ach-list::-webkit-scrollbar-track {
  background: rgba(55,65,81,0.2);
  border-radius: 3px;
}
.ach-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c3aed, #a855f7);
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(168,85,247,0.5);
}
.ach-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9333ea, #c084fc);
}
/* Firefox */
.ach-list {
  scrollbar-width: thin;
  scrollbar-color: #a855f7 rgba(55,65,81,0.2);
}

/* 鸣谢名单 - 轮播 */
.credits-carousel {
  position: relative;
  overflow: hidden;
  height: 300px;
  margin: 16px 0 8px;
}
.credits-carousel:has(.credits-name:hover, .credits-names:hover) .credits-track {
  animation-play-state: paused;
}
.credits-carousel:has(.credits-name:hover, .credits-names:hover) .credits-dot {
  animation-play-state: paused;
}
.credits-track {
  animation: creditsRotate 9s ease-in-out infinite;
}
.credits-slide {
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-sizing: border-box;
}
.credits-label {
  color: #a78bfa;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0.7;
}
.credits-name {
  color: #c4b5fd;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 3px;
}
.credits-name.highlight {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 36px;
  text-shadow: none;
  filter: drop-shadow(0 0 12px rgba(251,191,36,0.3));
  transition: filter 0.3s ease;
  cursor: default;
}
.credits-name.highlight:hover {
  filter: drop-shadow(0 0 24px rgba(251,191,36,0.7)) drop-shadow(0 0 48px rgba(251,191,36,0.3));
}
.credits-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
}
.credits-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 20px;
  color: #c4b5fd;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.3s ease;
  cursor: default;
}
.credits-tag:hover {
  background: rgba(168,85,247,0.25);
  border-color: #a855f7;
  box-shadow: 0 0 20px rgba(168,85,247,0.4), 0 0 40px rgba(168,85,247,0.15);
  color: #fff;
  transform: scale(1.05);
}
.credits-tag.gold {
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.4);
  color: #fbbf24;
  font-weight: bold;
}
.credits-tag.gold:hover {
  background: rgba(251,191,36,0.25);
  border-color: #fbbf24;
  box-shadow: 0 0 20px rgba(251,191,36,0.4), 0 0 40px rgba(251,191,36,0.15);
  color: #fff;
}
.credits-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.credits-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(168,85,247,0.3);
  animation: creditsDot 18s ease-in-out infinite;
}
.credits-dot.active {
  background: #a855f7;
  box-shadow: 0 0 6px rgba(168,85,247,0.6);
}
.credits-dot:nth-child(1) { animation-delay: 0s; }
.credits-dot:nth-child(2) { animation-delay: 3s; }
.credits-dot:nth-child(3) { animation-delay: 6s; }
@keyframes creditsRotate {
  0%, 22% { transform: translateY(0); }
  33.3%, 55.3% { transform: translateY(-300px); }
  66.6%, 88.6% { transform: translateY(-600px); }
  100% { transform: translateY(0); }
}
@keyframes creditsDot {
  0%, 22% { background: #a855f7; box-shadow: 0 0 6px rgba(168,85,247,0.6); }
  33.3%, 100% { background: rgba(168,85,247,0.3); box-shadow: none; }
}

/* 成就提示 */
.ach-toast{
    position: fixed;
    bottom: 0; right: 0;
    width: 240px; height: 40px;
    color: #fbbf24;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 6px 0 0 0;
    z-index: 10002;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 38px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(270deg, #7c3aed, #9333ea, #a855f7, #7c3aed);
    background-size: 300% 100%;
    animation: achSlideIn 0.4s ease, achFlow 2s linear infinite, achFadeOut 0.5s ease 10s forwards;
    box-shadow: 0 0 10px rgba(255,255,255,0.25), 0 0 20px rgba(168,85,247,0.4);
}
@keyframes achSlideIn{
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes achFlow{
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
@keyframes achFadeOut{
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(-10px); }
}
.ach-new{
    animation: achBounce 0.5s ease-in-out infinite alternate;
}
@keyframes achBounce{
    from { transform: translateY(0); }
    to   { transform: translateY(-3px); }
}
.nav-notify{
    color: #fbbf24 !important;
    animation: navBounce 0.4s ease-in-out infinite alternate;
}
@keyframes navBounce{
    from { transform: translateY(0); }
    to   { transform: translateY(-3px); }
}
.menu-nav-item.need-checkin{
    color: #ef4444 !important;
    animation: checkinBounce 0.6s ease-in-out infinite alternate;
    text-shadow: 0 0 8px rgba(239,68,68,0.3);
}
@keyframes checkinBounce{
    from { transform: translateY(0); }
    to   { transform: translateY(-5px); }
}

/* 难度选择 */
.diff-option:hover{
    background: rgba(255,255,255,0.03);
}

/* Game Over */
#game-over-screen{
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 15;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
}
#game-over-screen.active{ display: flex; }
.game-over-text{
    font-size: 24px;
    color: #a78bfa;
    letter-spacing: 6px;
}
.game-over-time{
    font-size: 80px;
    font-weight: 900;
    color: #c084fc;
    letter-spacing: 8px;
    font-variant-numeric: tabular-nums;
}
.best-time-text{
    font-size: 20px;
    color: #fbbf24;
    letter-spacing: 3px;
    font-variant-numeric: tabular-nums;
}
#new-record{
    display: none;
    font-size: 28px;
    color: #fbbf24;
    letter-spacing: 6px;
    animation: recordPulse 0.6s ease-in-out infinite alternate;
}
@keyframes recordPulse{
    from { transform: scale(1); text-shadow: 0 0 8px #fbbf24; }
    to   { transform: scale(1.08); text-shadow: 0 0 18px #fbbf24; }
}
#new-record.show{ display: block; }
#restart-btn{
    margin-top: 20px;
    padding: 14px 48px;
    font-size: 20px;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
#restart-btn:hover{ box-shadow: 0 0 20px rgba(124, 58, 237, 0.5); }

#home-btn{
    padding: 10px 32px;
    font-size: 16px;
    letter-spacing: 3px;
    background: transparent;
    border: 1px solid #7c3aed;
    border-radius: 8px;
    color: #a78bfa;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
#home-btn:hover{ background: rgba(124, 58, 237, 0.15); color: #c084fc; }

/* 排名 & 成就角标 */
#rank-badge, #ach-badge{
    display: none;
    position: absolute;
    top: -6px; right: -4px;
    font-size: 16px;
    background: rgba(239,68,68,0.15);
    color: #f87171;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 1px 6px;
    border-radius: 4px;
    animation: badgeBounce 0.5s ease-in-out infinite alternate;
    white-space: nowrap;
    pointer-events: none;
}
@keyframes badgeBounce{
    from { transform: translateY(0); opacity: 0.8; }
    to   { transform: translateY(-4px); opacity: 1; }
}
#rank-badge.show, #ach-badge.show{ display: inline-block; }

/* 统计内容分类提示 */
#stats-cat-notify {
    display: none;
    font-size: 11px;
    background: rgba(239,68,68,0.12);
    color: #f87171;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 1px;
    animation: badgeBounce 0.5s ease-in-out infinite alternate;
    white-space: nowrap;
    pointer-events: none;
    vertical-align: middle;
}
#stats-cat-notify.show { display: inline-block; }

/* 音乐厅柱状图跳动 */
@keyframes barDance{
    0%, 100%{ height: 8px; }
    50%{ height: 20px; }
}

/* PC 提示 Toast */
#pc-toast{
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(18, 18, 42, 0.95);
    border: 1px solid #7c3aed;
    color: #cbd5e1;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    letter-spacing: 2px;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.25);
    animation: toastFade 2.5s ease forwards;
}
@keyframes toastFade{
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    15%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    75%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) translateY(-10px); }
}
#pc-toast.show{ display: block; }

/* 缩放警告 Toast */
#zoom-warn{
    display: none;
    position: fixed;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(180, 30, 30, 0.9);
    color: #fecaca;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 9999;
    pointer-events: none;
    animation: zoomWarnFlash 0.5s ease 3;
}
@keyframes zoomWarnFlash{
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}
#zoom-warn.show{ display: block; }
