/* ========================================================
   PredictPlay — Styles
   ======================================================== */

/* --- Custom Properties --- */
:root {
    --bg: #111117;
    --bg2: #161620;
    --surface: #1A1A24;
    --card: rgba(26, 26, 36, 0.92);
    --border: rgba(0, 199, 177, 0.10);
    --border-hover: rgba(0, 199, 177, 0.30);
    --primary: #00C7B1;
    --primary-glow: rgba(0, 199, 177, 0.30);
    --accent: #00E6CC;
    --accent-glow: rgba(0, 230, 204, 0.25);
    --success: #4ABA24;
    --warning: #f59e0b;
    --danger: #CC5B5A;
    --gold: #fbbf24;
    --text: #F0F0F5;
    --text-dim: #8890A0;
    --text-bright: #FFFFFF;
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Montserrat', system-ui, sans-serif;
    --mono: 'Montserrat', system-ui, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; background: var(--bg); }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
#app {
    position: relative;
    min-height: 100vh;
}
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
a { color: var(--accent); text-decoration: none; }
::selection { background: var(--primary); color: #fff; }

/* --- Screen System --- */
.screen {
    display: none;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 24px;
    animation: fadeIn 0.4s ease;
}
.screen.active { display: flex; flex-direction: column; align-items: center; }
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    margin-bottom: 32px;
}
.screen-header h2 { font-size: 1.4rem; font-weight: 700; }

/* --- Typography --- */
h1 { font-weight: 900; letter-spacing: -0.03em; }
h2 { font-weight: 700; letter-spacing: -0.02em; }
h3 { font-weight: 600; font-size: 1.05rem; color: var(--text-dim); }
h4 { font-weight: 600; font-size: 0.85rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}
.btn-primary:hover { background: #00D4BE; box-shadow: 0 0 30px var(--primary-glow); transform: translateY(-1px); }
.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); background: var(--card); }
.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    padding: 8px 14px;
}
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 16px 48px; font-size: 1.2rem; border-radius: var(--radius); }

/* --- Input --- */
.input-text {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg2);
    color: var(--text-bright);
    font-family: var(--mono);
    font-size: 1.1rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s;
}
.input-text:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.input-text::placeholder { color: var(--text-dim); font-weight: 400; }

/* --- Modal --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 9, 24, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}
.modal.hidden { display: none; }
.modal-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    width: 90%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ===== LANDING ===== */
.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    min-height: 90vh;
    text-align: center;
}
.logo-block { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.logo-icon { font-size: 4rem; filter: drop-shadow(0 0 30px var(--primary-glow)); animation: float 3s ease-in-out infinite; }
.logo-text {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--text-bright), var(--primary), var(--accent));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}
.logo-text .accent {
    background: linear-gradient(135deg, var(--accent), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.tagline { font-size: 1.15rem; color: var(--text-dim); font-weight: 400; max-width: 400px; }
.rules-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    backdrop-filter: blur(12px);
    max-width: 500px;
    width: 100%;
}
.rules-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.rule-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    text-align: left;
}
.rule-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.sports-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.sport-badge {
    padding: 8px 18px;
    border-radius: 50px;
    background: var(--card);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

/* ===== MATCH SELECT ===== */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 900px;
}
.match-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.match-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-glow), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}
.match-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0, 199, 177, 0.12); }
.match-card:hover::before { opacity: 1; }
.match-card-inner { position: relative; z-index: 1; }
.match-sport { font-size: 2rem; margin-bottom: 12px; }
.match-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.match-desc { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 16px; line-height: 1.5; }
.match-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-dim); flex-wrap: wrap; }
.match-meta span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.match-teams-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}
.match-vs {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 400;
    text-transform: uppercase;
}
.match-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}
.badge-live {
    background: transparent;
    color: var(--success);
    border: 1px solid var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
}
.badge-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 186, 36, 0.6); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(74, 186, 36, 0); }
}
.badge-demo { background: var(--primary); color: #fff; }

/* ===== GAME SCREEN ===== */
.game-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin-bottom: 16px;
}
.game-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: var(--text-bright); }
.btn-back-game {
    font-size: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.btn-back-game:hover { opacity: 1; }
.game-timer {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

/* --- Arena --- */
.game-arena {
    width: 100%;
    max-width: 800px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s;
}
.game-arena.intense { box-shadow: 0 0 40px var(--danger), inset 0 0 60px rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.3); }

/* Demo Visualization */
.demo-viz {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-height: 240px;
    justify-content: center;
    position: relative;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(6, 182, 212, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    overflow: hidden;
}
.demo-viz::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,0.03) 49.5%, rgba(255,255,255,0.03) 50.5%, transparent 50.5%),
        linear-gradient(0deg, transparent 49.5%, rgba(255,255,255,0.02) 49.5%, rgba(255,255,255,0.02) 50.5%, transparent 50.5%);
    pointer-events: none;
}
.demo-viz::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.demo-teams {
    display: flex;
    align-items: center;
    gap: 32px;
    width: 100%;
    justify-content: center;
}
.demo-team { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.team-name { font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
.team-score { font-family: var(--mono); font-size: 2.5rem; font-weight: 700; }
.team-a .team-score { color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }
.team-b .team-score { color: var(--warning); text-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
.demo-vs { font-size: 1.2rem; font-weight: 800; color: var(--text-dim); }
.demo-clock {
    font-family: var(--mono);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-bright);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}
/* Event feed — overlays both demo-viz and YouTube */
.event-feed {
    position: absolute;
    bottom: 32px;
    left: 0;
    width: 100%;
    max-height: 60px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
    z-index: 5;
    pointer-events: none;
}
.feed-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-dim);
    animation: fadeIn 0.4s ease;
}
.feed-item.goal { color: var(--gold); font-weight: 600; }
.feed-min {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    min-width: 28px;
}

.demo-event-flash {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
    background: rgba(6, 9, 24, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
    z-index: 6;
}
.demo-event-flash.show { opacity: 1; }

/* YouTube container */
.yt-container { width: 100%; aspect-ratio: 16/9; background: #000; position: relative; }
.yt-container.hidden { display: none; }
.yt-container iframe, .yt-container #yt-player-host { width: 100%; height: 100%; border: none; display: block; position: absolute; inset: 0; }

/* Progress bar */
.progress-track {
    height: 4px;
    background: var(--bg);
}
.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s linear;
}

/* --- Intensity Bar --- */
.intensity-container {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 800px;
    margin-top: 14px;
}
.intensity-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    white-space: nowrap;
}
.intensity-track {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: var(--bg2);
    overflow: hidden;
    position: relative;
}
.intensity-fill {
    height: 100%;
    width: 30%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.15s ease, background 0.4s ease, box-shadow 0.4s ease;
}
.intensity-fill.medium { background: linear-gradient(90deg, var(--warning), #f97316); }
.intensity-fill.high {
    background: linear-gradient(90deg, #f97316, var(--danger));
    box-shadow: 0 0 16px rgba(204, 91, 90, 0.5);
    animation: intensityPulse 0.6s ease-in-out infinite;
}

/* --- AI Commentary --- */
.ai-commentary {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin-top: 10px;
    padding: 10px 16px;
    background: rgba(0, 199, 177, 0.05);
    border: 1px solid rgba(0, 199, 177, 0.12);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text);
    min-height: 38px;
    transition: all 0.4s ease;
    overflow: hidden;
}
.ai-badge {
    padding: 3px 10px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary), #009E8E);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}
.ai-text {
    flex: 1;
    line-height: 1.4;
    animation: fadeIn 0.4s ease;
}
.ai-commentary.alert {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.06);
}
.ai-commentary.danger {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.06);
}
.ai-commentary.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.06);
}

/* --- Event Types --- */
.event-types {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 800px;
    margin-top: 14px;
}
.etype-btn {
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.etype-btn:hover { border-color: var(--border-hover); color: var(--text); background: rgba(255, 255, 255, 0.06); }
.etype-btn.active {
    border-color: var(--primary);
    color: var(--text-bright);
    background: rgba(0, 199, 177, 0.12);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* --- Predict Button --- */
.predict-zone {
    margin-top: 20px;
    position: relative;
}
.predict-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 52px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #009E8E);
    color: #fff;
    font-family: var(--font);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 0 24px var(--primary-glow);
    position: relative;
    overflow: hidden;
}
.predict-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 200%;
    z-index: -1;
    animation: gradientShift 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s;
}
.predict-btn:hover:not(:disabled) { transform: scale(1.03); box-shadow: 0 0 36px var(--primary-glow); }
.predict-btn:hover:not(:disabled)::after { opacity: 1; }
.predict-btn:active:not(:disabled) { transform: scale(0.96); }
.predict-btn:disabled { opacity: 0.35; cursor: not-allowed; filter: grayscale(0.5); }
.predict-btn.cooldown { animation: none; opacity: 0.5; }
.predict-icon { font-size: 1.5rem; }
.predict-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 10px;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

/* Confetti canvas */
#confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 60;
    pointer-events: none;
}

/* --- Score Popup --- */
.score-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 50;
    pointer-events: none;
}
.score-popup.hidden { display: none; }
.popup-score {
    font-family: var(--mono);
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 0 0 40px currentColor;
    animation: popUp 0.8s ease-out forwards;
}
.popup-label {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    animation: popUp 0.8s ease-out 0.1s forwards;
    opacity: 0;
}
.popup-perfect { color: var(--gold); }
.popup-excellent { color: var(--accent); }
.popup-great { color: var(--primary); }
.popup-good { color: var(--text); }
.popup-ok { color: var(--text-dim); }
.popup-miss { color: var(--danger); }
.popup-false { color: var(--danger); }

/* --- Game Bottom Panels --- */
.game-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
}
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    backdrop-filter: blur(12px);
    max-height: 200px;
    overflow-y: auto;
}
.pred-list, .mini-lb { display: flex; flex-direction: column; gap: 6px; }
.pred-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
}
.pred-item .pred-time { font-family: var(--mono); color: var(--text-dim); font-size: 0.75rem; }
.pred-item .pred-pts { font-family: var(--mono); font-weight: 700; }
.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
}
.lb-row.me { background: rgba(99, 102, 241, 0.1); border: 1px solid var(--border); }
.lb-rank { font-family: var(--mono); font-weight: 700; color: var(--text-dim); min-width: 24px; }
.lb-name { flex: 1; font-weight: 500; }
.lb-pts { font-family: var(--mono); font-weight: 700; color: var(--accent); }
.lb-row:nth-child(1) .lb-rank { color: var(--gold); }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32; }

/* ===== RESULTS ===== */
.results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 48px;
    max-width: 600px;
    width: 100%;
}
.results-title { font-size: 1.6rem; }
.results-grade {
    font-family: var(--mono);
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
}
.grade-s { color: var(--gold); text-shadow: 0 0 40px rgba(251, 191, 36, 0.5); }
.grade-a { color: var(--success); text-shadow: 0 0 40px rgba(16, 185, 129, 0.4); }
.grade-b { color: var(--accent); text-shadow: 0 0 40px var(--accent-glow); }
.grade-c { color: var(--primary); text-shadow: 0 0 40px var(--primary-glow); }
.grade-d { color: var(--text-dim); }
.results-score-big {
    font-family: var(--mono);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-bright);
}
.results-label { font-size: 0.9rem; color: var(--text-dim); margin-top: -12px; }
.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}
.rstat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    backdrop-filter: blur(12px);
}
.rstat-val { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: var(--text-bright); }
.rstat-label { font-size: 0.7rem; color: var(--text-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

/* VS comparison */
.results-vs { width: 100%; text-align: center; }
.results-vs h3 { margin-bottom: 16px; color: var(--text-dim); font-size: 0.95rem; }
.vs-bars { display: flex; flex-direction: column; gap: 10px; }
.vs-row {
    display: grid;
    grid-template-columns: 80px 1fr 40px 1fr 80px;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}
.vs-label { font-size: 0.75rem; color: var(--text-dim); text-align: center; }
.vs-bar {
    height: 8px;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.vs-bar-you { background: var(--accent); justify-self: end; }
.vs-bar-ai { background: var(--warning); }
.vs-score { font-family: var(--mono); font-weight: 600; }
.vs-score-you { color: var(--accent); text-align: right; }
.vs-score-ai { color: var(--warning); text-align: left; }

/* Results timeline */
.results-timeline {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    backdrop-filter: blur(12px);
}
.tl-track {
    position: relative;
    height: 40px;
    background: var(--bg2);
    border-radius: 6px;
    overflow: visible;
    margin: 10px 0;
}
.tl-event {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 48px;
    background: var(--gold);
    border-radius: 2px;
    opacity: 0.7;
}
.tl-pred {
    position: absolute;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translateX(-50%);
    border: 2px solid;
}
.tl-pred.hit { background: var(--success); border-color: var(--success); }
.tl-pred.miss { background: var(--danger); border-color: var(--danger); }
.tl-legend { display: flex; gap: 20px; justify-content: center; font-size: 0.75rem; color: var(--text-dim); margin-top: 8px; }
.tl-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.tl-legend .leg-event::before { background: var(--gold); }
.tl-legend .leg-hit::before { background: var(--success); }
.tl-legend .leg-miss::before { background: var(--danger); }

.results-actions { display: flex; gap: 12px; margin-top: 8px; }

/* ===== LEADERBOARD (full) ===== */
.lb-full {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lb-full-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(12px);
    transition: all 0.2s;
}
.lb-full-row.me { border-color: var(--primary); box-shadow: 0 0 20px var(--primary-glow); }
.lb-full-row .lb-rank { font-size: 1.1rem; min-width: 32px; text-align: center; }
.lb-full-row .lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: var(--bg2);
}
.lb-full-row .lb-info { flex: 1; }
.lb-full-row .lb-name-full { font-weight: 600; }
.lb-full-row .lb-games { font-size: 0.75rem; color: var(--text-dim); }
.lb-full-row .lb-pts { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; }
.lb-full-row:nth-child(1) { background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), var(--card)); }
.lb-full-row:nth-child(2) { background: linear-gradient(135deg, rgba(192, 192, 192, 0.06), var(--card)); }
.lb-full-row:nth-child(3) { background: linear-gradient(135deg, rgba(205, 127, 50, 0.06), var(--card)); }

/* ===== COUNTDOWN OVERLAY ===== */
.countdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 9, 24, 0.9);
    backdrop-filter: blur(12px);
}
.countdown-overlay.hidden { display: none; }
.countdown-num {
    font-family: var(--mono);
    font-size: 8rem;
    font-weight: 900;
    color: var(--text-bright);
    text-shadow: 0 0 60px var(--primary-glow);
    animation: cdPop 0.7s ease-out;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes popUp {
    0% { transform: scale(0.3) translateY(20px); opacity: 0; }
    50% { transform: scale(1.15) translateY(-10px); opacity: 1; }
    100% { transform: scale(1) translateY(-40px); opacity: 0; }
}
@keyframes cdPop {
    0% { transform: scale(2.5); opacity: 0; }
    40% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes intensityPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.shake { animation: shake 0.4s ease; }
.pulse-glow { animation: pulseGlow 2.5s ease-in-out infinite; }
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(99, 102, 241, 0.15); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .screen { padding: 16px; }
    .logo-text { font-size: 2.5rem; }
    .tagline { font-size: 1rem; }
    .btn-lg { padding: 14px 36px; font-size: 1.05rem; }
    .game-bottom { grid-template-columns: 1fr; }
    .results-stats { grid-template-columns: 1fr; }
    .vs-row { grid-template-columns: 60px 1fr 30px 1fr 60px; font-size: 0.7rem; }
    .predict-btn { padding: 14px 36px; font-size: 1.1rem; }
    .demo-clock { font-size: 2.2rem; }
    .team-score { font-size: 2rem; }
    .demo-teams { gap: 20px; }
    .screen-header { flex-wrap: wrap; gap: 8px; justify-content: center; }
    .screen-header h2 { width: 100%; text-align: center; order: -1; }
    .matches-grid { grid-template-columns: 1fr; }
    .predict-hint { display: none; }
    .ai-commentary { font-size: 0.78rem; }
    .event-types { gap: 6px; }
    .etype-btn { padding: 6px 12px; font-size: 0.78rem; }
}

@media (max-width: 360px) {
    .game-top { font-size: 0.7rem; gap: 4px; padding: 8px 10px; }
    .game-stat .stat-value { font-size: 1.1rem; }
    .game-timer { font-size: 1.3rem; }
    .logo-text { font-size: 2rem; }
    .predict-btn { padding: 12px 28px; font-size: 1rem; }
    .etype-btn { padding: 5px 8px; font-size: 0.72rem; }
    .ai-commentary { font-size: 0.72rem; }
}

@media (pointer: coarse) {
    .predict-hint { display: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* Utilities */
.hidden { display: none !important; }
.text-gold { color: var(--gold); }
.text-green { color: var(--success); }
.text-red { color: var(--danger); }
.text-cyan { color: var(--accent); }
.text-dim { color: var(--text-dim); }
