/* =============================================================================
   THURSDAY TRIVIA — PAGE STYLES
   Matches the games.css visual vocabulary:
     - Red accent #ff5555, gold accent #ffcc00
     - Dark cards on rgba(26,26,26,0.8) with #333 borders
     - Inter font family, glowing red text-shadows
   ============================================================================= */

/* --- MAIN STATUS PANEL (countdown / ready-to-play / already-played / etc) --- */

.trivia-main-panel {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid #ff5555;
    border-radius: 10px;
    padding: 50px 40px;
    margin-bottom: 60px;
    text-align: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.2);
}

.trivia-main-panel.idle {
    border-color: #444;
    box-shadow: none;
}

.trivia-loading-wrap {
    color: #888;
    font-style: italic;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trivia-state-title {
    font-size: 2rem;
    color: #ff5555;
    text-shadow: 0 0 10px rgba(255, 85, 85, 0.5);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.trivia-state-title.muted {
    color: #888;
    text-shadow: none;
}

.trivia-state-subtitle {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.trivia-state-subtitle .tiny {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-top: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.trivia-countdown-wrap {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0 10px;
    flex-wrap: wrap;
}

.trivia-countdown-unit {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px 18px;
    min-width: 70px;
}

.trivia-countdown-number {
    font-size: 2rem;
    font-weight: 900;
    color: #ff5555;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.trivia-countdown-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.trivia-window-note {
    color: #888;
    font-size: 0.85rem;
    margin-top: 14px;
}

.trivia-window-note strong {
    color: #ccc;
}

.trivia-start-btn {
    display: inline-block;
    background: #ff5555;
    color: #fff;
    padding: 16px 50px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
    text-transform: uppercase;
}

.trivia-start-btn:hover {
    background: #ff7777;
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.5);
    transform: scale(1.03);
}

.trivia-start-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.trivia-xp-awarded {
    display: inline-block;
    background: rgba(255, 85, 85, 0.08);
    border: 1px solid #ff5555;
    color: #ff5555;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 700;
    margin-top: 16px;
    letter-spacing: 0.03em;
}

/* --- QUESTION CARD (during active play) --- */

.trivia-question-card {
    background: rgba(26, 26, 26, 0.9);
    border: 2px solid #ff5555;
    border-radius: 10px;
    padding: 0;
    margin-bottom: 60px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 85, 85, 0.25);
}

.trivia-qc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #333;
}

.trivia-qc-progress {
    color: #888;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.trivia-qc-timer {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ff5555;
    font-variant-numeric: tabular-nums;
    min-width: 50px;
    text-align: right;
}

.trivia-qc-timer.warning {
    color: #ffcc00;
    animation: trivia-pulse 0.5s ease-in-out infinite alternate;
}

.trivia-qc-timer.danger {
    color: #ff5555;
    animation: trivia-pulse 0.25s ease-in-out infinite alternate;
}

@keyframes trivia-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.12); }
}

.trivia-qc-timer-bar-wrap {
    height: 4px;
    background: #222;
    overflow: hidden;
}

.trivia-qc-timer-bar {
    height: 100%;
    width: 100%;
    background: #ff5555;
    transition: width 0.1s linear, background 0.3s;
}

.trivia-qc-timer-bar.warning { background: #ffcc00; }
.trivia-qc-timer-bar.danger  { background: #ff3333; }

.trivia-qc-body {
    padding: 40px 30px;
}

.trivia-qc-question {
    font-size: 1.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 35px;
    line-height: 1.5;
    font-weight: 700;
    min-height: 60px;
}

.trivia-qc-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.trivia-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #333;
    border-radius: 6px;
    padding: 18px 20px;
    color: #eee;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.trivia-option-btn:hover:not(:disabled) {
    border-color: #ff5555;
    background: rgba(255, 85, 85, 0.08);
    transform: translateX(3px);
}

.trivia-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.trivia-option-btn.selected {
    border-color: #ff5555;
    background: rgba(255, 85, 85, 0.15);
    box-shadow: 0 0 15px rgba(255, 85, 85, 0.3);
}

.trivia-option-btn.timeout {
    border-color: #ff3333;
    background: rgba(255, 51, 51, 0.08);
}

.trivia-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #ff5555;
    color: #fff;
    border-radius: 4px;
    font-weight: 900;
    font-size: 1rem;
    flex-shrink: 0;
}

.trivia-option-text {
    flex: 1;
    line-height: 1.4;
}

/* --- REVEAL PANEL --- */

.trivia-reveal-panel {
    margin-bottom: 60px;
}

.trivia-reveal-header {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid #ffcc00;
    border-radius: 10px;
    padding: 35px 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
}

.trivia-reveal-score {
    font-size: 3rem;
    font-weight: 900;
    color: #ffcc00;
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    line-height: 1;
    margin: 10px 0;
    font-variant-numeric: tabular-nums;
}

.trivia-reveal-score-label {
    color: #ccc;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.trivia-reveal-bonus {
    margin-top: 14px;
    color: #55ff99;
    font-weight: 700;
    font-size: 1rem;
}

.trivia-reveal-window-note {
    color: #888;
    font-size: 0.85rem;
    margin-top: 14px;
}

.trivia-reveal-questions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trivia-reveal-q {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
}

.trivia-reveal-q-number {
    color: #888;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 700;
}

.trivia-reveal-q-text {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 16px;
}

.trivia-reveal-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trivia-reveal-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 5px;
    border: 2px solid #333;
    background: rgba(0, 0, 0, 0.3);
    color: #ccc;
    font-size: 0.95rem;
}

.trivia-reveal-option.correct {
    border-color: #55ff99;
    background: rgba(85, 255, 153, 0.1);
    color: #fff;
}

.trivia-reveal-option.player-wrong {
    border-color: #ff5555;
    background: rgba(255, 85, 85, 0.08);
    color: #fff;
}

.trivia-reveal-option .trivia-option-letter {
    background: #444;
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
}

.trivia-reveal-option.correct .trivia-option-letter { background: #55ff99; color: #000; }
.trivia-reveal-option.player-wrong .trivia-option-letter { background: #ff5555; }

.trivia-reveal-marker {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trivia-reveal-marker.correct { color: #55ff99; }
.trivia-reveal-marker.you-got-it { color: #55ff99; }
.trivia-reveal-marker.you-missed { color: #ff5555; }
.trivia-reveal-marker.you-skipped { color: #888; }

/* --- LEADERBOARD STYLING (inherits from games.css, with additions) --- */

.trivia-leaderboard {
    margin-bottom: 40px;
}

.trivia-lb-subtitle {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin: -20px auto 25px;
    max-width: 520px;
    line-height: 1.5;
}

.leaderboard-header.trivia-lb-header-season,
.trivia-lb-row {
    display: grid;
    grid-template-columns: 80px 1fr 80px 120px;
    gap: 20px;
}

.trivia-lb-row {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    transition: background 0.2s ease;
}

.trivia-lb-row:hover { background: rgba(255, 85, 85, 0.05); }
.trivia-lb-row.rank-1 { background: rgba(255, 215, 0, 0.1); }
.trivia-lb-row.rank-2 { background: rgba(192, 192, 192, 0.1); }
.trivia-lb-row.rank-3 { background: rgba(205, 127, 50, 0.1); }

.trivia-lb-weeks-col {
    display: flex;
    align-items: center;
    color: #888;
    font-variant-numeric: tabular-nums;
}

/* --- RESPONSIVE --- */

@media (max-width: 768px) {
    .trivia-main-panel { padding: 35px 20px; }
    .trivia-state-title { font-size: 1.5rem; }
    .trivia-state-subtitle { font-size: 0.95rem; }
    .trivia-countdown-unit { padding: 10px 14px; min-width: 60px; }
    .trivia-countdown-number { font-size: 1.5rem; }

    .trivia-qc-header { padding: 14px 20px; }
    .trivia-qc-timer { font-size: 1.4rem; }
    .trivia-qc-body { padding: 28px 20px; }
    .trivia-qc-question { font-size: 1.2rem; margin-bottom: 25px; }
    .trivia-qc-options { grid-template-columns: 1fr; gap: 10px; }
    .trivia-option-btn { padding: 14px 16px; font-size: 0.95rem; }

    .trivia-reveal-score { font-size: 2.2rem; }
    .trivia-reveal-q { padding: 18px; }
    .trivia-reveal-q-text { font-size: 1rem; }

    .leaderboard-header.trivia-lb-header-season,
    .trivia-lb-row {
        grid-template-columns: 50px 1fr 60px 80px;
        gap: 10px;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .leaderboard-header.trivia-lb-header-season,
    .trivia-lb-row {
        grid-template-columns: 40px 1fr 50px 70px;
        gap: 6px;
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    .trivia-start-btn { padding: 14px 32px; font-size: 1rem; }
}
