/* =========================================================================
 * 打靶训练 · Aim Trainer —— 独立游戏页样式（自包含，不动站点全局 CSS）
 * 视觉方向：沿用首页的粉紫小窝主题（浅粉渐变背景、白卡片、圆角阴影），
 * 靶场本身由 canvas 绘制（见 game.js），这里只负责 DOM 层（顶栏 / 画布框）。
 * ========================================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }

body {
    display: flex;
    flex-direction: column;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', system-ui, sans-serif;
    color: #4a3055;
    background:
        radial-gradient(ellipse at 18% 12%, rgba(255, 126, 179, .16), transparent 55%),
        radial-gradient(ellipse at 84% 82%, rgba(192, 132, 252, .16), transparent 55%),
        linear-gradient(180deg, #fff5f9 0%, #fdf2fa 100%);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

/* 顶部栏 */
.game-topbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 16px 8px;
}
.back-home {
    color: #8b6b9e;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, .82);
    border: 1.5px solid #f0d5e8;
    border-radius: 999px;
    padding: 7px 15px;
    box-shadow: 0 2px 8px rgba(255, 126, 179, .12);
    white-space: nowrap;
    transition: color .25s, border-color .25s, transform .25s;
}
.back-home:hover { color: #ff5c9e; border-color: #ff7eb3; transform: translateY(-1px); }
.game-title {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ff7eb3, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.game-tip { font-size: .72rem; color: #b8a0c8; white-space: nowrap; }
.game-topbar-actions { display: flex; align-items: center; gap: 10px; }
.game-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #f0d5e8;
    background: rgba(255, 255, 255, .85);
    color: #8b6b9e;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 126, 179, .12);
    transition: transform .2s, border-color .2s, background .2s;
}
.game-icon-btn:hover { background: #fff; border-color: #ff7eb3; transform: translateY(-1px); }

/* 画布容器 */
.stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px 18px;
}
canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 960 / 620;
    border-radius: 24px;
    border: 1.5px solid rgba(255, 255, 255, .9);
    background: #fffafd;
    box-shadow: 0 18px 60px rgba(192, 132, 252, .28), 0 0 0 1px rgba(240, 213, 232, .9) inset;
    touch-action: none;
    cursor: default;
}

/* 手机窄屏 */
@media (max-width: 560px) {
    .game-title { display: none; }
    .game-tip { display: none; }
    .stage { padding: 4px 8px 12px; }
    canvas { border-radius: 18px; }
}
