/* ============================================================
   Football Quiz – Complete Stylesheet
   Mobile-first, football-themed dark design
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

/* ── CSS Variables ── */
:root {
    --green-deep:    #091510;
    --green-dark:    #1a472a;
    --green-mid:     #2d5a27;
    --green-light:   #3a7a30;
    --gold:          #78c828;
    --gold-dark:     #5a9c1a;
    --gold-light:    #9ade3e;
    --orange:        #ffa500;
    --white:         #ffffff;
    --off-white:     #f0f4f0;
    --gray-light:    #d0d8d0;
    --gray-mid:      #8a9a8a;
    --gray-dark:     #3a4a3a;
    --red:           #e74c3c;
    --red-dark:      #c0392b;
    --bg-card:       rgba(255,255,255,0.05);
    --bg-card-hover: rgba(255,255,255,0.09);
    --border:        rgba(120,200,40,0.2);
    --border-gold:   rgba(120,200,40,0.5);
    --shadow:        0 4px 24px rgba(0,0,0,0.4);
    --shadow-gold:   0 0 20px rgba(120,200,40,0.3);
    --radius:        12px;
    --radius-sm:     8px;
    --transition:    all 0.25s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Roboto', sans-serif;
    background: var(--green-deep);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Grass texture background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.015) 40px,
            rgba(255,255,255,0.015) 80px
        ),
        radial-gradient(ellipse at 50% 0%, rgba(45,90,39,0.5) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); text-decoration: underline; }

h1, h2, h3 { font-family: 'Oswald', sans-serif; letter-spacing: 0.02em; }

img { max-width: 100%; }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--green-deep); }
::-webkit-scrollbar-thumb { background: var(--green-mid); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a3a6e 100%); 
    border-bottom: 2px solid var(--border-gold);
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon { font-size: 1.8rem; animation: spin 8s linear infinite; }
@keyframes spin { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(360deg); } }

.logo-text {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo-accent { color: var(--gold); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nav-user {
    color: var(--gray-light);
    font-size: 0.9rem;
    padding: 0.25rem 0.6rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.nav-link {
    color: var(--gray-light);
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.nav-link:hover { color: var(--white); background: var(--bg-card-hover); text-decoration: none; }
.nav-admin { color: var(--gold) !important; }
.nav-logout { color: var(--red) !important; }
.nav-register { background: var(--green-mid); color: var(--white) !important; }

/* ============================================================
   MAIN & FOOTER
   ============================================================ */
.site-main {
    min-height: calc(100vh - 128px);
    padding: 1.5rem 1rem;
}

.site-footer {
    background: var(--green-deep);
    border-top: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
    color: var(--gray-mid);
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-link { color: var(--gray-light); }
.footer-link:hover { color: var(--gold); }
.footer-sep { opacity: 0.3; }

/* ============================================================
   ALERT BANNERS
   ============================================================ */
.alert {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alert-success {
    background: rgba(46,160,67,0.2);
    border: 1px solid rgba(46,160,67,0.5);
    color: #7fff9e;
}

.alert-error {
    background: rgba(231,76,60,0.2);
    border: 1px solid rgba(231,76,60,0.5);
    color: #ff9d91;
}

.alert-link { color: inherit; text-decoration: underline; font-weight: 700; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.4rem;
    min-height: 44px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-dark) 100%);
    color: var(--white);
    border-color: var(--gold);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
    color: var(--white);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn-outline:hover:not(:disabled) {
    background: var(--gold);
    color: var(--green-deep);
    text-decoration: none;
}

.btn-danger {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn-danger:hover:not(:disabled) {
    background: var(--red-dark);
    border-color: var(--red-dark);
}

.btn-block { display: flex; width: 100%; }

.btn-xl { font-size: 1.2rem; padding: 0.8rem 2rem; min-height: 56px; }
.btn-lg { font-size: 1.1rem; padding: 0.7rem 1.8rem; min-height: 50px; }
.btn-sm { font-size: 0.85rem; padding: 0.35rem 0.75rem; min-height: 34px; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 1.2rem; }
.form-group--full { grid-column: 1 / -1; }

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-light);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    min-height: 44px;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.15);
}

.form-input::placeholder { color: var(--gray-mid); }

.form-input option { background: var(--green-dark); color: var(--white); }

.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 3rem; }

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: var(--transition);
    padding: 0.25rem;
}

.toggle-password:hover { opacity: 1; }

.form-errors { margin-bottom: 1rem; }
.form-error {
    color: #ff9d91;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-body .site-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }

.auth-container { width: 100%; max-width: 440px; }

.auth-card {
    background: linear-gradient(145deg, rgba(26,71,42,0.9), rgba(13,40,24,0.95));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow), var(--shadow-gold);
    backdrop-filter: blur(10px);
}

.auth-logo { text-align: center; font-size: 3rem; margin-bottom: 0.5rem; }
.auth-title {
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.25rem;
}
.auth-subtitle { text-align: center; color: var(--gray-mid); font-size: 0.95rem; margin-bottom: 1.5rem; }

.auth-form { margin-top: 1.5rem; }

.auth-switch {
    text-align: center;
    color: var(--gray-mid);
    font-size: 0.9rem;
    margin-top: 1.25rem;
}

.auth-link { color: var(--gold); font-weight: 500; }

.auth-divider {
    text-align: center;
    position: relative;
    margin: 1rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    position: relative;
    background: var(--green-dark);
    padding: 0 0.75rem;
    color: var(--gray-mid);
    font-size: 0.85rem;
}

/* ============================================================
   GAME SETUP
   ============================================================ */
.setup-container { max-width: 700px; margin: 0 auto; }

.setup-header { text-align: center; margin-bottom: 2rem; }
.setup-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255,215,0,0.3);
}
.setup-subtitle { color: var(--gray-light); margin-top: 0.5rem; }

.setup-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.setup-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
}

/* Player count */
.player-count-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.player-count-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.count-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.player-count-option.selected .count-card,
.player-count-option:hover .count-card {
    border-color: var(--gold);
    background: rgba(255,215,0,0.1);
}

.count-icons { font-size: 1.2rem; margin-bottom: 0.25rem; }
.count-number { font-family: 'Oswald', sans-serif; font-size: 2rem; color: var(--gold); }
.count-label { font-size: 0.8rem; color: var(--gray-light); }

/* Player names */
.player-names-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.player-name-row { display: flex; align-items: center; gap: 0.75rem; }
.player-name-row.hidden { display: none; }
.player-name-label { display: flex; align-items: center; gap: 0.4rem; min-width: 100px; font-size: 0.9rem; color: var(--gray-light); }
.player-badge { font-size: 1.2rem; }
.player-name-input { flex: 1; }

/* Target score */
.target-score-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.target-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.target-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.target-option.selected .target-card,
.target-option:hover .target-card {
    border-color: var(--gold);
    background: rgba(255,215,0,0.1);
}

.target-number { font-family: 'Oswald', sans-serif; font-size: 1.8rem; color: var(--gold); }
.target-label { font-size: 0.8rem; color: var(--gray-light); }

/* Difficulty */
.difficulty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.difficulty-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.difficulty-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.difficulty-option.selected .difficulty-card,
.difficulty-option:hover .difficulty-card {
    border-color: var(--gold);
    background: rgba(255,215,0,0.1);
}

.diff-icon { font-size: 1.8rem; margin-bottom: 0.25rem; }
.diff-name { font-family: 'Oswald', sans-serif; font-size: 1.1rem; color: var(--gold); }
.diff-desc { font-size: 0.75rem; color: var(--gray-mid); margin-top: 0.2rem; }

.setup-actions { text-align: center; padding: 1rem 0; }

.setup-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    color: var(--gray-mid);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* ============================================================
   GAME PLAY
   ============================================================ */
.play-body .site-main { padding: 1rem; }

.play-container { max-width: 700px; margin: 0 auto; }

/* Scoreboard */
.scoreboard {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    text-align: center;
    min-width: 80px;
    transition: var(--transition);
}

.score-card--active {
    border-color: var(--gold);
    background: rgba(255,215,0,0.1);
    box-shadow: 0 0 12px rgba(255,215,0,0.2);
}

.score-name { font-size: 0.75rem; color: var(--gray-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.score-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: var(--gold);
    line-height: 1;
    transition: transform 0.3s ease;
}
.score-value.score-bump { animation: scoreBump 0.5s ease; }
@keyframes scoreBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); color: var(--gold-light); }
    100% { transform: scale(1); }
}
.score-target { font-size: 0.7rem; color: var(--gray-mid); }

/* Turn banner */
.turn-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}

.turn-label { color: var(--gray-light); font-size: 0.85rem; }
.turn-name { font-family: 'Oswald', sans-serif; font-size: 1.3rem; color: var(--gold); margin-left: 0.4rem; }
.tiebreaker-badge {
    background: var(--red);
    color: var(--white);
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

/* Progress bar */
.progress-bar-wrap { margin-bottom: 1rem; }
.progress-bar-track {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 4px;
    transition: width 0.5s ease;
}
.progress-label { font-size: 0.8rem; color: var(--gray-mid); text-align: right; margin-top: 0.25rem; }

/* Question card */
.question-card {
    background: linear-gradient(145deg, rgba(26,71,42,0.8), rgba(13,40,24,0.9));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.question-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    color: var(--gold);
}

.btn-speak {
    background: none;
    border: 1.5px solid var(--border-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-speak:hover {
    background: rgba(255,215,0,0.15);
    border-color: var(--gold);
}

/* Clues list */
.clues-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.clue-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    border-left: 3px solid var(--green-light);
    transition: var(--transition);
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.clue-item.clue-hidden { display: none; }

.clue-number {
    font-family: 'Oswald', sans-serif;
    color: var(--gold);
    font-size: 0.95rem;
    min-width: 20px;
    flex-shrink: 0;
}

.clue-text { color: var(--off-white); font-size: 0.95rem; line-height: 1.5; }

.reveal-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.clues-counter { font-size: 0.85rem; color: var(--gray-mid); }

/* Options grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1.25rem 0.75rem;
    min-height: 100px;
    background: linear-gradient(145deg, rgba(26,71,42,0.8), rgba(13,40,24,0.9));
    border: 2px solid var(--border-gold);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-option:hover:not(:disabled) {
    border-color: var(--gold);
    background: rgba(255,215,0,0.1);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

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

.btn-option--correct {
    border-color: #2ecc71 !important;
    background: rgba(46,204,113,0.2) !important;
    box-shadow: 0 0 15px rgba(46,204,113,0.3) !important;
}

.btn-option--wrong {
    border-color: var(--red) !important;
    background: rgba(231,76,60,0.2) !important;
}

.option-label {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.option-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    word-break: break-word;
}

.option-club {
    font-size: 0.8rem;
    color: var(--gray-light);
}

.vs-divider {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
}

/* Result panel */
.result-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
}

.result-correct { background: rgba(46,204,113,0.2); border: 1px solid #2ecc71; }
.result-wrong { background: rgba(231,76,60,0.2); border: 1px solid var(--red); }

.result-icon { font-size: 2rem; }
.result-text strong { color: var(--gold); }

/* Result overlay */
.result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.result-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.result-overlay.hidden { display: none; }

.result-overlay-card {
    background: linear-gradient(145deg, var(--green-dark), var(--green-deep));
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-gold), var(--shadow);
    animation: popIn 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.result-overlay-icon { font-size: 4rem; margin-bottom: 0.5rem; }
.result-overlay-text {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.result-player-name {
    color: var(--off-white);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
.result-actions { margin-top: 1rem; }

.next-controls { text-align: center; margin: 1rem 0; }

/* ============================================================
   RESULTS PAGE
   ============================================================ */
.results-body .site-main { padding: 1.5rem 1rem; }
.results-container { max-width: 700px; margin: 0 auto; }

.results-header { text-align: center; margin-bottom: 2rem; }

.winner-banner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.winner-trophy { font-size: 4rem; animation: bounce 1s ease infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }

.winner-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(255,215,0,0.5);
}
.winner-score { font-size: 1.2rem; color: var(--gray-light); }

.tie-banner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.tie-icon { font-size: 3.5rem; }
.tie-title { font-family: 'Oswald', sans-serif; font-size: 2rem; color: var(--gray-light); }
.tie-names { color: var(--gold); font-size: 1.1rem; }

.results-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.results-scoreboard {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-table { display: flex; flex-direction: column; gap: 0.75rem; }

.results-row {
    display: grid;
    grid-template-columns: 2.5rem 1fr 1fr auto auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.results-row--first {
    background: rgba(255,215,0,0.08);
    border-color: var(--border-gold);
}

.results-rank { font-size: 1.3rem; text-align: center; }
.results-player { font-family: 'Oswald', sans-serif; font-size: 1.1rem; }
.results-score-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.results-score-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 4px; }
.results-score-num { font-family: 'Oswald', sans-serif; font-size: 1.4rem; color: var(--gold); text-align: right; min-width: 30px; }
.results-questions { font-size: 0.8rem; color: var(--gray-mid); text-align: right; }
.results-accuracy { font-size: 0.85rem; color: var(--green-light); text-align: right; min-width: 40px; }

.btn-speak-results { display: block; margin: 0 auto 1.5rem; }

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.results-saved { text-align: center; color: var(--gray-mid); font-size: 0.85rem; }

/* ============================================================
   ADMIN PAGES
   ============================================================ */
.admin-body .site-main { padding: 1.5rem 1rem; }
.admin-container { max-width: 1100px; margin: 0 auto; }

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--gold);
}

.admin-subtitle { color: var(--gray-mid); font-size: 0.95rem; margin-top: 0.25rem; }

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
}

.admin-stat-card:hover { border-color: var(--gold); background: var(--bg-card-hover); }

.stat-icon { font-size: 2rem; margin-bottom: 0.4rem; }
.stat-value { font-family: 'Oswald', sans-serif; font-size: 2rem; color: var(--gold); }
.stat-label { font-size: 0.8rem; color: var(--gray-mid); margin-top: 0.2rem; }

.admin-section { margin-bottom: 1.5rem; }
.admin-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.admin-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.admin-action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.admin-action-card:hover {
    border-color: var(--gold);
    background: var(--bg-card-hover);
    text-decoration: none;
    transform: translateY(-2px);
}

.action-icon { font-size: 1.8rem; }
.action-label { font-size: 0.85rem; color: var(--gray-light); }

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.admin-card-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

/* Tables */
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}

.admin-table th {
    background: rgba(255,215,0,0.1);
    color: var(--gold);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-gold);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--off-white);
    vertical-align: middle;
}

.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table tr:last-child td { border-bottom: none; }
.row-self td { background: rgba(255,215,0,0.04) !important; }

.td-id { color: var(--gray-mid); font-size: 0.8rem; }
.td-name { min-width: 140px; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-easy    { background: rgba(46,204,113,0.2); color: #7fff9e; border: 1px solid rgba(46,204,113,0.4); }
.badge-medium  { background: rgba(255,165,0,0.2);  color: #ffd080; border: 1px solid rgba(255,165,0,0.4); }
.badge-hard    { background: rgba(231,76,60,0.2);  color: #ff9d91; border: 1px solid rgba(231,76,60,0.4); }
.badge-self    { background: rgba(255,215,0,0.2);  color: var(--gold); border: 1px solid var(--border-gold); margin-left: 0.4rem; }
.badge-role-admin { background: rgba(255,215,0,0.2); color: var(--gold); border: 1px solid var(--border-gold); }
.badge-role-user  { background: var(--bg-card); color: var(--gray-light); border: 1px solid var(--border); }

.text-success { color: #7fff9e; }
.text-warn    { color: #ffd080; }
.text-muted   { color: var(--gray-mid); }

/* AI import form */
.ai-form-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.ai-note { font-size: 0.85rem; color: var(--gray-mid); margin-top: 0.75rem; }

/* Clues preview */
.clues-preview { margin-top: 0.5rem; padding-left: 1rem; font-size: 0.8rem; color: var(--gray-light); }
.clues-preview li { margin-bottom: 0.2rem; }
.clues-preview.hidden { display: none; }

.btn-toggle-clues {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0 0.25rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-mid);
    font-size: 0.95rem;
}

/* ── Hamburger Button ── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1.5px solid var(--border-gold);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.3rem;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .site-header { padding: 0 0.75rem; }
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        min-height: 56px;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        row-gap: 0;
        align-items: center;
    }
    .logo { height: 36px; align-items: center; }
    .logo-text { font-size: 1.2rem; }

    .hamburger-btn { display: flex; }

    .site-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        border-top: 1px solid var(--border);
        padding: 0.5rem 0;
        gap: 0.25rem;
        flex-wrap: nowrap;
    }
    .site-nav.is-open { display: flex; }
    .nav-user { display: flex !important; justify-content: center; }
    .nav-link { padding: 0.6rem 0.5rem; width: 100%; text-align: center; }

    .setup-container { padding: 0; }
    .setup-title { font-size: 2rem; }
    .setup-section { padding: 1.1rem; }

    .target-score-grid { grid-template-columns: repeat(4, 1fr); }
    .target-number { font-size: 1.4rem; }

    .difficulty-grid { grid-template-columns: repeat(3, 1fr); }

    .options-grid { grid-template-columns: 1fr auto 1fr; }
    .btn-option { min-height: 80px; padding: 0.75rem 0.5rem; }
    .option-name { font-size: 0.95rem; }

    .results-row {
        grid-template-columns: 2rem 1fr auto auto;
        grid-template-rows: auto auto;
    }
    .results-score-bar { display: none; }
    .results-questions { display: none; }

    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .ai-form-row { flex-direction: column; }
    .ai-form-row > * { width: 100% !important; }

    .auth-card { padding: 1.75rem 1.25rem; }
}

@media (max-width: 380px) {
    .scoreboard { gap: 0.25rem; }
    .score-card { min-width: 60px; padding: 0.4rem 0.5rem; }
    .score-name { max-width: 60px; font-size: 0.7rem; }
    .score-value { font-size: 1.4rem; }
}
