:root {
    color-scheme: dark;
    --bg: #07090f;
    --panel: rgba(10, 14, 25, .86);
    --line: rgba(255, 255, 255, .16);
    --text: #f4f1d0;
    --muted: #b8c0d4;
    --gold: #f7c948;
    --green: #34d399;
    --orange: #fb923c;
    --red: #e84a5f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(255,255,255,.025) 50%, rgba(0,0,0,.05) 50%),
        radial-gradient(circle at top left, rgba(52, 211, 153, .14), transparent 34rem),
        radial-gradient(circle at top right, rgba(251, 146, 60, .12), transparent 30rem),
        var(--bg);
    background-size: 100% 4px, auto, auto, auto;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: var(--gold);
    text-decoration: none;
}

.arcade-shell {
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 44px;
}

.topbar,
.section-head,
.result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.brand {
    color: var(--text);
    font-weight: 800;
}

.hero {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: end;
    gap: 28px;
    padding: 34px;
    border: 4px solid var(--gold);
    background: linear-gradient(90deg, rgba(7,9,15,.28), rgba(7,9,15,.94)), url("/assets/pic/default.svg") center / cover;
    box-shadow: 0 0 34px rgba(247, 201, 72, .24);
}

.hero-copy {
    max-width: 690px;
}

.kicker {
    margin: 0 0 10px;
    color: var(--green);
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: .95;
}

h2 {
    font-size: 1.35rem;
}

.lead {
    color: var(--gold);
    font-size: 1.35rem;
    font-weight: 700;
}

.start-panel,
.event-panel,
.score-preview,
.result-hero {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.start-panel label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: .9rem;
    text-transform: uppercase;
}

input {
    width: 100%;
    min-height: 48px;
    margin-bottom: 14px;
    border: 2px solid rgba(247, 201, 72, .65);
    border-radius: 6px;
    background: #05070c;
    color: var(--text);
    font: inherit;
    padding: 0 12px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 2px solid var(--gold);
    border-radius: 6px;
    background: #151b2a;
    color: #fff7c2;
    font-weight: 900;
    cursor: pointer;
}

.secondary-btn {
    border-color: var(--line);
    color: var(--text);
}

.start-panel .primary-btn {
    width: 100%;
}

.micro,
.empty,
small {
    color: var(--muted);
}

.notice {
    margin: 18px 0;
    padding: 14px 16px;
    border-left: 5px solid var(--orange);
    background: rgba(251, 146, 60, .12);
}

.score-preview {
    margin-top: 22px;
}

.score-list {
    display: grid;
    gap: 10px;
    padding-left: 24px;
}

.score-list li {
    padding: 8px 0;
}

.score-list span,
.score-list strong,
.score-list small {
    display: block;
}

.hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 4px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(247, 201, 72, .3);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.stat-box {
    min-height: 76px;
    padding: 12px;
    background: rgba(0, 0, 0, .38);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.stat-box span,
.stat-box strong {
    display: block;
}

.stat-box span {
    color: var(--muted);
    font-size: .82rem;
}

.stat-box strong {
    margin-top: 8px;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.event-panel h1,
.result-hero h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.pros-cons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.pros-cons div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.pros-cons strong,
.pros-cons span {
    display: block;
}

.pros-cons strong {
    margin-bottom: 6px;
    color: var(--gold);
}

.choices {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.choice-btn {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    min-height: 90px;
    padding: 14px;
    border: 2px solid var(--gold);
    border-radius: 8px;
    background: #111827;
    color: #fff7c2;
    text-align: left;
    cursor: pointer;
}

.choice-btn:hover,
.choice-btn:focus-visible {
    border-color: var(--green);
    outline: none;
    transform: translateY(-1px);
}

.choice-btn:disabled {
    opacity: .38;
    cursor: not-allowed;
    transform: none;
}

.choice-code {
    display: inline-grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: #111827;
    font-weight: 900;
}

.choice-btn strong,
.choice-btn small,
.choice-btn em {
    display: block;
}

.choice-btn small {
    margin: 4px 0 8px;
}

.choice-btn em {
    color: var(--green);
    font-style: normal;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: rgba(0, 0, 0, .32);
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--gold);
}

@media (max-width: 820px) {
    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .stat-grid,
    .pros-cons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .arcade-shell {
        width: min(100% - 18px, 1120px);
        padding-top: 12px;
    }

    .stat-grid,
    .pros-cons {
        grid-template-columns: 1fr;
    }

    .choice-btn {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .choice-code {
        width: 38px;
        height: 38px;
    }
}

.game-body {
    overflow-x: hidden;
    background: #050506;
}

.game-stage {
    position: relative;
    width: min(100vw, 1920px);
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(18px, 2.1vw, 36px) clamp(18px, 2.2vw, 42px) 92px;
    isolation: isolate;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .2) 35%, rgba(0, 0, 0, .1) 62%, rgba(0, 0, 0, .64) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .12) 30%, rgba(0, 0, 0, .05) 100%),
        var(--event-image);
    background-position: center;
    background-size: cover;
}

.game-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(255, 255, 255, .035) 50%, rgba(0, 0, 0, .08) 50%),
        radial-gradient(circle at 52% 4%, rgba(247, 201, 72, .18), transparent 22rem);
    background-size: 100% 4px, auto;
    pointer-events: none;
}

.game-nav {
    position: absolute;
    top: 18px;
    right: clamp(18px, 2.2vw, 42px);
    display: flex;
    gap: 18px;
    padding: 9px 14px;
    border: 1px solid rgba(247, 201, 72, .28);
    border-radius: 8px;
    background: rgba(0, 0, 0, .48);
    font-weight: 800;
    text-transform: uppercase;
}

.game-title-card {
    width: min(720px, 58vw);
    min-height: 172px;
    padding: 28px 34px 24px;
    border-right: 2px solid rgba(247, 201, 72, .52);
    border-bottom: 2px solid rgba(247, 201, 72, .52);
    border-radius: 0 0 14px 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .36));
    box-shadow: 0 0 34px rgba(0, 0, 0, .42);
}

.game-title-card p {
    margin-bottom: 10px;
    color: #fff;
    font-size: clamp(1.45rem, 2.8vw, 2.65rem);
    font-weight: 900;
    text-transform: uppercase;
}

.game-title-card h1 {
    margin: 0;
    color: var(--gold);
    font-size: clamp(2.4rem, 5.1vw, 5.1rem);
    line-height: .92;
    text-transform: uppercase;
    text-shadow: 0 5px 0 rgba(0, 0, 0, .42), 0 0 18px rgba(247, 201, 72, .26);
}

.game-story-card {
    position: absolute;
    left: clamp(18px, 2.2vw, 42px);
    bottom: 96px;
    width: min(640px, 36vw);
    min-height: 244px;
    padding: 20px 26px 18px;
    border: 1px solid rgba(247, 201, 72, .58);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(4, 5, 8, .88), rgba(4, 5, 8, .72));
    box-shadow: inset 0 0 30px rgba(255, 255, 255, .04), 0 0 28px rgba(0, 0, 0, .48);
}

.game-story-card h2 {
    margin-bottom: 8px;
    color: var(--gold);
    font-size: clamp(1.2rem, 1.6vw, 1.6rem);
    text-transform: uppercase;
}

.game-story-card p {
    margin-bottom: 9px;
    font-size: clamp(.95rem, 1.2vw, 1.22rem);
    line-height: 1.25;
}

.story-year {
    color: var(--muted);
    font-size: .85rem !important;
}

.story-question {
    margin: 10px 0 0;
    color: var(--gold);
    font-weight: 900;
}

.game-choice-deck {
    position: absolute;
    right: clamp(18px, 2.2vw, 42px);
    bottom: 108px;
    left: calc(clamp(18px, 2.2vw, 42px) + min(640px, 36vw) + 28px);
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 12px;
}

.game-choice-card {
    position: relative;
    min-height: 148px;
    padding: 20px 20px 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
    color: #fff;
    text-align: center;
    cursor: pointer;
    box-shadow: inset 0 0 32px rgba(255, 255, 255, .05), 0 0 18px rgba(0, 0, 0, .5);
}

.game-choice-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .34));
}

.game-choice-card strong,
.game-choice-card small,
.game-choice-card em {
    display: block;
}

.game-choice-card strong {
    min-height: 48px;
    font-size: clamp(1rem, 1.35vw, 1.45rem);
    line-height: 1.08;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .55);
}

.choice-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin: 8px auto 8px;
    place-items: center;
    color: rgba(255, 255, 255, .74);
    font-size: 2rem;
    line-height: 1;
}

.game-choice-card small {
    min-height: 44px;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(.82rem, 1vw, 1.05rem);
    line-height: 1.18;
}

.game-choice-card em {
    margin-top: 7px;
    color: rgba(255, 255, 255, .72);
    font-size: .86rem;
    font-style: normal;
}

.game-choice-card:hover,
.game-choice-card:focus-visible {
    outline: none;
    transform: translateY(-2px);
    filter: brightness(1.12);
}

.game-choice-card:disabled {
    opacity: .38;
    cursor: not-allowed;
    transform: none;
}

.choice-green {
    border-color: rgba(74, 222, 128, .86);
    background: linear-gradient(180deg, rgba(33, 140, 42, .82), rgba(14, 73, 27, .88));
    box-shadow: inset 0 0 34px rgba(74, 222, 128, .18), 0 0 16px rgba(74, 222, 128, .34);
}

.choice-gold {
    border-color: rgba(247, 201, 72, .9);
    background: linear-gradient(180deg, rgba(160, 116, 8, .9), rgba(89, 64, 8, .92));
    box-shadow: inset 0 0 34px rgba(247, 201, 72, .18), 0 0 16px rgba(247, 201, 72, .34);
}

.choice-blue {
    border-color: rgba(56, 189, 248, .88);
    background: linear-gradient(180deg, rgba(12, 103, 145, .86), rgba(6, 53, 86, .94));
    box-shadow: inset 0 0 34px rgba(56, 189, 248, .16), 0 0 16px rgba(56, 189, 248, .3);
}

.choice-purple {
    border-color: rgba(192, 132, 252, .82);
    background: linear-gradient(180deg, rgba(83, 55, 140, .82), rgba(41, 28, 82, .94));
}

.choice-red {
    border-color: rgba(232, 74, 95, .86);
    background: linear-gradient(180deg, rgba(150, 45, 55, .86), rgba(77, 25, 31, .94));
}

.game-status-bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    min-height: 82px;
    padding: 10px clamp(18px, 2.2vw, 42px);
    border-top: 1px solid rgba(247, 201, 72, .35);
    background:
        linear-gradient(rgba(255, 255, 255, .035) 50%, rgba(0, 0, 0, .08) 50%),
        rgba(6, 7, 10, .94);
    background-size: 100% 4px, auto;
}

.game-status-bar div {
    display: grid;
    align-content: center;
    min-width: 0;
    padding: 0 10px;
    border-left: 1px solid rgba(255, 255, 255, .08);
}

.game-status-bar span {
    color: #d2c49d;
    font-size: clamp(.68rem, .9vw, .9rem);
    font-weight: 800;
    text-transform: uppercase;
}

.game-status-bar strong {
    margin-top: 3px;
    color: var(--gold);
    font-size: clamp(1.05rem, 1.55vw, 1.8rem);
    line-height: 1;
    overflow-wrap: anywhere;
}

.game-notice {
    position: absolute;
    z-index: 5;
    top: 16px;
    left: 50%;
    width: min(560px, calc(100% - 32px));
    margin: 0;
    transform: translateX(-50%);
}

@media (max-width: 1100px) {
    .game-stage {
        min-height: auto;
        padding-bottom: 0;
    }

    .game-title-card,
    .game-story-card,
    .game-choice-deck,
    .game-status-bar,
    .game-nav {
        position: relative;
        inset: auto;
        width: auto;
        left: auto;
        right: auto;
        bottom: auto;
    }

    .game-nav {
        justify-content: space-between;
        margin: 16px 0;
    }

    .game-title-card {
        width: min(100%, 720px);
    }

    .game-story-card {
        margin-top: clamp(220px, 36vw, 420px);
    }

    .game-choice-deck {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 14px 0;
    }

    .game-status-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 18px calc(clamp(18px, 2.2vw, 42px) * -1) 0;
    }
}

@media (max-width: 640px) {
    .game-stage {
        padding: 12px 12px 0;
    }

    .game-title-card {
        min-height: 120px;
        padding: 18px;
    }

    .game-story-card {
        margin-top: 210px;
        padding: 16px;
    }

    .game-choice-deck {
        grid-template-columns: 1fr;
    }

    .game-choice-card {
        min-height: 126px;
    }

    .game-status-bar {
        grid-template-columns: 1fr;
        margin-right: -12px;
        margin-left: -12px;
    }
}

/* Layered game HUD, tuned after the visual mockup. */
.game-stage {
    padding-bottom: 170px;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, .32) 0%, rgba(0, 0, 0, .08) 36%, rgba(0, 0, 0, .05) 64%, rgba(0, 0, 0, .32) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, .64) 0%, rgba(0, 0, 0, .08) 33%, rgba(0, 0, 0, .03) 100%),
        var(--event-image);
}

.game-stage::before {
    opacity: .62;
}

.game-title-card {
    width: min(520px, 44vw);
    min-height: 108px;
    padding: 18px 24px 16px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .18));
}

.game-title-card p {
    margin-bottom: 5px;
    font-size: clamp(1rem, 1.6vw, 1.75rem);
}

.game-title-card h1 {
    font-size: clamp(1.65rem, 2.8vw, 3.35rem);
    line-height: .96;
}

.game-story-card {
    z-index: 4;
    left: clamp(18px, 2.2vw, 42px);
    bottom: 184px;
    width: min(620px, 38vw);
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid #b9b9b9;
    border-radius: 0;
    background: #c8c8c8;
    color: #07090f;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, .44), 0 0 28px rgba(0, 0, 0, .42);
    resize: both;
}

.story-window-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    padding: 4px 5px 4px 9px;
    background: linear-gradient(90deg, #06358f, #1886d1);
    color: #fff;
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: 0;
    cursor: move;
    user-select: none;
}

.story-window-controls {
    display: flex;
    gap: 4px;
}

.story-window-controls button {
    display: grid;
    width: 24px;
    height: 22px;
    place-items: center;
    border: 1px solid #1f2937;
    border-radius: 0;
    background: #d8d8d8;
    color: #111;
    font: 900 14px/1 Arial, sans-serif;
    cursor: pointer;
}

.story-window-body {
    padding: 16px 20px 15px;
    border-top: 1px solid #ffffff;
    background: linear-gradient(180deg, #f4f4f4, #d9d9d9);
}

.game-story-card h2 {
    color: #9b1c1c;
    font-size: clamp(1rem, 1.15vw, 1.32rem);
}

.game-story-card p {
    color: #111827;
    font-size: clamp(.86rem, .95vw, 1.03rem);
    line-height: 1.24;
}

.story-year {
    color: #4b5563 !important;
}

.story-question {
    color: #9b1c1c !important;
}

.game-story-card.is-minimized {
    width: 260px;
    height: auto !important;
    resize: none;
}

.game-story-card.is-minimized .story-window-body,
.game-story-card.is-closed .story-window-body {
    display: none;
}

.game-story-card.is-closed {
    width: 210px;
    height: auto !important;
    resize: none;
}

.game-story-card.is-closed .story-window-titlebar {
    background: linear-gradient(90deg, #4b5563, #111827);
}

.game-story-card.is-maximized {
    top: 70px !important;
    right: 42px !important;
    bottom: 184px !important;
    left: 42px !important;
    width: auto !important;
    height: auto !important;
    resize: none;
}

.game-choice-deck {
    z-index: 3;
    right: clamp(10px, 1.2vw, 22px);
    bottom: 72px;
    left: clamp(10px, 1.2vw, 22px);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.game-choice-card {
    min-height: 78px;
    padding: 10px 10px 8px;
    border-width: 2px;
}

.game-choice-card strong {
    min-height: 0;
    font-size: clamp(.78rem, 1vw, 1.08rem);
}

.choice-icon {
    width: 26px;
    height: 22px;
    margin: 3px auto;
    font-size: 1.12rem;
}

.game-choice-card small {
    min-height: 0;
    font-size: clamp(.68rem, .82vw, .88rem);
    line-height: 1.12;
}

.game-choice-card em {
    margin-top: 3px;
    font-size: .68rem;
}

.game-status-bar {
    min-height: 70px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.game-status-bar strong {
    font-size: clamp(.94rem, 1.22vw, 1.35rem);
}

@media (max-width: 1100px) {
    .game-stage {
        min-height: 100vh;
        padding-bottom: 260px;
    }

    .game-story-card {
        position: absolute;
        top: 150px;
        left: 18px;
        bottom: auto;
        width: min(560px, calc(100vw - 36px));
        margin-top: 0;
    }

    .game-choice-deck {
        position: fixed;
        right: 0;
        bottom: 112px;
        left: 0;
        grid-template-columns: repeat(5, minmax(110px, 1fr));
        overflow-x: auto;
        padding: 0 8px;
    }

    .game-status-bar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin: 0;
    }
}

@media (max-width: 640px) {
    .game-title-card {
        width: min(100%, 390px);
    }

    .game-choice-deck {
        bottom: 164px;
        grid-template-columns: repeat(5, 136px);
    }

    .game-status-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
