:root {
  --bg: #0a0f1e;
  --bg-card: #131d35;
  --bg-card-hover: #1a2745;
  --border: #1e3154;
  --text: #f0f4ff;
  --text-secondary: #7a8db0;
  --blue: #3d8ef8;
  --orange: #f97316;
  --red: #ef4444;
  --green: #22c55e;
  --yellow: #eab308;
  --nfl: #22c55e;
  --nba: #f97316;
  --mlb: #3d8ef8;
  --nhl: #06b6d4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.3px;
}

.nav { display: flex; gap: 8px; }

.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.nav-link:hover { color: var(--text); background: var(--bg-card); }
.nav-link.active { color: var(--text); background: var(--bg-card); }

/* ── ALERT BANNER ── */
.alert-banner {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  border-bottom: 1px solid #b91c1c;
  padding: 10px 0;
  cursor: pointer;
}

.alert-banner .container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.alert-banner strong { color: #fca5a5; }
.alert-banner span { color: #fecaca; }
.alert-icon { font-size: 1rem; }

.alert-link {
  margin-left: auto;
  color: #fca5a5;
  font-weight: 600;
  white-space: nowrap;
}

/* ── HERO ── */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.highlight {
  background: linear-gradient(135deg, #3d8ef8, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.search-wrapper {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 16px 52px 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus { border-color: var(--blue); }
.search-input::placeholder { color: var(--text-secondary); }

.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 0 0 48px;
  flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-number { font-size: 1.75rem; font-weight: 800; color: var(--blue); }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

/* ── TEAMS SECTION ── */
.teams-section { padding: 0 0 80px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.results-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── FILTER TABS ── */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tab:hover { color: var(--text); border-color: var(--text-secondary); }

.filter-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.filter-tab[data-sport="NFL"].active { background: var(--nfl); border-color: var(--nfl); }
.filter-tab[data-sport="NBA"].active { background: var(--nba); border-color: var(--nba); }
.filter-tab[data-sport="MLB"].active { background: var(--mlb); border-color: var(--mlb); }
.filter-tab[data-sport="NHL"].active { background: var(--nhl); border-color: var(--nhl); }

/* ── TEAM GRID ── */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.team-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--blue);
  transform: translateY(-2px);
}

.team-card.rsn-affected { border-color: #b91c1c; }
.team-card.rsn-affected:hover { border-color: var(--red); }

.team-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.sport-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.sport-badge.NFL { background: rgba(34,197,94,0.15); color: var(--nfl); }
.sport-badge.NBA { background: rgba(249,115,22,0.15); color: var(--nba); }
.sport-badge.MLB { background: rgba(61,142,248,0.15); color: var(--mlb); }
.sport-badge.NHL { background: rgba(6,182,212,0.15); color: var(--nhl); }

.urgent-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.team-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.team-city {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.team-card-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.rsn-warning {
  font-size: 0.72rem;
  color: #fca5a5;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.view-link {
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* ── TEAM PAGE ── */
.team-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  transition: color 0.15s;
}

.back-link:hover { color: var(--text); }

.team-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.team-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
.team-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.team-location { font-size: 0.9rem; color: var(--text-secondary); }

.last-updated {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ── RSN ALERT ── */
.rsn-alert {
  background: linear-gradient(135deg, rgba(127,29,29,0.4), rgba(153,27,27,0.4));
  border: 1px solid #b91c1c;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.rsn-alert-icon { font-size: 1.5rem; flex-shrink: 0; }

.rsn-alert-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 6px;
}

.rsn-alert-text {
  font-size: 0.875rem;
  color: #fecaca;
  line-height: 1.5;
}

.rsn-alert-text strong { color: #fca5a5; }

/* ── STREAMING SECTION ── */
.streaming-section { padding: 40px 0; }

.section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.section-heading-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ── STREAMING CARDS ── */
.streaming-cards { display: flex; flex-direction: column; gap: 12px; }

.streaming-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: all 0.2s;
}

.streaming-card:hover { border-color: #334155; }

.streaming-card.recommended {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.05);
}

.streaming-card.ending {
  border-color: #b91c1c;
  background: rgba(127, 29, 29, 0.15);
  opacity: 0.8;
}

.streaming-card-left { display: flex; align-items: center; gap: 14px; flex: 1; }

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: var(--bg-card-hover);
}

.service-name { font-size: 1rem; font-weight: 700; }
.service-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; }

.streaming-card-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.service-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.service-price-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
}

.recommended-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(34,197,94,0.15);
  color: var(--green);
  border-radius: 20px;
  border: 1px solid rgba(34,197,94,0.3);
  white-space: nowrap;
}

.ending-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border-radius: 20px;
  border: 1px solid rgba(239,68,68,0.3);
  white-space: nowrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.cta-btn.primary { background: var(--blue); color: white; }
.cta-btn.primary:hover { background: #2563eb; }
.cta-btn.disabled {
  background: rgba(127,29,29,0.3);
  color: #fca5a5;
  cursor: default;
}

/* ── NATIONAL SECTION ── */
.national-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.national-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s, background 0.2s;
}
a.national-card:hover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.06);
}

.national-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.national-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.service-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.service-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: rgba(61,142,248,0.1);
  color: var(--blue);
  border-radius: 6px;
  border: 1px solid rgba(61,142,248,0.2);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.service-tag:hover { background: rgba(61,142,248,0.2); }

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer a { color: var(--blue); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .stats-bar { gap: 24px; }
  .streaming-card { flex-direction: column; align-items: flex-start; }
  .streaming-card-right { width: 100%; justify-content: space-between; }
  .teams-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .nav { display: none; }
}
