/* Banana Man: Neighborhood Watch. The game screen looks like an arcade cabinet in both the retro
   and the modernized site; only the page around it follows the site theme. */

.zs-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px 16px 32px;
    box-sizing: border-box;
}

.zs-heading {
    margin: 8px 0 0;
    text-align: center;
    font-size: clamp(28px, 6vw, 44px);
    letter-spacing: 0.04em;
}
.zs-heading span { display: block; font-size: 0.5em; letter-spacing: 0.12em; }
.zs-tagline { text-align: center; margin: 4px 0 16px; opacity: 0.85; }

body.retro-mode.zombies {
    background: #0e1a12;
    color: #e8f5e0;
}
body.retro-mode .zs-heading {
    font-family: Impact, "Arial Black", sans-serif;
    color: #fcd624;
    text-shadow: 3px 3px 0 #140e0a, 0 0 12px rgba(134, 184, 90, 0.6);
    text-transform: uppercase;
}

.zs-wrap {
    display: flex;
    justify-content: center;
}

.zs-stage {
    --zs-scale: 2;
    position: relative;
    width: 640px;
    height: 480px;
    max-width: 100%;
    background: #000;
    border: 4px solid #140e0a;
    border-radius: 6px;
    box-shadow: 0 0 0 3px #fcd624, 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    box-sizing: content-box;
    font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, "Courier New", monospace;
    color: #fff;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#zs-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    outline: none;
}
.zs-stage.is-playing #zs-canvas { cursor: none; } /* the game draws its own crosshair */

/* ---------- overlay screens ---------- */
.zs-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    box-sizing: border-box;
    text-align: center;
    background: rgba(6, 14, 9, 0.72);
    overflow-y: auto;
}
.zs-screen[hidden] { display: none; }

.zs-logo {
    margin: 0;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(34px, 9vw, 72px);
    line-height: 0.9;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fcd624;
    text-shadow: 4px 4px 0 #140e0a, -2px -2px 0 #140e0a, 2px -2px 0 #140e0a, -2px 2px 0 #140e0a, 0 0 18px #86b85a;
    transform: rotate(-3deg);
}
.zs-logo-small { font-size: clamp(30px, 7vw, 54px); }
.zs-logo-sub {
    margin: -4px 0 0;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(14px, 3.2vw, 24px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7dff9a;
    text-shadow: 2px 2px 0 #140e0a;
    transform: rotate(-3deg);
}

/* ---------- Peaches' prize corner ---------- */
.zs-reward { background: rgba(40, 6, 30, 0.82); gap: 10px; }
.zs-host { display: flex; align-items: center; gap: 12px; }
#zs-host {
    width: auto;
    height: 150px;
    image-rendering: pixelated;
    animation: zs-sway 1.2s ease-in-out infinite alternate;
}
@keyframes zs-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.zs-bubble {
    position: relative;
    max-width: 260px;
    padding: 8px 12px;
    text-align: left;
    color: #140e0a;
    background: #fff;
    border: 3px solid #140e0a;
    border-radius: 10px;
}
.zs-bubble::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    margin-top: -8px;
    border: 8px solid transparent;
    border-right-color: #140e0a;
    border-left: 0;
}
.zs-bubble h2 {
    margin: 0 0 2px;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e0245e;
}
.zs-bubble p { margin: 0; font-size: 13px; }
.zs-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: min(560px, 100%);
}
.zs-option {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 8px 8px;
    font: inherit;
    font-size: 12px;
    line-height: 1.3;
    color: #fff;
    text-align: center;
    background: #2a1450;
    border: 3px solid #ff4fa0;
    border-radius: 6px;
    box-shadow: 0 4px 0 #140e0a;
    cursor: pointer;
}
.zs-option strong { font-size: 14px; text-transform: uppercase; color: #ffe14d; letter-spacing: 0.05em; }
.zs-option kbd {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 6px;
    font: bold 12px/1.4 ui-monospace, Menlo, Consolas, monospace;
    color: #140e0a;
    background: #ffe14d;
    border: 2px solid #140e0a;
    border-radius: 4px;
}
.zs-option:hover, .zs-option:focus-visible { background: #4a1f7a; border-color: #ffe14d; outline: none; transform: translateY(-2px); }

.zs-blurb { max-width: 34em; margin: 6px 0; font-size: 14px; line-height: 1.4; }
.zs-hint, .zs-small { margin: 0; font-size: 12px; opacity: 0.8; }
.zs-new-best { margin: 0; color: #7dff9a; font-weight: bold; animation: zs-blink 0.8s steps(2) infinite; }
@keyframes zs-blink { 50% { opacity: 0.3; } }

.zs-btn {
    font: inherit;
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 20px;
    color: #140e0a;
    background: #fcd624;
    border: 3px solid #140e0a;
    border-radius: 4px;
    box-shadow: 0 4px 0 #ce8c10;
    cursor: pointer;
}
.zs-btn:hover { background: #fff48c; }
.zs-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #ce8c10; }
.zs-btn:focus-visible { outline: 3px solid #7dff9a; outline-offset: 2px; }
.zs-btn:disabled { opacity: 0.6; cursor: wait; }
.zs-btn-quiet {
    background: #2a3350;
    color: #fff;
    box-shadow: 0 4px 0 #140e0a;
    font-size: 13px;
    padding: 6px 14px;
}
.zs-btn-quiet:hover { background: #3f4c70; }

.zs-stats {
    display: flex;
    gap: 18px;
    margin: 4px 0;
}
.zs-stats div { display: flex; flex-direction: column-reverse; }
.zs-stats dt { font-size: 11px; text-transform: uppercase; opacity: 0.75; }
.zs-stats dd { margin: 0; font-size: 22px; font-weight: bold; color: #fcd624; }

.zs-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.zs-submit[hidden] { display: none; }
.zs-submit label { font-size: 13px; text-transform: uppercase; }
.zs-submit input {
    width: 4.2ch;
    font: inherit;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 4px 6px;
    color: #fcd624;
    background: #140e0a;
    border: 3px solid #fcd624;
    border-radius: 4px;
}
.zs-submit input:focus { outline: 3px solid #7dff9a; }

.zs-board-wrap { width: min(260px, 100%); }
.zs-board-wrap[hidden] { display: none; }
.zs-board-wrap h3 {
    margin: 4px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #7dff9a;
}
.zs-board {
    list-style: none;
    margin: 0;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid #3f4c70;
    border-radius: 4px;
    font-size: 13px;
}
.zs-board li {
    display: grid;
    grid-template-columns: 2.2em 3.5em 1fr 3em;
    gap: 6px;
    padding: 1px 0;
    text-align: left;
}
.zs-board .zs-score { text-align: right; color: #fcd624; }
.zs-board .zs-wave { text-align: right; opacity: 0.7; }
.zs-board .zs-me { color: #7dff9a; animation: zs-blink 0.8s steps(2) infinite; }
.zs-board .zs-board-empty { display: block; text-align: center; opacity: 0.8; }

/* ---------- dad joke between rounds ---------- */
.zs-joke {
    position: absolute;
    left: 50%;
    top: 14%;
    transform: translateX(-50%);
    width: min(78%, 420px);
    padding: 8px 14px 10px;
    box-sizing: border-box;
    text-align: center;
    color: #140e0a;
    background: #fff8d6;
    border: 3px solid #140e0a;
    border-radius: 10px;
    box-shadow: 0 4px 0 #140e0a;
    pointer-events: none;
    animation: zs-pop 0.25s ease-out;
}
.zs-joke[hidden] { display: none; }
.zs-joke strong {
    display: block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ce8c10;
}
.zs-joke p { margin: 4px 0 0; font-size: 14px; line-height: 1.3; }
.zs-joke .zs-joke-a { font-weight: bold; font-size: 15px; color: #e0245e; animation: zs-zoom 0.25s ease-out; }
@keyframes zs-pop { from { transform: translateX(-50%) scale(0.8); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes zs-zoom { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 520px) { .zs-joke p { font-size: 11px; } .zs-joke .zs-joke-a { font-size: 12px; } }

/* ---------- touch controls ---------- */
.zs-touch { display: none; }
@media (pointer: coarse) {
    .zs-stage.is-playing .zs-touch {
        display: flex;
        position: absolute;
        inset: auto 0 0 0;
        justify-content: space-between;
        align-items: flex-end;
        padding: 10px;
        pointer-events: none;
    }
}
.zs-stick, .zs-tbtn { pointer-events: auto; touch-action: none; }
.zs-stick {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.35);
}
.zs-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    border-radius: 50%;
    background: rgba(252, 214, 36, 0.7);
    border: 2px solid #140e0a;
}
.zs-touch-buttons { display: flex; gap: 10px; align-items: flex-end; }
.zs-tbtn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #140e0a;
    font: inherit;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #140e0a;
    opacity: 0.8;
}
.zs-tbtn-fire { width: 76px; height: 76px; background: #4fb4ff; }
.zs-tbtn-skate { background: #e12832; color: #fff; }

/* ---------- below the screen ---------- */
.zs-toolbar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 14px 0 0;
}

.zs-help {
    max-width: 640px;
    margin: 24px auto 0;
    line-height: 1.5;
}
.zs-help h2 { font-size: 20px; }
.zs-help ul { padding-left: 1.2em; }
.zs-help kbd {
    display: inline-block;
    padding: 0 5px;
    font: 12px/1.6 ui-monospace, Menlo, Consolas, monospace;
    border: 1px solid currentColor;
    border-bottom-width: 2px;
    border-radius: 3px;
}

@media (max-width: 520px) {
    .zs-page { padding: 10px 8px 24px; }
    #zs-host { width: auto; height: 96px; }
    .zs-bubble h2 { font-size: 14px; }
    .zs-bubble p { font-size: 11px; }
    .zs-options { gap: 5px; }
    .zs-option { padding: 8px 4px 5px; font-size: 10px; }
    .zs-option strong { font-size: 11px; }
    .zs-blurb { font-size: 12px; }
    .zs-board { font-size: 12px; }
    .zs-stats { gap: 10px; }
    .zs-stats dd { font-size: 18px; }
}
