/* Game page — canvas frame, HUD chips, history strip, action button */

.game-page {
    min-height: 100vh;
    display: flex; flex-direction: column;
}
.game-section {
    flex: 1;
    display: flex; flex-direction: column;
    padding: 28px 16px 40px;
    align-items: center;
    gap: 14px;
}
.game-shell {
    width: 100%;
    max-width: 920px;
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: 24px;
    box-shadow: 0 10px 0 var(--ink), 0 20px 40px rgba(0,0,0,0.22);
    padding: 22px;
    display: flex; flex-direction: column;
    gap: 14px;
}

.hud-top { display: flex; justify-content: space-between; gap: 10px; }
.hud-chip {
    background: var(--cream);
    border: 3px solid var(--ink);
    border-radius: 14px;
    padding: 10px 16px;
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center;
    min-width: 0;
    box-shadow: 0 4px 0 var(--ink);
}
.hud-chip .label {
    font-family: 'Lilita One', cursive;
    font-size: 12px;
    color: var(--orange-deep);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.hud-chip .value {
    font-family: 'Lilita One', cursive;
    color: var(--navy);
    font-size: 24px;
    letter-spacing: 0.5px;
    line-height: 1;
}

.stage-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(180deg, #5DC7F4 0%, #98DCF5 60%, #FFD08A 100%);
    border: 4px solid var(--ink);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 0 var(--ink);
}
.stage-canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
}
.stage-multiplier {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -55%);
    font-family: 'Lilita One', cursive;
    font-size: 88px;
    color: var(--white);
    letter-spacing: 1px;
    -webkit-text-stroke: 3px var(--ink);
    text-shadow: 0 8px 0 var(--ink), 0 14px 24px rgba(0,0,0,0.35);
    pointer-events: none;
    transition: color 0.25s, transform 0.25s;
}
.stage-multiplier.secured { color: var(--yellow); transform: translate(-50%, -55%) scale(1.08); }
.stage-multiplier.crashed { color: var(--red); }
.stage-status {
    position: absolute;
    bottom: 16px; left: 50%;
    transform: translateX(-50%);
    font-family: 'Lilita One', cursive;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--yellow);
    padding: 8px 22px;
    border-radius: 999px;
    border: 3px solid var(--ink);
    box-shadow: 0 4px 0 var(--ink);
    pointer-events: none;
    white-space: nowrap;
}
.stage-status.secured { background: var(--green); color: var(--white); }
.stage-status.crashed { background: var(--red);   color: var(--white); }
.stage-status.idle    { background: var(--yellow); color: var(--navy); }

.history-strip {
    display: flex; gap: 8px;
    overflow-x: auto;
    padding: 6px 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--orange) transparent;
}
.history-strip::-webkit-scrollbar { height: 6px; }
.history-strip::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 3px; }
.history-pill {
    flex-shrink: 0;
    background: var(--cream);
    border: 2.5px solid var(--ink);
    color: var(--navy);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: 'Lilita One', cursive;
    font-size: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 0 var(--ink);
}
.history-pill.high { background: var(--yellow); color: var(--navy); }
.history-pill.low  { background: var(--red);    color: var(--white); }
.history-empty {
    font-size: 13px; color: var(--navy); opacity: 0.55;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 8px 0;
    font-weight: 700;
}

.controls-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 12px;
    align-items: stretch;
}
.control-panel {
    background: var(--cream);
    border: 3px solid var(--ink);
    border-radius: 16px;
    padding: 14px;
    display: flex; flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 0 var(--ink);
}
.control-panel .label {
    font-family: 'Lilita One', cursive;
    font-size: 12px;
    color: var(--orange-deep);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.control-panel .value {
    font-family: 'Lilita One', cursive;
    color: var(--navy);
    font-size: 22px;
    line-height: 1;
}
.auto-input {
    width: 100%;
    background: var(--white);
    border: 3px solid var(--ink);
    color: var(--navy);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    font-family: 'Lilita One', cursive;
    font-size: 20px;
    outline: none;
    box-shadow: 0 3px 0 var(--ink);
}
.auto-input:focus { background: var(--yellow-light); }
.auto-toggle-row { display: flex; gap: 6px; width: 100%; justify-content: center; }
.auto-pill {
    flex: 1;
    background: var(--white);
    border: 2.5px solid var(--ink);
    color: var(--navy);
    border-radius: 999px;
    padding: 7px 10px;
    font-family: 'Lilita One', cursive;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 0 var(--ink);
    text-transform: uppercase;
}
.auto-pill:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--ink); }
.auto-pill.active { background: var(--yellow); }

.action-btn {
    width: 100%; height: 100%;
    min-height: 96px;
    border-radius: 18px;
    font-family: 'Lilita One', cursive;
    font-size: 26px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--navy);
    background:
        repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,0.78) 14px 22px) left  / 22% 100% no-repeat,
        repeating-linear-gradient(45deg,  transparent 0 14px, rgba(0,0,0,0.78) 14px 22px) right / 22% 100% no-repeat,
        var(--yellow);
    border: 4px solid var(--ink);
    box-shadow: 0 8px 0 var(--ink), 0 14px 26px rgba(0,0,0,0.22);
    text-shadow: 0 2px 0 rgba(255,255,255,0.4);
    transition: all 0.12s;
}
.action-btn:hover:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 5px 0 var(--ink), 0 8px 14px rgba(0,0,0,0.2);
}
.action-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.action-btn.secure {
    background: var(--green);
    color: var(--white);
    text-shadow: 0 2px 0 rgba(0,0,0,0.4);
}
.action-btn.relaunch {
    background: var(--orange);
    color: var(--white);
    text-shadow: 0 2px 0 rgba(0,0,0,0.4);
}

.tip-strip {
    text-align: center;
    font-family: 'Lilita One', cursive;
    font-size: 14px;
    color: var(--navy);
    background: var(--yellow);
    border: 3px solid var(--ink);
    border-radius: 999px;
    padding: 10px 22px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 0 var(--ink);
    align-self: center;
}

@media (max-width: 768px) {
    .controls-row { grid-template-columns: 1fr; }
    .action-btn { min-height: 78px; font-size: 22px; }
    .stage-multiplier { font-size: 60px; -webkit-text-stroke: 2.5px var(--ink); }
}
@media (max-width: 576px) {
    .game-shell { padding: 14px; }
    .stage-multiplier { font-size: 48px; }
    .hud-chip .value { font-size: 18px; }
}
