:root {
    --primary-green: #3ecf8e;
    --primary-green-dim: #2da36d;
    --primary-gradient: linear-gradient(135deg, #2da36d 0%, #3ecf8e 100%);
    --color-bg: #090d13;
    --color-surface: #111820;
    --color-surface-hover: #171f29;
    --color-text: #ededed;
    --color-text-muted: #707070;
    --color-border: #1e2630;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Barlow', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

body { font-family: var(--font-main); background: var(--color-bg); color: var(--color-text); overflow-x: hidden; margin: 0; -webkit-font-smoothing: antialiased; }

.text-gradient { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.fade-in { animation: fadeIn 0.3s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* AUTH */
.auth-screen { position: fixed; inset: 0; z-index: 100; background: var(--color-bg); display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 380px; padding: 2rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); text-align: center; }
.scan-line { display: none; }

/* SHELL */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar { display: none; }
@media (min-width: 1024px) {
    .app-shell { flex-direction: row; }
    .sidebar { display: flex; width: 230px; flex-direction: column; background: var(--color-surface); border-right: 1px solid var(--color-border); padding: 1.25rem 0.75rem; height: 100vh; position: sticky; top: 0; flex-shrink: 0; }
    main { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; }
}
@media (max-width: 1023px) {
    main { flex: 1; overflow-y: auto; padding: 1rem; padding-bottom: 80px; }
}

/* NAV */
.nav-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.7rem; border-radius: 6px; color: var(--color-text-muted); transition: all 0.15s; cursor: pointer; font-family: var(--font-main); font-weight: 500; font-size: 13px; margin-bottom: 1px; text-decoration: none; border-left: 2px solid transparent; }
.nav-item:hover { background: var(--color-surface-hover); color: var(--color-text); }
.nav-item.active { background: rgba(62,207,142,0.06); color: var(--primary-green); border-left-color: var(--primary-green); }
.nav-item i { width: 16px; text-align: center; font-size: 13px; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--color-surface); border-top: 1px solid var(--color-border); display: flex; justify-content: space-around; padding: 6px 0; z-index: 50; }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--color-text-muted); font-size: 9px; font-weight: 500; width: 100%; padding: 4px 2px; cursor: pointer; text-decoration: none; transition: color 0.15s; }
.bottom-nav-item.active { color: var(--primary-green); }
.bottom-nav-item:hover { color: var(--color-text); }
.bottom-nav-item i { font-size: 15px; }

/* GAME CARDS */
.game-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; transition: border-color 0.15s; cursor: pointer; }
.game-card:hover { border-color: #2d3640; }
.game-card.card-live { border-color: rgba(239,68,68,0.2); }
.live-indicator { width: 6px; height: 6px; background: #ef4444; border-radius: 50%; box-shadow: 0 0 6px rgba(239,68,68,0.4); animation: pulse 1.5s infinite; display: inline-block; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

/* BUTTONS */
.btn-primary { background: var(--primary-green); color: #090d13; font-family: var(--font-main); font-weight: 600; padding: 0.6rem 1.4rem; border-radius: 6px; transition: all 0.15s; border: none; cursor: pointer; width: 100%; text-align: center; display: inline-block; text-decoration: none; font-size: 14px; }
.btn-primary:hover { background: #4dd89a; }
.btn-glass { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-muted); padding: 0.4rem 0.8rem; border-radius: 5px; font-size: 13px; transition: all 0.15s; cursor: pointer; }
.btn-glass:hover { border-color: #2d3640; color: var(--color-text); }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); z-index: 60; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-content { background: var(--color-surface); width: 100%; max-width: 900px; max-height: 90vh; overflow-y: auto; border: 1px solid var(--color-border); border-radius: 8px; }

/* TABLES */
.analysis-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; margin-bottom: 20px; }
.analysis-table th { text-align: left; padding: 8px 10px; background: rgba(9,13,19,0.6); color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: 0.04em; }
.analysis-table td { padding: 10px; border-bottom: 1px solid var(--color-border); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2630; border-radius: 3px; }

.hidden-view { display: none !important; }
.stat-callout { background: rgba(9,13,19,0.5); border: 1px solid var(--color-border); border-radius: 6px; padding: 14px; margin: 14px 0; }
.stat-callout-title { color: var(--primary-green); font-size: 11px; font-weight: 600; text-transform: uppercase; margin-bottom: 6px; }

.score-display { font-family: var(--font-mono); font-weight: 700; font-size: 1.25rem; min-width: 32px; text-align: right; }
.score-winner { color: var(--primary-green); }
.score-loser { color: var(--color-text-muted); }
.score-live { color: #fff; }
.game-status-badge { font-size: 10px; font-family: var(--font-mono); padding: 2px 8px; border-radius: 4px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.badge-live { background: rgba(239,68,68,0.1); color: #ef4444; }
.badge-final { background: rgba(112,112,112,0.08); color: #707070; }
.badge-upcoming { background: rgba(62,207,142,0.06); color: var(--primary-green); }

.key-stat-box { background: rgba(9,13,19,0.5); border: 1px solid var(--color-border); border-radius: 6px; padding: 12px; text-align: center; }
.key-stat-value { font-family: var(--font-mono); font-weight: 700; font-size: 1.25rem; color: #fff; }
.key-stat-label { font-size: 10px; color: var(--color-text-muted); text-transform: uppercase; margin-top: 4px; font-weight: 500; }
.sharp-pick-card { background: rgba(62,207,142,0.04); border: 1px solid rgba(62,207,142,0.15); border-radius: 8px; padding: 18px; margin-top: 20px; }
.sharp-badge { background: var(--primary-green); color: #090d13; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 10px; }
.section-header { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--primary-green); margin-bottom: 10px; margin-top: 20px; }

.period-scores { width: 100%; font-size: 12px; }
.period-scores th, .period-scores td { padding: 6px 10px; text-align: center; border-bottom: 1px solid var(--color-border); }
.period-scores th { color: var(--color-text-muted); font-weight: 600; font-size: 10px; text-transform: uppercase; background: rgba(9,13,19,0.5); }
.period-scores td { font-family: var(--font-mono); }
.period-scores td.total-col { font-weight: 700; color: #fff; }

.refresh-bar { height: 2px; background: transparent; position: relative; overflow: hidden; }
.refresh-bar.active { background: rgba(62,207,142,0.06); }
.refresh-bar.active::after { content: ''; position: absolute; left: -50%; width: 50%; height: 100%; background: var(--primary-green); animation: refreshSlide 2s ease-in-out infinite; }
@keyframes refreshSlide { 0% { left: -50%; } 100% { left: 100%; } }

.settings-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 20px; margin-bottom: 12px; }
.settings-card h3 { font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; font-size: 12px; color: var(--primary-green); }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 13px; }
.settings-desc { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.toggle { width: 40px; height: 22px; background: var(--color-border); border-radius: 11px; position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.toggle.on { background: var(--primary-green); }
.toggle::after { content: ''; width: 16px; height: 16px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform 0.2s; }
.toggle.on::after { transform: translateX(18px); }
