/* Stack Tower — play.php styling (loaded with topbar.css only, no global site CSS).
 * Palette mirrors the GAME module night theme (Flappy Bat / Snake). */

* { box-sizing: border-box; }

html, body.stack-root {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #0b0d18;
    color: #f3f0e7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
}

.stack-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stack-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem;
}

.stack-screen.hidden { display: none; }

#game-screen { padding: 0; }

#gameCanvas {
    display: block;
    background: #111426;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    touch-action: none;
    max-width: 100%;
    max-height: 100%;
}

.stack-screen h1 {
    margin: 0;
    font-size: 2.4rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 0 #000;
}

.stack-tagline {
    margin: 0;
    max-width: 28rem;
    opacity: 0.8;
    line-height: 1.5;
}

.stack-best {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.stack-best span,
.stats span { font-variant-numeric: tabular-nums; font-weight: 700; }

.stack-guest-note,
.stack-go-message {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
    max-width: 28rem;
}

.stack-guest-note a,
.stack-go-message a {
    color: #ffcf5c;
    font-weight: 600;
}

.stack-hud {
    position: absolute;
    top: 1.2rem;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
}

#hud-score {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 3px 0 #000, 0 0 16px rgba(0, 0, 0, 0.7);
    font-variant-numeric: tabular-nums;
}

.stats { margin: 0; line-height: 1.6; }
.stats p { margin: 0.15rem 0; font-size: 1.15rem; }

.game-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

#start-game,
#play-again,
.game-actions .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #2b2b2b;
    color: #f0f0f0;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

#start-game,
#play-again {
    background-color: #e0a82e;
    border-color: #e0a82e;
    color: #1a1206;
}

#start-game:hover,
#play-again:hover,
.game-actions .btn:hover { filter: brightness(1.1); }

@media (max-width: 720px) {
    .stack-container { height: calc(100vh - 36px); }
    .stack-screen h1 { font-size: 1.9rem; }
    #hud-score { font-size: 2.4rem; }
}
