:root {
    --bg: #0b0f1a;
    --card: rgba(255, 255, 255, 0.06);
    --text: #eaf0ff;
    --muted: rgba(234, 240, 255, 0.75);
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: radial-gradient(1200px 600px at 20% 10%, rgba(90, 120, 255, 0.18), transparent 55%),
        radial-gradient(1000px 500px at 80% 30%, rgba(255, 90, 140, 0.14), transparent 55%),
        var(--bg);
    color: var(--text);
    display: grid;
    place-items: center;
    padding: 24px;
}

.wrap {
    width: min(760px, 100%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 28px;
    backdrop-filter: blur(10px);
}

header h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}

.actions {
    display: grid;
    gap: 12px;
}

.btn {
    cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 650;
    font-size: 16px;
    transition: transform 0.08s ease, background 0.2s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    padding: 16px 18px;
    font-size: 18px;
    background: rgba(120, 145, 255, 0.18);
    border-color: rgba(120, 145, 255, 0.35);
}

.btn.primary:hover {
    background: rgba(120, 145, 255, 0.24);
}

.link {
    background: none;
    border: none;
    color: var(--muted);
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
    width: fit-content;
}

.link:hover {
    color: var(--text);
}

.howto {
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.20);
    display: none;
}

.howto[aria-hidden="false"] {
    display: block;
}

footer {
    margin-top: 18px;
    font-size: 12px;
    color: rgba(234, 240, 255, 0.55);
    display: flex;
    justify-content: space-between;
}

/* =========================
   GAME PAGE ADDITIONS
   ========================= */

/* HUD */
.hud {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.game-title {
    margin: 0;
    font-size: 22px;
}

.game-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.hud-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Pills (Round / Lives / Score) */
.pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    display: flex;
    gap: 6px;
    font-size: 13px;
}

.pill-label {
    color: var(--muted);
}

.pill-value {
    font-weight: 700;
}

/* Card */
.card {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    margin-top: 14px;
}

/* Card meta */
.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}

.tag {
    background: rgba(120, 145, 255, 0.18);
    border: 1px solid rgba(120, 145, 255, 0.35);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
}

/* Content */
.headline {
    margin: 8px 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

.snippet {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

/* Claim box */
.claim-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 18px;
}

.claim-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 4px;
}

.claim {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

/* Choices */
.choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.choice {
    font-size: 15px;
}

/* Feedback */
.feedback {
    margin-top: 14px;
    padding: 18px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.feedback[aria-hidden="true"] {
    display: none;
}

.feedback-title {
    margin: 0 0 6px;
    font-size: 16px;
}

.feedback-text {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--muted);
    white-space: pre-line;
}

.feedback-actions {
    text-align: right;
}

/* Round summary / final screens */
#roundSummary[aria-hidden="true"],
#finalScreen[aria-hidden="true"] {
    display: none;
}

#roundSummaryText {
    white-space: pre-line;
}

#finalSummary {
    white-space: pre-line;
}


.muted {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .choices {
        grid-template-columns: 1fr;
    }

    .hud-right {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Timer bar */
.timer {
    margin-top: 12px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--border);
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: rgba(120, 145, 255, 0.45);
    transform-origin: left;
    transform: scaleX(1);
}