/* ═══════════════════════════════════════════════════════════
   Design System - Derived from Foxfot Aesthetics
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@500&display=swap');

:root {
    --bg:             #07080c;
    --bg-subtle:      #0c0e14;
    --surface:        #111318;
    --surface2:       #191c24;
    --surface3:       #21242e;
    --surface-glass:  rgba(17,19,24,.72);

    --border:         rgba(255,255,255,.06);
    --border-hover:   rgba(255,255,255,.12);

    --primary:        #6366f1;
    --primary-light:  #818cf8;
    --primary-dark:   #4f46e5;
    --primary-glow:   rgba(99,102,241,.25);
    --primary-glow2:  rgba(99,102,241,.12);

    --secondary:      #f43f5e;
    --secondary-light:#fb7185;

    --emerald:        #10b981;
    --emerald-light:  #34d399;
    --emerald-glow:   rgba(16,185,129,.20);

    --live-red:       #ef4444;
    
    --text:           #eaecf0;
    --text-secondary: #94969c;
    --text-muted:     #667085;
    --text-dim:       #475467;

    --font:           'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono:      'JetBrains Mono', monospace;

    --radius-xs:      6px;
    --radius-sm:      8px;
    --radius:         12px;
    --radius-lg:      16px;
    --radius-full:    9999px;

    --shadow-sm:      0 1px 3px rgba(0,0,0,.4);
    --shadow:         0 4px 16px rgba(0,0,0,.45);
    --shadow-lg:      0 12px 40px rgba(0,0,0,.55);

    --ease:           cubic-bezier(.4,0,.2,1);
    --duration:       .25s;
}

body.light {
    --bg:             #f8f9fc;
    --bg-subtle:      #f0f2f7;
    --surface:        #ffffff;
    --surface2:       #f4f5f9;
    --surface-glass:  rgba(255,255,255,.78);
    --border:         rgba(0,0,0,.07);
    --text:           #111827;
    --text-secondary: #4b5563;
    --text-muted:     #6b7280;
    --text-dim:       #9ca3af;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

.bg-ambient {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-ambient::before {
    content: ''; position: absolute; inset: -20%;
    background: radial-gradient(ellipse 50% 40% at 20% 10%, rgba(99,102,241,.08) 0%, transparent 60%),
                radial-gradient(ellipse 45% 35% at 80% 85%, rgba(244,63,94,.06) 0%, transparent 55%);
    animation: ambientDrift 25s ease-in-out infinite alternate;
}
@keyframes ambientDrift {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(-10px,12px) scale(.98); }
}

.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    height: 60px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(12px, 3vw, 28px);
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand-icon {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.pill-live {
    background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.25);
    color: var(--live-red); border-radius: var(--radius-full); padding: 4px 12px;
    font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px;
}
.pill-live .dot {
    width: 6px; height: 6px; background: var(--live-red); border-radius: 50%;
    animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(.75); }
}
.icon-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--surface2); border: 1px solid var(--border); color: var(--text-secondary);
    display: inline-flex; align-items: center; justify-content: center;
}

.main-container {
    position: relative; z-index: 1; max-width: 1280px; margin: 0 auto;
    padding: 80px clamp(12px, 3vw, 28px) 40px;
}

.hero { text-align: center; padding: 32px 16px 28px; margin-bottom: 28px; }
.hero h1 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 900; line-height: 1.2; }
.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--text-secondary); font-size: .88rem; max-width: 500px; margin: 8px auto 0; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.section-title { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.section-count {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-size: .62rem; padding: 2px 9px; border-radius: var(--radius-full);
}
.filter-tabs { display: flex; gap: 5px; }
.filter-tab {
    padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid var(--border);
    background: var(--surface2); color: var(--text-muted); font-size: .72rem; font-weight: 600;
}
.filter-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-color: transparent;
}
.search-input {
    width: 220px; padding: 8px 14px; background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--radius-full); color: var(--text); font-size: .8rem; outline: none;
}

.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.match-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    display: flex; flex-direction: column; text-decoration: none; color: var(--text);
    transition: transform var(--duration), border-color var(--duration);
}
.match-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card-top { display: flex; justify-content: space-between; padding: 14px 16px 8px; }
.card-status { font-size: .65rem; font-weight: 800; display: flex; align-items: center; gap: 5px; }
.card-status.live { color: var(--live-red); }
.card-status.upcoming { color: var(--primary-light); }
.card-time {
    font-size: .7rem; font-weight: 700; color: var(--text-muted);
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--radius-full); padding: 3px 10px; font-family: var(--font-mono);
}
.card-body { padding: 4px 16px 14px; flex: 1; font-weight: 700; font-size: .92rem; }
.card-day-badge { 
    display: inline-block; font-size: 0.65rem; color: var(--primary-light);
    background: var(--primary-glow2); padding: 2px 8px; border-radius: var(--radius-xs);
    margin-bottom: 6px;
}
.card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface2);
}
.btn-watch {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-radius: var(--radius-full); padding: 5px 15px; font-size: .72rem; font-weight: 700;
}

.no-results { display: none; text-align: center; grid-column: 1/-1; padding: 40px; color: var(--text-muted); }

/* Stream Page */
#stream-page { display: none; }
.stream-container { background: #000; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; width: 100%; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.stream-container iframe { width: 100%; height: 100%; border: none; }
.stream-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.btn-back {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface2); color: var(--text); border: 1px solid var(--border);
    padding: 8px 16px; border-radius: var(--radius-full); font-size: .8rem; font-weight: 600;
}
.btn-back:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.stream-title { font-size: 1.2rem; font-weight: 800; }

.loader {
    width: 48px; height: 48px; border: 4px solid var(--border);
    border-bottom-color: var(--primary); border-radius: 50%;
    display: inline-block; box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin: 40px auto; display: block;
}
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
