/* Wall Smash — aligned with Game Anything casual shell (see ga-casual-shell.css) */

@media screen and (max-height: 640px) {
    .container.container-single {
        padding-top: 3px !important;
    }
}

.ws-root {
    --ws-accent: var(--ga-accent-game, #38bdf8);
    width: 100%;
    /* Frame min-height matches Sky/Monster Shooter & Tic-Tac-Toe play stack (see `.ws-frame`) */
    box-sizing: border-box;
}

.ws-frame {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    /* Match Sky/Monster Shooter #gamebox height (768×5/7 ≈ 549px) / Tic-Tac-Toe card — toolbar + playfield */
    min-height: 549px;
    display: flex;
    flex-direction: column;
    /* No border/radius here — avoids a second “card” outline around the playfield; shell keeps page chrome */
    border: none;
    border-radius: 0;
    background: var(--ga-bg-mid, #111b2d);
    box-shadow: none;
    overflow: hidden;
}

.ws-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    box-sizing: border-box;
    min-height: 2.5rem;
    padding: 5px 12px;
    row-gap: 4px;
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--ga-surface, rgba(15, 23, 42, 0.78));
    border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}

.ws-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35em 0.5em;
    min-width: 0;
}

.ws-stat--end {
    justify-content: flex-end;
    text-align: right;
}

.ws-stat__label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ga-muted, #94a3b8);
    white-space: nowrap;
}

.ws-stat__value {
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ga-text, #f1f5f9);
    line-height: 1.1;
}

.ws-playfield {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    background: var(--ga-bg-abyss, #070b14);
}

#gameBox {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 0;
    background: linear-gradient(180deg, #0c1220 0%, #0a0f18 100%);
    border: none;
    outline: none;
    overflow: hidden;
    box-shadow: none;
}

#gameBox .brick {
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.35);
    background-size: cover;
    background-position: center;
}

#gameBox .ws-paddle {
    border-radius: 6px;
    background: linear-gradient(180deg, #64748b 0%, #475569 48%, #334155 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

#gameBox .ws-ball {
    background: radial-gradient(circle at 30% 30%, #fff 0%, #e2e8f0 40%, #94a3b8 100%) !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35), 0 2px 6px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.ws-overlay.ws-overlay--start {
    z-index: 6;
}

.ws-overlay.ws-overlay--gameover {
    z-index: 7;
}

.ws-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    align-items: center;
    justify-content: center;
    padding: var(--ga-screen-pad-x, 24px);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
    font-family: "DM Sans", system-ui, sans-serif;
}

.ws-overlay:not([hidden]) {
    display: flex;
}

.ws-overlay__panel {
    pointer-events: auto;
    width: min(100%, 340px);
    margin-top: 2rem;
    padding: 28px 24px 24px;
    border-radius: var(--ga-radius-lg, 16px);
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 20px 48px rgba(2, 6, 23, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    text-align: center;
}

.ws-overlay__title {
    margin: 0 0 8px;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--ga-text, #f1f5f9);
    letter-spacing: -0.02em;
    text-shadow: none;
}

.ws-overlay__hint {
    margin: 0 0 22px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--ga-muted, #94a3b8);
    text-shadow: none;
}

.ws-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    padding: 12px 20px;
    border: none;
    border-radius: var(--ga-radius-md, 12px);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0f172a;
    cursor: pointer;
    background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 45%, #0ea5e9 100%);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform var(--ga-time-fast, 0.22s) var(--ga-ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
        box-shadow var(--ga-time-fast, 0.22s) var(--ga-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.ws-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(14, 165, 233, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ws-btn:focus-visible {
    outline: 2px solid var(--ws-accent);
    outline-offset: 3px;
}

.ws-btn:active {
    transform: translateY(0);
}
