:root {
    --blue-900: #0b2f66;
    --blue-700: #1559b7;
    --blue-500: #2582f3;
    --page: #eef6ff;
    --ink: #172033;
}

* {
    box-sizing: border-box;
}

body {
    display: grid;
    min-height: 100vh;
    margin: 0;
    place-items: center;
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background: linear-gradient(180deg, #f7fbff, var(--page));
}

.game-shell {
    width: min(100vw, 480px);
    padding: 16px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.back {
    color: var(--blue-700);
    font-weight: 800;
    text-decoration: none;
}

.stats {
    display: flex;
    gap: 12px;
    color: var(--blue-900);
    font-weight: 700;
}

canvas {
    display: block;
    width: 100%;
    max-height: calc(100vh - 150px);
    aspect-ratio: 420 / 680;
    background: #18345f;
    border: 1px solid #bad9ff;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(11, 47, 102, 0.18);
}

.controls {
    display: grid;
    grid-template-columns: 72px 1fr 72px;
    gap: 12px;
    margin-top: 12px;
}

button {
    min-height: 48px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    background: var(--blue-700);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

button:active {
    transform: translateY(1px);
}

