/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #ff4d00;
    --primary-dark: #e04400;
    --primary-glow: rgba(255, 77, 0, 0.35);
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --dark-surface: #0f172a;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

/* Dark mode */
[data-theme="dark"] {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select {
    background: #0f172a;
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] th {
    background: #1e293b;
}

[data-theme="dark"] .alert-error {
    background: #450a0a;
    border-color: #7f1d1d;
}

[data-theme="dark"] .alert-success {
    background: #052e16;
    border-color: #14532d;
}

[data-theme="dark"] .btn-secondary {
    background: #334155;
    color: var(--text);
}

[data-theme="dark"] .btn-secondary:hover {
    background: #475569;
}

.theme-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.theme-toggle:hover {
    color: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    background: var(--dark-surface);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links { display: flex; gap: 1.25rem; align-items: center; }
.nav-links a { color: rgba(255, 255, 255, 0.8); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color var(--transition-fast); }
.nav-links a:hover { color: #ffffff; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(135deg, #ff4d00, #ff6a2a);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #e04400, #ff4d00);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-lg {
    padding: 0.85rem 2.5rem;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: var(--danger); color: #fff; }

/* Hero */
.hero {
    text-align: center;
    padding: 5rem 1rem 4rem;
    background: linear-gradient(135deg, #0f172a 0%, #1a1f3a 50%, #0f172a 100%);
    color: #ffffff;
    position: relative;
    margin: 0 calc(-50vw + 50%);
    width: 100vw;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}

.hero-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 2rem;
}

/* Hero stats bar override */
.hero .stats-bar {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hero .stat-value {
    color: #ffffff;
}

.hero .stat-value.stat-positive {
    color: #34d399;
}

.hero .stat-label {
    color: rgba(255, 255, 255, 0.6);
}

/* Cards & Findings */
.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.finding-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.finding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.finding-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.finding-card:hover::before {
    transform: scaleY(1);
}

.finding-card h3 { margin: 0.5rem 0 0.25rem; }
.finding-card p { color: var(--text-muted); font-size: 0.9rem; }
.finding-meta { font-size: 0.8rem; margin-top: 0.75rem; }

.finding-card.blurred h3,
.finding-card.blurred p:not(.finding-meta) {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--primary);
    color: #fff;
}

.badge-senior_night { background: #7c3aed; }
.badge-jersey_retirement { background: #059669; }
.badge-tribute { background: #1f2937; }
.badge-blackout { background: #111827; }
.badge-rivalry_special { background: #dc2626; }
.badge-military { background: #065f46; }

/* Trust signals */
.trust-signals { padding: 1rem 0 3rem; }
.trust-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.trust-item {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.trust-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.trust-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4d00, #ff6a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: #ffffff;
}

.trust-icon i {
    width: 24px;
    height: 24px;
}

.trust-item strong { display: block; margin-bottom: 0.25rem; color: var(--primary); font-weight: 700; }
.trust-item p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* Teaser */
.teaser { padding: 2rem 0; }
.teaser h2 { margin-bottom: 0.5rem; font-weight: 800; }
.teaser-cta { text-align: center; color: var(--text-muted); margin-top: 1.5rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-card {
    max-width: 420px;
    margin: 3rem auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.form-card h2 { margin-bottom: 1.5rem; font-weight: 800; }
.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* Tables */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; background: var(--bg); }

/* Dashboard filters */
.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    align-items: end;
}

.filters .form-group { margin-bottom: 0; }

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.8rem;
    margin-top: 3rem;
    background: var(--dark-surface);
    color: rgba(255, 255, 255, 0.5);
}

/* Odds display */
.odds-line {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0.5rem 0;
}

/* Outcome stats bar */
.stats-bar {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stat {
    text-align: center;
    flex: 1;
    min-width: 100px;
    position: relative;
    padding: 0 1.5rem;
}

.stat + .stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--border);
}

.stat-value { display: block; font-size: 1.75rem; font-weight: 900; color: var(--text); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.stat-positive { color: var(--success); }

/* Section headings with icons */
h1 i, h3 i, a i {
    vertical-align: middle;
}

/* Utility */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Twitter embeds */
.tweet-embed-container { min-height: 100px; margin-bottom: 0.75rem; }
.tweet-embed-container .twitter-tweet { margin: 0 !important; }

/* Mobile filter drawer */
.filter-toggle {
    display: none;
}

.filter-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.filter-drawer-overlay.active {
    display: block;
}

.filter-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: var(--card-bg);
    border-left: 1px solid var(--border);
    padding: 1.5rem;
    z-index: 201;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.filter-drawer.active {
    right: 0;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 3.5rem 1rem 3rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .trust-row {
        flex-direction: column;
        align-items: center;
    }

    .trust-item {
        max-width: 100%;
        width: 100%;
    }

    .stats-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .stat + .stat::before {
        display: none;
    }

    .stat {
        padding: 0;
    }

    .findings-grid {
        grid-template-columns: 1fr;
    }

    .filter-toggle {
        display: inline-flex;
    }

    .desktop-filters {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero {
        padding: 2.5rem 1rem 2rem;
    }

    .btn-lg {
        padding: 0.75rem 1.75rem;
        font-size: 0.95rem;
    }

    .nav-brand {
        font-size: 1.1rem;
    }
}
