/* ═══════════ VARIABLES ═══════════ */
:root {
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
    --container: 1140px;
}

.theme-dark {
    --bg: #0a0e17;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --bg-elevated: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #22c55e;
    --accent-glow: rgba(34,197,94,0.15);
    --accent-hover: #16a34a;
    --border: #1e293b;
    --live-red: #ef4444;
    --badge-upcoming: #3b82f6;
    --badge-finished: #64748b;
    --star: #fbbf24;
    --header-bg: rgba(10,14,23,0.92);
}

.theme-light {
    --bg: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-elevated: #e2e8f0;
    --text: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    --accent: #16a34a;
    --accent-glow: rgba(22,163,74,0.1);
    --accent-hover: #15803d;
    --border: #e2e8f0;
    --live-red: #dc2626;
    --badge-upcoming: #2563eb;
    --badge-finished: #94a3b8;
    --star: #f59e0b;
    --header-bg: rgba(241,245,249,0.92);
}

/* ═══════════ RESET ═══════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
iframe { border: 0; width: 100%; border-radius: var(--radius-sm); }

/* ═══════════ CONTAINER ═══════════ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }

/* ═══════════ HEADER ═══════════ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.15rem; }
.logo-icon { font-size: 1.4rem; }
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a, .nav-dropdown-btn {
    padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
    transition: var(--transition); background: none; border: none;
}
.main-nav a:hover, .main-nav a.active, .nav-dropdown-btn:hover {
    color: var(--text); background: var(--bg-elevated);
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); min-width: 180px; padding: 0.5rem 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3); z-index: 10;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block; padding: 0.5rem 1rem; font-size: 0.875rem;
    color: var(--text-muted);
}
.nav-dropdown-menu a:hover { background: var(--bg-elevated); color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.search-box { position: relative; }
.search-box input {
    width: 200px; padding: 0.45rem 0.75rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 0.875rem; outline: none; transition: var(--transition);
}
.search-box input:focus { border-color: var(--accent); width: 260px; }
.search-results {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-top: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3); max-height: 320px; overflow-y: auto;
}
.search-results.active { display: block; }
.search-results a {
    display: block; padding: 0.6rem 0.75rem; font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}
.search-results a:hover { background: var(--bg-elevated); }
.search-results .sr-teams { font-weight: 600; }
.search-results .sr-meta { font-size: 0.75rem; color: var(--text-dim); }

.theme-toggle {
    background: var(--bg-elevated); border: 1px solid var(--border);
    padding: 0.4rem 0.6rem; border-radius: var(--radius-sm);
    font-size: 1rem; transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); }

.mobile-menu-btn {
    display: none; background: none; border: none; font-size: 1.4rem;
    color: var(--text);
}

/* ═══════════ MAIN ═══════════ */
.site-main { min-height: calc(100vh - 160px); padding: 2rem 0; }

/* ═══════════ HERO / TITLES ═══════════ */
.hero-section { margin-bottom: 2rem; }
.page-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.page-subtitle { color: var(--text-muted); font-size: 1rem; margin-top: 0.25rem; }

/* ═══════════ FILTER BAR ═══════════ */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-bottom: 1.5rem; padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.filter-chip {
    padding: 0.35rem 0.85rem; border-radius: 20px;
    font-size: 0.8rem; font-weight: 500;
    background: var(--bg-elevated); color: var(--text-muted);
    transition: var(--transition); border: 1px solid transparent;
}
.filter-chip:hover, .filter-chip.active {
    background: var(--accent-glow); color: var(--accent);
    border-color: var(--accent);
}

/* ═══════════ EVENT CARDS GRID ═══════════ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.event-card {
    display: block;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
    transition: var(--transition); position: relative; overflow: hidden;
}
.event-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}
.event-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem;
}
.event-tournament { font-size: 0.75rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.event-card-teams { display: flex; align-items: center; justify-content: space-between; }
.team { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; flex: 1; }
.team-logo {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg-elevated); display: flex;
    align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; color: var(--accent);
    border: 2px solid var(--border);
}
.team-logo-lg { width: 72px; height: 72px; font-size: 1.2rem; }
.team-logo-sm { width: 32px; height: 32px; font-size: 0.65rem; display: inline-flex; }
.team-name { font-size: 0.85rem; font-weight: 600; text-align: center; }
.event-vs { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; min-width: 60px; }
.event-time { font-size: 1.3rem; font-weight: 800; }
.event-date { font-size: 0.75rem; color: var(--text-dim); }
.event-score { font-size: 1.5rem; font-weight: 800; color: var(--accent); }

.event-card-live-bar {
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: var(--live-red);
    animation: livePulse 2s infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ═══════════ BADGES ═══════════ */
.badge {
    padding: 0.2rem 0.6rem; border-radius: 12px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-live { background: var(--live-red); color: #fff; animation: livePulse 2s infinite; }
.badge-upcoming { background: rgba(59,130,246,0.15); color: var(--badge-upcoming); }
.badge-finished { background: rgba(100,116,139,0.15); color: var(--badge-finished); }

/* ═══════════ EVENT DETAIL PAGE ═══════════ */
.breadcrumbs {
    font-size: 0.8rem; color: var(--text-dim); margin-bottom: 1.5rem;
    padding: 0.75rem 0; border-bottom: 1px solid var(--border);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }

.event-hero { text-align: center; margin-bottom: 2.5rem; }
.event-tournament-label {
    display: inline-block; font-size: 0.75rem; font-weight: 600;
    color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}
.event-title { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 2rem; }

.event-matchup {
    display: flex; align-items: center; justify-content: center; gap: 2rem;
    margin-bottom: 2rem;
}
.matchup-team { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.matchup-team-name { font-weight: 700; font-size: 1.1rem; }
.matchup-center { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.matchup-score { font-size: 2.5rem; font-weight: 800; color: var(--accent); }
.matchup-datetime { display: flex; flex-direction: column; align-items: center; }
.matchup-date { font-weight: 600; }
.matchup-time { color: var(--text-muted); font-size: 0.9rem; }

/* ═══════════ FAKE PLAYER / CTA ═══════════ */
.watch-cta { max-width: 640px; margin: 0 auto; }
.countdown { margin-bottom: 1rem; }
.countdown-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.countdown-timer { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }

.fake-player {
    position: relative; width: 100%;
    aspect-ratio: 16/9; background: #000;
    border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, #0a1628, #0f2b1a);
}
.fake-player-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5);
}
.play-btn {
    display: flex; align-items: center; gap: 0.75rem;
    background: var(--accent); color: #fff; border: none;
    padding: 1rem 2rem; border-radius: var(--radius);
    font-size: 1.1rem; font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 24px rgba(34,197,94,0.3);
}
.play-btn:hover { background: var(--accent-hover); transform: scale(1.05); }
.play-icon { font-size: 1.4rem; }

/* ═══════════ CONTENT GRID ═══════════ */
.event-content-grid { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; }
.event-main-content { min-width: 0; }
.event-sidebar { min-width: 0; }

.content-section { margin-bottom: 2.5rem; }
.content-section h2 {
    font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.article-text { color: var(--text-muted); line-height: 1.8; }

/* ═══════════ REVIEWS ═══════════ */
.review-count { font-weight: 400; color: var(--text-dim); font-size: 0.9rem; }
.aggregate-rating { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.rating-value { font-weight: 700; }
.rating-count { color: var(--text-dim); font-size: 0.85rem; }
.stars { color: var(--star); letter-spacing: 2px; }

.review-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 0.75rem;
}
.review-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.review-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent-glow); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.review-author { font-weight: 600; font-size: 0.9rem; }
.review-date { font-size: 0.75rem; color: var(--text-dim); display: block; }
.review-text { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* ═══════════ SIDEBAR ═══════════ */
.sidebar-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem;
}
.sidebar-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

.video-item { margin-bottom: 0.75rem; }
.video-item iframe { aspect-ratio: 16/9; border-radius: var(--radius-sm); }

.related-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.6rem 0; border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.related-item:last-child { border-bottom: none; }
.related-item:hover .related-teams { color: var(--accent); }
.related-teams { font-weight: 600; }
.related-date { color: var(--text-dim); font-size: 0.75rem; }

/* ═══════════ ARCHIVE ═══════════ */
.archive-filters { margin-bottom: 1.5rem; }
.archive-filter-form {
    display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.filter-input, .filter-select {
    padding: 0.5rem 0.75rem; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 0.875rem;
}
.filter-select { min-width: 180px; }

.archive-item {
    display: block; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 0.5rem;
    transition: var(--transition);
}
.archive-item:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.archive-item-teams {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    font-weight: 600; margin-bottom: 0.5rem;
}
.archive-score { font-size: 1.2rem; font-weight: 800; color: var(--accent); min-width: 3rem; text-align: center; }
.archive-item-meta {
    display: flex; justify-content: center; gap: 1rem;
    font-size: 0.8rem; color: var(--text-dim);
}
.archive-summary { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; text-align: center; }

/* ═══════════ VIDEO PAGE ═══════════ */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.video-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.video-card iframe { aspect-ratio: 16/9; }

/* ═══════════ BUTTONS ═══════════ */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.25rem; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 600; border: none;
    transition: var(--transition);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
    background: transparent; color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

/* ═══════════ PAGINATION ═══════════ */
.pagination { display: flex; gap: 0.25rem; justify-content: center; margin-top: 2rem; }
.page-link {
    padding: 0.45rem 0.85rem; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 500;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted); transition: var(--transition);
}
.page-link:hover, .page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ═══════════ FOOTER ═══════════ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0; margin-top: 3rem;
}
.footer-inner { text-align: center; }
.footer-brand { font-weight: 700; margin-bottom: 0.75rem; }
.footer-nav { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.75rem; }
.footer-nav a { color: var(--text-muted); font-size: 0.85rem; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: 0.75rem; color: var(--text-dim); }

/* ═══════════ UTILITIES ═══════════ */
.text-center { text-align: center; }
.mt-2 { margin-top: 1.5rem; }
.empty-state { text-align: center; padding: 3rem; color: var(--text-dim); }
.error-page { text-align: center; padding: 4rem 0; }
.error-page h1 { font-size: 5rem; font-weight: 800; color: var(--accent); margin-bottom: 1rem; }
.archive-link-box { text-align: center; margin-top: 2rem; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.open {
        display: flex; flex-direction: column; position: absolute;
        top: 64px; left: 0; right: 0; background: var(--bg-card);
        border-bottom: 1px solid var(--border); padding: 1rem;
        box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    }
    .mobile-menu-btn { display: block; }
    .search-box input { width: 140px; }
    .search-box input:focus { width: 180px; }
    .events-grid { grid-template-columns: 1fr; }
    .event-content-grid { grid-template-columns: 1fr; }
    .event-title { font-size: 1.5rem; }
    .event-matchup { gap: 1rem; }
    .team-logo-lg { width: 56px; height: 56px; font-size: 1rem; }
    .video-grid { grid-template-columns: 1fr; }
    .page-title { font-size: 1.6rem; }
    .archive-filter-form { flex-direction: column; }
    .archive-item-teams { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .header-inner { height: 56px; }
    .logo-text { display: none; }
    .matchup-score { font-size: 2rem; }
    .play-btn { padding: 0.75rem 1.5rem; font-size: 1rem; }
}
