:root {
    --primary-green: #22c55e;
    --primary-green-dim: #15803d;
    --primary-gradient: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    --color-bg: #0b0f19;
    --color-surface: #111827;
    --color-surface-hover: #1f2937;
    --color-text: #f3f4f6;
    --color-text-muted: #9ca3af;
    --color-border: #1f2937;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Barlow', sans-serif;
    --font-mono: 'JetBrains Mono', 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.4s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* AUTH / LOGIN */
.auth-screen { position: fixed; inset: 0; z-index: 100; background: var(--color-bg); display: flex; align-items: center; justify-content: center; background-image: radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.05) 0%, transparent 50%); }
.auth-card { width: 100%; max-width: 400px; padding: 2rem; background: rgba(17, 24, 39, 0.8); backdrop-filter: blur(10px); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); text-align: center; }
.scan-line { height: 2px; width: 100%; background: var(--primary-green); position: absolute; top: 0; left: 0; animation: scan 3s linear infinite; opacity: 0.5; box-shadow: 0 0 10px var(--primary-green); }
@keyframes scan { 0% { top: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* APP 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: 280px; flex-direction: column; background: var(--color-surface); border-right: 1px solid var(--color-border); padding: 1.5rem; height: 100vh; position: sticky; top: 0; flex-shrink: 0; }
    main { flex: 1; overflow-y: auto; padding: 2rem; }
}

@media (max-width: 1023px) {
    main { flex: 1; overflow-y: auto; padding: 1rem; padding-bottom: 90px; }
}

/* NAV */
.nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 8px; color: var(--color-text-muted); transition: all 0.2s; cursor: pointer; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; text-decoration: none; }
.nav-item:hover { background: var(--color-surface-hover); color: var(--primary-green); }
.nav-item.active { background: rgba(34, 197, 94, 0.1); color: var(--primary-green); border-left: 3px solid var(--primary-green); }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(17, 24, 39, 0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--color-border); display: flex; justify-content: space-around; padding: 10px 0; z-index: 50; }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--color-text-muted); font-size: 10px; font-weight: 600; text-transform: uppercase; width: 100%; padding: 4px; cursor: pointer; text-decoration: none; }
.bottom-nav-item.active { color: var(--primary-green); }
.bottom-nav-item i { font-size: 18px; margin-bottom: 2px; }

/* GAME CARDS */
.game-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; position: relative; transition: transform 0.2s; cursor: pointer; }
.game-card:hover { border-color: var(--primary-green); transform: translateY(-2px); }
.game-card.card-live { border-color: rgba(239, 68, 68, 0.3); }
.live-indicator { width: 8px; height: 8px; background: #ef4444; border-radius: 50%; box-shadow: 0 0 8px #ef4444; 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-gradient); color: #fff; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 0.75rem 1.5rem; border-radius: 8px; transition: all 0.2s; border: none; cursor: pointer; width: 100%; text-align: center; display: inline-block; text-decoration: none; }
.btn-primary:hover { box-shadow: 0 0 15px rgba(34, 197, 94, 0.4); transform: translateY(-1px); }
.btn-glass { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--color-border); color: var(--color-text); padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.875rem; transition: all 0.2s; cursor: pointer; }
.btn-glass:hover { border-color: var(--primary-green); color: var(--primary-green); }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); 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: 12px; position: relative; }

/* TABLES */
.analysis-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; margin-bottom: 20px; }
.analysis-table th { text-align: left; padding: 10px; background: rgba(15, 23, 42, 0.5); color: var(--color-text-muted); border-bottom: 2px solid var(--color-border); font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: 0.5px; }
.analysis-table td { padding: 12px 10px; border-bottom: 1px solid var(--color-border); color: var(--color-text); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-green); }

.hidden-view { display: none !important; }
.stat-callout { background: rgba(15, 23, 42, 0.5); border: 1px solid var(--color-border); border-radius: 8px; padding: 16px; margin: 16px 0; }
.stat-callout-title { color: var(--primary-green); font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }

/* SCORES */
.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: 700; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; }
.badge-live { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-final { background: rgba(156, 163, 175, 0.1); color: #9ca3af; border: 1px solid rgba(156, 163, 175, 0.2); }
.badge-upcoming { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }

/* MODAL DETAIL BOXES */
.key-stat-box { background: rgba(15, 23, 42, 0.5); border: 1px solid var(--color-border); border-radius: 8px; 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: 600; }
.sharp-pick-card { background: linear-gradient(135deg, rgba(21, 128, 61, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%); border: 1px solid rgba(34, 197, 94, 0.3); border-radius: 12px; padding: 20px; margin-top: 24px; }
.sharp-badge { background: var(--primary-gradient); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 12px; letter-spacing: 1px; }
.section-header { font-family: var(--font-display); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary-green); margin-bottom: 12px; margin-top: 24px; }

/* PERIOD SCORES */
.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(15, 23, 42, 0.5); }
.period-scores td { color: var(--color-text); font-family: var(--font-mono); }
.period-scores td.total-col { font-weight: 700; color: #fff; }

/* LIVE REFRESH BAR */
.refresh-bar { height: 2px; background: transparent; position: relative; overflow: hidden; }
.refresh-bar.active { background: rgba(34,197,94,0.1); }
.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 PAGE */
.settings-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 24px; margin-bottom: 16px; }
.settings-card h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; font-size: 14px; color: var(--primary-green); }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 14px; color: var(--color-text); }
.settings-desc { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.toggle { width: 44px; height: 24px; background: var(--color-border); border-radius: 12px; position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.toggle.on { background: var(--primary-green); }
.toggle::after { content: ''; width: 18px; height: 18px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform 0.2s; }
.toggle.on::after { transform: translateX(20px); }
