/* ── Game Night Page ──────────────────────────────────────────────── */

        body { background: var(--paper); }

        .game-hero {
            text-align: center;
            padding: 60px 20px 40px;
            background: var(--ink);
            color: var(--paper);
            margin-bottom: 0;
        }

        .game-hero h1 {
            font-size: 3.5rem;
            color: var(--accent-gold);
            margin-bottom: 10px;
            text-shadow: 3px 3px 0 rgba(0,0,0,0.4);
        }

        .game-hero .subtitle {
            font-family: var(--font-hand);
            font-size: 1.4rem;
            color: #ccc;
            margin-bottom: 0;
        }

        .spotlight-bar {
            height: 6px;
            background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
            margin-bottom: 40px;
        }

        /* ── Game Selector Grid ───────────────────────────────────────────── */

        .game-selector {
            padding: 0 20px 60px;
        }

        .game-selector-heading {
            font-family: var(--font-hand);
            font-size: 1.1rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--ink-faint);
            text-align: center;
            margin-bottom: 24px;
        }

        .game-cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            max-width: 1100px;
            margin: 0 auto;
        }

        .game-card {
            border: 3px solid var(--ink);
            padding: 28px 24px;
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s;
            background: var(--paper);
            position: relative;
            overflow: hidden;
        }

        .game-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 5px;
        }

        .game-card:hover {
            transform: translate(-3px, -3px);
            box-shadow: 5px 5px 0 var(--ink);
        }

        .game-card:active {
            transform: translate(0, 0);
            box-shadow: none;
        }

        .game-card-icon {
            font-size: 2.5rem;
            display: block;
            margin-bottom: 10px;
        }

        .game-card-name {
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.4rem;
            margin-bottom: 6px;
        }

        .game-card-desc {
            font-family: var(--font-hand);
            font-size: 1.05rem;
            color: var(--ink-light);
            line-height: 1.4;
            margin-bottom: 14px;
        }

        .game-card-tag {
            font-family: var(--font-hand);
            font-size: 0.85rem;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: 2px;
            display: inline-block;
        }

        /* Card accent colors */
        .gc-red::before { background: #e74c3c; }
        .gc-red .game-card-name { color: #c0392b; }
        .gc-red .game-card-tag { background: #fce4ec; color: #c0392b; }

        .gc-gold::before { background: var(--accent-gold); }
        .gc-gold .game-card-name { color: #b8860b; }
        .gc-gold .game-card-tag { background: var(--accent-gold-light); color: #b8860b; }

        .gc-green::before { background: #27ae60; }
        .gc-green .game-card-name { color: #1e8449; }
        .gc-green .game-card-tag { background: #d4efdf; color: #1e8449; }

        .gc-blue::before { background: #2980b9; }
        .gc-blue .game-card-name { color: #1a6fa0; }
        .gc-blue .game-card-tag { background: #d6eaf8; color: #1a6fa0; }

        .gc-purple::before { background: #8e44ad; }
        .gc-purple .game-card-name { color: #7d3c98; }
        .gc-purple .game-card-tag { background: #e8daef; color: #7d3c98; }

        .gc-orange::before { background: #e67e22; }
        .gc-orange .game-card-name { color: #ca6f1e; }
        .gc-orange .game-card-tag { background: #fdebd0; color: #ca6f1e; }

        .gc-teal::before { background: #16a085; }
        .gc-teal .game-card-name { color: #138d75; }
        .gc-teal .game-card-tag { background: #d0ece7; color: #138d75; }

        /* ── Game Play Area ───────────────────────────────────────────────── */

        #gamePlayArea {
            display: none;
            background: var(--ink);
            min-height: 100vh;
            padding: 80px 20px 40px;
            position: fixed;
            inset: 0;
            z-index: 500;
            overflow-y: auto;
        }

        .play-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 900px;
            margin: 0 auto 30px;
            flex-wrap: wrap;
            gap: 12px;
        }

        .play-game-name {
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.5rem;
            color: var(--accent-gold);
        }

        .play-controls {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        /* The Big Reveal Display */
        .prompt-stage {
            max-width: 900px;
            margin: 0 auto 30px;
            min-height: 300px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 40px;
            border: 2px solid rgba(255,255,255,0.1);
            position: relative;
        }

        .prompt-display {
            font-family: var(--font-body); font-weight: 700;
            font-size: clamp(1.6rem, 4vw, 3rem);
            color: #ffffff;
            line-height: 1.3;
            text-shadow: 0 2px 8px rgba(0,0,0,0.5);
            opacity: 0;
            transform: translateY(20px) scale(0.96);
            transition: opacity 0.4s ease, transform 0.4s ease;
        }

        .prompt-display.revealed {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        .prompt-sub {
            font-family: var(--font-hand);
            font-size: 1.1rem;
            color: #aaa;
            margin-top: 14px;
            opacity: 0;
            transition: opacity 0.4s ease 0.2s;
        }

        .prompt-sub.revealed { opacity: 1; }

        /* Flash on transition */
        @keyframes flashReveal {
            0% { background: rgba(212, 160, 23, 0.3); }
            100% { background: transparent; }
        }

        .prompt-stage.flash { animation: flashReveal 0.5s ease-out; }

        /* ── Timer Bar ────────────────────────────────────────────────────── */

        .timer-area {
            max-width: 900px;
            margin: 0 auto 24px;
        }

        .timer-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .timer-label {
            font-family: var(--font-hand);
            font-size: 1rem;
            color: #aaa;
        }

        .timer-count {
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.8rem;
            color: var(--accent-gold);
            transition: color 0.5s;
            min-width: 60px;
            text-align: right;
        }

        .timer-count.urgent { color: #e74c3c; }

        .timer-bar-track {
            width: 100%;
            height: 10px;
            background: rgba(255,255,255,0.1);
            border-radius: 5px;
            overflow: hidden;
        }

        .timer-bar-fill {
            height: 100%;
            border-radius: 5px;
            background: var(--accent-gold);
            transition: width 1s linear, background 0.5s;
            width: 100%;
        }

        .timer-bar-fill.urgent { background: #e74c3c; }

        /* ── Progress & Score ─────────────────────────────────────────────── */

        .play-footer {
            max-width: 900px;
            margin: 0 auto;
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            align-items: flex-start;
        }

        .prompt-counter {
            font-family: var(--font-hand);
            font-size: 1.1rem;
            color: #aaa;
            min-width: 80px;
        }

        .prompt-dots {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            flex: 1;
        }

        .prompt-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            transition: background 0.3s;
        }

        .prompt-dot.done { background: var(--accent-gold); }
        .prompt-dot.current { background: white; }

        /* ── Score Tracker ────────────────────────────────────────────────── */

        .score-area {
            max-width: 900px;
            margin: 30px auto 0;
            padding-top: 20px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .score-heading {
            font-family: var(--font-hand);
            font-size: 1rem;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 12px;
        }

        .score-teams {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }

        .score-team {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(255,255,255,0.05);
            padding: 10px 16px;
            border-radius: 4px;
        }

        .score-team-name {
            font-family: var(--font-hand);
            font-size: 1rem;
            color: #ccc;
        }

        .score-value {
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.5rem;
            color: var(--accent-gold);
            min-width: 30px;
            text-align: center;
        }

        .score-btn {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1rem;
            line-height: 1;
            transition: background 0.15s;
        }

        .score-btn:hover { background: rgba(212,160,23,0.4); }

        /* ── Game Config Panels ───────────────────────────────────────────── */

        #configArea {
            max-width: 600px;
            margin: 0 auto 30px;
            display: none;
        }

        .config-card {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.15);
            padding: 24px;
            margin-bottom: 16px;
        }

        .config-label {
            font-family: var(--font-hand);
            font-size: 1rem;
            color: #aaa;
            display: block;
            margin-bottom: 8px;
        }

        .config-select, .config-input {
            width: 100%;
            padding: 10px 14px;
            font-family: var(--font-hand);
            font-size: 1.1rem;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.2);
            color: white;
            border-radius: 2px;
            outline: none;
            margin-bottom: 12px;
        }

        .config-select option { background: #1a1a1a; color: white; }
        .config-select:focus, .config-input:focus { border-color: var(--accent-gold); }

        .config-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        /* ── Whose Line special layout ────────────────────────────────────── */

        .wl-game-info {
            max-width: 700px;
            margin: 0 auto 20px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.15);
            padding: 20px 24px;
        }

        .wl-instructions {
            font-family: var(--font-hand);
            font-size: 1.1rem;
            color: #ccc;
            line-height: 1.6;
            margin-bottom: 16px;
        }

        .wl-suggestions-list {
            list-style: none;
            padding: 0;
        }

        .wl-suggestion {
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.4rem;
            color: var(--paper);
            padding: 16px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            opacity: 0.3;
            transition: opacity 0.3s, transform 0.3s;
            cursor: pointer;
        }

        .wl-suggestion:last-child { border-bottom: none; }
        .wl-suggestion.active { opacity: 1; transform: scale(1.02); color: var(--accent-gold); }
        .wl-suggestion.done { opacity: 0.15; text-decoration: line-through; }

        /* ── Character swap card ──────────────────────────────────────────── */

        .char-details {
            max-width: 700px;
            margin: 0 auto 16px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .char-detail-box {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            padding: 14px 18px;
        }

        .char-detail-label {
            font-family: var(--font-hand);
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #666;
            margin-bottom: 4px;
        }

        .char-detail-value {
            font-family: var(--font-hand);
            font-size: 1.05rem;
            color: #ccc;
            line-height: 1.4;
        }

        .char-one-liner {
            max-width: 700px;
            margin: 0 auto 16px;
            background: rgba(212,160,23,0.1);
            border-left: 3px solid var(--accent-gold);
            padding: 14px 20px;
            font-family: var(--font-hand);
            font-size: 1.2rem;
            font-style: italic;
            color: #ddd;
        }

        /* ── Emotion card ─────────────────────────────────────────────────── */

        .emotion-meta {
            max-width: 700px;
            margin: 0 auto 16px;
            display: flex;
            gap: 16px;
            align-items: center;
        }

        .emotion-intensity {
            display: flex;
            gap: 4px;
        }

        .intensity-pip {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255,255,255,0.15);
        }

        .intensity-pip.filled { background: var(--accent-gold); }
        .intensity-pip.urgent { background: #e74c3c; }

        .emotion-note {
            max-width: 700px;
            margin: 0 auto 16px;
            font-family: var(--font-hand);
            font-size: 1rem;
            color: #888;
            font-style: italic;
        }

        /* ── Loading overlay in play area ─────────────────────────────────── */

        .play-loading {
            text-align: center;
            padding: 60px 20px;
        }

        .play-loading .spinner {
            border-color: rgba(255,255,255,0.2);
            border-top-color: var(--accent-gold);
            width: 40px;
            height: 40px;
        }

        .play-loading p {
            font-family: var(--font-hand);
            font-size: 1.3rem;
            color: #888;
            margin-top: 16px;
        }

        /* ── Roast layout ─────────────────────────────────────────────────── */

        .roast-setups {
            max-width: 700px;
            margin: 0 auto;
        }

        .roast-setup-card {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            padding: 20px 24px;
            margin-bottom: 14px;
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s;
        }

        .roast-setup-card:hover { background: rgba(255,255,255,0.08); border-color: var(--accent-gold); }
        .roast-setup-card.active { background: rgba(212,160,23,0.1); border-color: var(--accent-gold); }

        .roast-setup-text {
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.2rem;
            color: var(--paper);
            margin-bottom: 8px;
        }

        .roast-angle {
            font-family: var(--font-hand);
            font-size: 0.9rem;
            color: #888;
            margin-bottom: 6px;
        }

        .roast-punchline {
            font-family: var(--font-hand);
            font-size: 1rem;
            color: var(--accent-gold);
            font-style: italic;
        }

        .roast-opener {
            max-width: 700px;
            margin: 0 auto 24px;
            text-align: center;
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.6rem;
            color: var(--accent-gold);
        }

        /* ── Scenario display ─────────────────────────────────────────────── */

        .scenario-card {
            max-width: 700px;
            margin: 0 auto;
        }

        .scenario-section {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            padding: 16px 20px;
            margin-bottom: 10px;
        }

        .scenario-section-label {
            font-family: var(--font-hand);
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: #555;
            margin-bottom: 6px;
        }

        .scenario-section-value {
            font-family: var(--font-hand);
            font-size: 1.05rem;
            color: #ccc;
            line-height: 1.5;
        }

        .scenario-twist-box {
            background: rgba(231,76,60,0.15);
            border: 1px solid rgba(231,76,60,0.4);
            padding: 16px 20px;
            margin-bottom: 10px;
        }

        .scenario-twist-label {
            font-family: var(--font-hand);
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: #e74c3c;
            margin-bottom: 6px;
        }

        .scenario-twist-value {
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.1rem;
            color: #ff8080;
            line-height: 1.4;
        }

        .scenario-opening {
            background: rgba(212,160,23,0.15);
            border: 1px solid rgba(212,160,23,0.4);
            padding: 16px 20px;
            font-family: var(--font-body); font-weight: 700;
            font-size: 1.3rem;
            color: var(--accent-gold);
        }

        /* ── Buttons in dark context ──────────────────────────────────────── */

        .btn-outline-light {
            background: transparent;
            border: 2px solid rgba(255,255,255,0.3);
            color: white;
        }

        .btn-outline-light:hover {
            background: rgba(255,255,255,0.1);
            border-color: white;
        }

        .btn-next {
            background: var(--accent-gold);
            border: 2px solid var(--accent-gold);
            color: var(--ink);
            font-size: 1.3rem;
            padding: 12px 36px;
        }

        .btn-next:hover { background: #f1c40f; border-color: #f1c40f; }

        /* ── Auth gate ────────────────────────────────────────────────────── */

        #authGate {
            text-align: center;
            padding: 60px 20px;
            max-width: 500px;
            margin: 0 auto;
        }

        #authGate h2 { color: var(--paper); margin-bottom: 12px; }
        #authGate p { font-family: var(--font-hand); font-size: 1.2rem; color: #aaa; margin-bottom: 24px; }

        @media (max-width: 600px) {
            .game-hero h1 { font-size: 2.5rem; }
            .char-details { grid-template-columns: 1fr; }
            .config-row { grid-template-columns: 1fr; }
            .prompt-display { font-size: 1.5rem; }
        }
