/* =========================================================================
   MATCHCENTER STYLES
   Mobile-first football schedule UI
   ========================================================================= */

:root {
  --bg: #0b0e13;
  --bg-2: #11151c;
  --bg-3: #161b24;
  --line: #1f2630;
  --line-2: #2a3340;
  --text: #eef1f5;
  --text-2: #9aa3b2;
  --text-3: #6b7585;
  --accent: #21d07a;        /* live / primary action */
  --accent-2: #ffcc00;       /* highlight / promo */
  --danger: #ff4757;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,.35);
  --tap: 44px;               /* min touch target */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin:0; padding:0; }
body {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ==== Layout shell ==== */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
@media (min-width: 768px) {
  .app { max-width: 720px; }
  body { font-size: 16px; }
}

/* ==== Top header ==== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,14,19,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
}
.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 1.5px;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.logo b { color: var(--accent); }
.topbar-spacer { flex: 1; }
.icon-btn {
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover, .icon-btn:active { background: var(--bg-3); color: var(--text); }

/* ==== Search ==== */
.search-wrap {
  padding: 8px 16px 14px;
  border-bottom: 1px solid var(--line);
}
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0 16px;
  height: var(--tap);
  transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--accent); background: var(--bg-2); }
.search svg { color: var(--text-3); flex-shrink: 0; }
.search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px;
  font-family: inherit;
}
.search input::placeholder { color: var(--text-3); }
.search-clear {
  color: var(--text-3); padding: 4px;
  display: none;
}
.search.has-value .search-clear { display: block; }

/* ==== Banner slot ==== */
.banner-slot {
  margin: 14px 16px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 6;
  background:
    radial-gradient(circle at 20% 30%, rgba(33,208,122,.25), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,204,0,.18), transparent 50%),
    linear-gradient(135deg, #1a2332 0%, #0f1620 100%);
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
}
.banner-slot::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,.02) 12px 13px);
  pointer-events: none;
}
.banner-content { position: relative; z-index: 1; max-width: 65%; }
.banner-eyebrow {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent-2); font-weight: 700;
  margin-bottom: 4px;
}
.banner-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: .5px; line-height: 1.05;
  color: var(--text); margin-bottom: 4px;
}
.banner-sub {
  font-size: 12px; color: var(--text-2);
}
.banner-cta {
  background: var(--accent);
  color: #032213; font-weight: 700;
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; letter-spacing: .3px;
  position: relative; z-index: 1;
  box-shadow: 0 4px 14px rgba(33,208,122,.35);
  flex-shrink: 0;
}

/* ==== League filter chips ==== */
.league-filter {
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.chips {
  display: flex; gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  transition: all .15s;
  scroll-snap-align: start;
  height: 36px;
  white-space: nowrap;
}
.chip:hover { color: var(--text); }
.chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 600;
}
.chip-emblem {
  width: 16px; height: 16px;
  border-radius: 3px;
  background: var(--line-2);
  display: grid; place-items: center;
  font-size: 9px; font-weight: 800;
}
.chip.active .chip-emblem { background: rgba(0,0,0,.15); color: var(--bg); }

/* ==== Date tabs ==== */
.date-tabs {
  display: flex; gap: 4px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.date-tabs::-webkit-scrollbar { display: none; }
.date-tab {
  flex-shrink: 0;
  min-width: 64px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-2);
  transition: all .15s;
  border: 1px solid transparent;
}
.date-tab .day { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; opacity: .8; }
.date-tab .num { font-size: 18px; font-weight: 700; line-height: 1.1; margin-top: 2px; }
.date-tab.active {
  background: var(--bg-3);
  border-color: var(--accent);
  color: var(--text);
}
.date-tab.active .day { color: var(--accent); opacity: 1; }
.date-tab.today { color: var(--text); }

/* ==== Match list ==== */
.matches { padding: 8px 0 100px; }
.league-section { margin-bottom: 4px; }
.league-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
  position: sticky; top: 0;
  background: var(--bg);
  z-index: 1;
}
.league-emblem {
  width: 22px; height: 22px;
  border-radius: 4px;
  background: var(--bg-3);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
  flex-shrink: 0;
}
.league-emblem img { width:100%; height:100%; object-fit: contain; }
.league-name {
  font-size: 13px; font-weight: 600;
  color: var(--text);
  flex: 1;
  text-transform: uppercase; letter-spacing: .4px;
}
.league-country {
  font-size: 11px; color: var(--text-3);
  font-weight: 400; text-transform: none; letter-spacing: 0;
  margin-left: 6px;
}
.league-count {
  font-size: 11px; color: var(--text-3);
  background: var(--bg-3);
  padding: 3px 8px; border-radius: 999px;
}

.match {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.match:hover, .match:active { background: var(--bg-2); }
.match-time {
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  text-align: center;
  line-height: 1.3;
}
.match-time .status-live {
  color: var(--accent);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px;
}
.match-time .status-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s infinite;
}
.match-time .status-ft {
  color: var(--text-3); font-size: 11px;
}

.match-teams {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.team {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.team-crest {
  width: 22px; height: 22px;
  flex-shrink: 0;
  object-fit: contain;
}
.team-name {
  flex: 1;
  font-size: 14px; font-weight: 500;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match.is-finished .team:not(.winner) .team-name { color: var(--text-3); }
.team-score {
  font-size: 14px; font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0; margin-left: 8px;
}
.team.winner .team-score { color: var(--text); }
.match.is-live .team-score { color: var(--accent); }

.match-meta {
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-end;
}
.tv-channels {
  display: flex; gap: 4px;
  flex-wrap: wrap; justify-content: flex-end;
  max-width: 90px;
}
.tv-pill {
  font-size: 9px; font-weight: 600;
  padding: 3px 6px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--text-2);
  text-transform: uppercase; letter-spacing: .3px;
  white-space: nowrap;
}

/* ==== Empty state ==== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-3);
}
.empty-state svg { color: var(--line-2); margin-bottom: 12px; }
.empty-state h3 { color: var(--text-2); font-size: 16px; margin: 0 0 4px; font-weight: 600; }
.empty-state p { font-size: 13px; margin: 0; }

/* ==== Loading skeletons ==== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--line-2) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==== Footer ==== */
.footer {
  padding: 20px 16px 30px;
  text-align: center;
  color: var(--text-3);
  font-size: 11px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
}
.footer a { color: var(--text-2); }

/* ==== Mini banner (between sections) ==== */
.mini-banner {
  margin: 8px 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255,204,0,.08), rgba(33,208,122,.08));
  border: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 12px;
  font-size: 12px;
}
.mini-banner-icon {
  width: 32px; height: 32px;
  background: var(--accent-2);
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: #1a1a1a; font-weight: 800; font-size: 14px;
}
.mini-banner-text { flex: 1; }
.mini-banner-text b { color: var(--text); display: block; margin-bottom: 2px; }
.mini-banner-text span { color: var(--text-2); }
