@font-face {
    font-family: "ADJMN Arcade Display";
    src: url("/games/fonts/PressStart2P-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

body.arcade-site {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: #f6f0ff;
    background:
        radial-gradient(ellipse at 50% 5%, rgba(73, 42, 130, .42), transparent 52%),
        #100b21;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.arcade-game-page {
    width: min(100% - 24px, 760px);
    margin: 0 auto;
    padding: 22px 0 40px;
}

.game-page-context {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #57427e;
    border-radius: 8px;
    color: #eee7fa;
    background: rgba(24, 18, 44, .82);
    font-size: .95rem;
    line-height: 1.5;
    text-align: center;
}

.gear-cabinet {
    padding: clamp(14px, 3vw, 24px);
    border: 3px solid #d7488b;
    border-radius: 12px;
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px),
        linear-gradient(145deg, rgba(37, 25, 69, .98), rgba(13, 12, 30, .98));
    box-shadow: 0 0 20px rgba(215, 72, 139, .28), inset 0 0 24px rgba(5, 4, 16, .7);
}

.gear-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.game-brand {
    color: #4ce8ff;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gear-cabinet .sound-toggle {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #8066bf;
    border-radius: 7px;
    color: #f7f0ff;
    background: #21183b;
    font: 700 .95rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
}

.gear-cabinet h1,
.gear-cabinet .game-subtitle,
.game-start-overlay .overlay-kicker {
    font-family: "ADJMN Arcade Display", monospace;
    text-align: center;
}

.gear-cabinet h1 {
    margin: 16px 0 10px;
    color: #ffe17b;
    font-size: clamp(1rem, 3.5vw, 1.35rem);
    line-height: 1.5;
    text-shadow: 2px 2px #9b294d;
}

.game-subtitle {
    margin: 0 0 16px;
    color: #4ce8ff;
    font-size: clamp(.58rem, 2.3vw, .75rem);
    line-height: 1.6;
    letter-spacing: .05em;
}

.gear-hud,
.swatter-hud {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #635583;
    border-radius: 8px;
    background: rgba(7, 6, 19, .88);
}

.gear-hud > div,
.swatter-hud > div {
    display: grid;
    gap: 5px;
    text-align: left;
}

.gear-hud > div:last-child { text-align: right; }

.gear-hud span,
.swatter-hud > div > span {
    color: #c8bfd9;
    font: 700 .75rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}

.gear-hud strong,
.swatter-hud strong {
    color: #ffe17b;
    font: 800 1.1rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.gear-stage,
.swatter-stage {
    position: relative;
    overflow: hidden;
    width: min(100%, 440px);
    margin: 0 auto;
    border: 2px dashed #c94782;
    border-radius: 8px;
    background: #0b0a18;
    touch-action: none;
}

.gear-stage canvas,
.swatter-stage canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #0b0a18;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.game-start-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: clamp(16px, 5vw, 30px);
    color: #f7f0ff;
    background: rgba(7, 6, 19, .48);
    text-align: center;
}

.game-start-overlay[hidden] { display: none !important; }

.game-start-overlay .overlay-kicker {
    margin: 0;
    color: #4ce8ff;
    font-size: .65rem;
    letter-spacing: .08em;
}

.game-start-overlay h2 {
    margin: 0;
    color: #ffe17b;
    font: 800 clamp(1.35rem, 5vw, 1.8rem)/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .95);
}

.game-start-overlay p:not(.overlay-kicker) {
    max-width: 430px;
    margin: 0;
    color: #e1d9ef;
    font-size: 1rem;
    line-height: 1.5;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .95);
}

.arcade-primary-button {
    min-height: 50px;
    padding: 12px 22px;
    border: 1px solid #ff829e;
    border-radius: 8px;
    color: #fff8f1;
    background: linear-gradient(180deg, #f34163, #bc1c48);
    box-shadow: 0 4px 0 #64142f, inset 0 0 10px rgba(255, 255, 255, .1);
    font: 800 1rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
    text-shadow: 1px 2px 0 #64142f;
    cursor: pointer;
}

.arcade-primary-button:hover { filter: brightness(1.1); }
.arcade-primary-button:active { transform: translateY(3px); box-shadow: 0 1px 0 #64142f; }
.arcade-primary-button:focus-visible,
.gear-cabinet button:focus-visible,
.swatter-cabinet button:focus-visible {
    outline: 3px solid #ffe17b;
    outline-offset: 3px;
}

.gear-instructions,
.swatter-instructions {
    max-width: 560px;
    margin: 14px auto 0;
    color: #d4cde3;
    font-size: .95rem;
    line-height: 1.5;
    text-align: center;
}

.gear-result-panel,
.swatter-result-panel {
    margin: 0 auto;
}

.game-result-panel[hidden] { display: none !important; }

.result-lock {
    margin: 10px 0 0;
    color: #ffe17b;
    font-size: .9rem;
    text-align: center;
}

.result-lock[hidden] { display: none !important; }

.game-scoreboards.gear-scoreboards,
.game-scoreboards.swatter-scoreboards {
    margin-top: 22px;
}

.game-hall-link {
    margin: 18px 0 0;
    text-align: center;
}

.game-hall-link a {
    color: #4ce8ff;
    font-size: .95rem;
    font-weight: 700;
}

@media (max-width: 480px) {
    .arcade-game-page { width: min(100% - 16px, 760px); padding-top: 14px; }
    .game-page-context { font-size: .88rem; }
    .gear-cabinet { padding: 12px; border-width: 2px; }
    .game-brand { font-size: .67rem; }
    .gear-cabinet .sound-toggle { min-height: 40px; padding: 7px 9px; font-size: .85rem; }
    .gear-hud { padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .arcade-primary-button { transition: none; }
}
