/* =============================================================================
   Obrona miast / City Defense — game-specific styles (canvas frame, ammo HUD,
   mobile hint). Loaded together with games.css via $extraCss. The playfield is
   deliberately dark (night-sky arcade look), so the sky colours are literals
   like in games-najezdzcy.css; chrome uses site design tokens.
   ============================================================================= */

.ob-canvas-wrap {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

#obCanvas {
    display: block;
    width: 100%;
    max-width: 720px;
    background: #0a0e1c;
    border: 1px solid #26304a;
    border-radius: var(--border-radius);
    box-shadow: 0 0 18px rgba(255, 178, 102, 0.14), var(--shadow-sm);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
}

#obCanvas:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ---------------- Per-battery ammo counters ---------------- */

.ob-ammo-bar {
    max-width: 720px;
    margin: 0 auto 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
}

.ob-ammo {
    text-align: center;
    padding: 0.3rem 0.4rem;
    font-size: 0.95rem;
    border: 1px solid #26304a;
    border-radius: var(--border-radius);
    background: #131a30;
    color: #b3ffc1;
    user-select: none;
    -webkit-user-select: none;
}

.ob-ammo--low {
    color: #ffe08a;
    border-color: #5c4a2a;
}

.ob-ammo--empty {
    color: #ff9a7a;
    border-color: #5c2f2a;
    background: #221019;
}

/* ---------------- Mobile hint (tap = fire) ---------------- */

.ob-hint {
    max-width: 720px;
    margin: 0.6rem auto 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-gray-700);
}

/* Desktop with a keyboard/mouse: the hint is obvious, keep it subtle. */
@media (min-width: 900px) {
    .ob-hint {
        font-size: 0.85rem;
    }
}

/* ---------------- Stats modal extra ---------------- */

.ob-best-line {
    margin-top: 0.75rem;
    color: var(--color-gray-700);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 600px) {
    .ob-ammo {
        font-size: 0.85rem;
        padding: 0.25rem 0.3rem;
    }
}
