/* game_common.css - 小游戏共用样式 */
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh; color:#e2e8f0; overflow-x:hidden;
}

/* ===== 导航栏 ===== */
.nav-bar {
    position:fixed; top:0; left:0; right:0; z-index:999;
    background: rgba(15,23,42,.92); backdrop-filter: blur(20px);
    border-bottom:1px solid rgba(99,102,241,.2);
    padding:0 24px; height:60px; display:flex; align-items:center;
    justify-content:space-between;
}
.nav-brand { display:flex; align-items:center; gap:10px; font-size:1.3rem; font-weight:800; }
.nav-brand span:first-child {
    width:36px; height:36px; background:linear-gradient(135deg,#6366f1,#a855f7);
    border-radius:10px; display:flex; align-items:center; justify-content:center;
    font-size:.9rem; color:#fff;
}
.nav-links { display:flex; gap:4px; }
.nav-links a {
    padding:8px 18px; text-decoration:none; color:#94a3b8; font-size:.9rem;
    border-radius:8px; transition:all .25s ease; font-weight:500;
}
.nav-links a:hover, .nav-links a.active { color:#fff; background:rgba(99,102,241,.15); }

/* ===== 返回按钮 ===== */
.back-btn {
    display:inline-flex; align-items:center; gap:6px;
    padding:10px 22px; background:rgba(99,102,241,.15); color:#a5b4fc;
    border:1px solid rgba(99,102,241,.25); border-radius:10px;
    cursor:pointer; font-size:.88rem; font-weight:600; transition:all .25s;
    text-decoration:none; margin:0 auto 14px;
}
.back-btn:hover { background:rgba(99,102,241,.28); color:#fff; }

/* ===== 游戏容器 ===== */
#gameCanvasWrap {
    max-width:700px; margin:0 auto; background:rgba(15,23,42,.7);
    border-radius:20px; border:1px solid rgba(99,102,241,.2);
    overflow:hidden; position:relative;
}
.game-hud {
    display:flex; justify-content:space-between; align-items:center;
    padding:14px 20px; background:rgba(15,23,42,.8);
    border-bottom:1px solid rgba(99,102,241,.15);
}
.hud-item { display:flex; flex-direction:column; align-items:center; gap:2px; }
.hud-label { font-size:.72rem; color:#64748b; text-transform:uppercase; letter-spacing:1px; font-weight:600; }
.hud-value { font-size:1.35rem; font-weight:800; }
.hud-value.score { color:#fbbf24; text-shadow:0 0 12px rgba(251,191,36,.4); }
.hud-value.time { color:#60a5fa; text-shadow:0 0 12px rgba(96,165,250,.4); }
.hud-value.combo { color:#f472b6; text-shadow:0 0 12px rgba(244,114,182,.4); }

/* ===== 游戏区域 ===== */
.game-area { position:relative; width:100%; aspect-ratio:4/3; overflow:hidden; touch-action:none; user-select:none; }

/* ===== 开始覆盖层 ===== */
.start-overlay {
    position:absolute; inset:0; background:rgba(15,23,42,.95);
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    z-index:90;
}
.start-overlay.hidden { display:none; }
.start-icon { font-size:4.5rem; margin-bottom:16px; animation:bounceIn .6s ease; }
@keyframes bounceIn {
    0%{transform:scale(0); opacity:0;} 60%{transform:scale(1.15);} 100%{transform:scale(1); opacity:1;}
}
.start-title { font-size:1.6rem; font-weight:800; margin-bottom:8px; }
.start-desc { font-size:.88rem; color:#94a3b8; margin-bottom:24px; max-width:280px; text-align:center; line-height:1.5; }

/* ===== 游戏结束弹窗 ===== */
.game-over-modal {
    position:absolute; inset:0; background:rgba(15,23,42,.92); backdrop-filter:blur(10px);
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    z-index:100; animation:fadeIn .3s ease;
}
.game-over-modal.hidden { display:none; }
.go-emoji { font-size:4rem; margin-bottom:12px; }
.go-title { font-size:1.8rem; font-weight:800; margin-bottom:6px; }
.go-score { font-size:2.5rem; font-weight:900; color:#fbbf24; text-shadow:0 0 20px rgba(251,191,36,.5); margin-bottom:20px; }
.go-stats { display:flex; gap:24px; margin-bottom:24px; }
.go-stat { text-align:center; }
.go-stat-label { font-size:.78rem; color:#64748b; }
.go-stat-val { font-size:1.2rem; font-weight:700; color:#e2e8f0; }

/* ===== 按钮 ===== */
.btn-game {
    padding:12px 32px; border:none; border-radius:12px; font-size:1rem;
    font-weight:700; cursor:pointer; transition:all .25s; margin:4px;
}
.btn-primary-g { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; }
.btn-primary-g:hover { transform:scale(1.04); box-shadow:0 8px 25px rgba(99,102,241,.4); }
.btn-secondary-g { background:rgba(51,65,85,.6); color:#cbd5e1; border:1px solid rgba(148,163,184,.2); }
.btn-secondary-g:hover { background:rgba(71,85,105,.7); }

/* ===== 页面容器 ===== */
.game-page { padding-top:70px; padding-bottom:40px; }
.game-page-inner { max-width:700px; margin:0 auto; padding:0 20px; }

/* ===== 底部信息 ===== */
.page-footer {
    text-align:center; padding:30px 0; color:#475569; font-size:.82rem;
}
