:root {
  --bg: #080a0e;
  --surface: #0f1117;
  --surface-2: #161b24;
  --surface-3: #1e2535;
  --border: rgba(255,255,255,0.06);
  --accent: #00e5ff;
  --accent-dim: rgba(0,229,255,0.12);
  --accent-glow: rgba(0,229,255,0.3);
  --hot: #ff3d5a;
  --hot-dim: rgba(255,61,90,0.15);
  --muted: #6b7a96;
  --text: #e8edf5;
  --discord: #5865F2;
  --header-h: 60px;
  --radius: 10px;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Noise texture overlay */
.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ---- HEADER ---- */
header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(8,10,14,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  line-height: 1;
}

.accent { color: var(--accent); }

.brand-sub {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--discord);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}

.discord-btn svg { width: 16px; height: 16px; }
.discord-btn:hover { background: #4752c4; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(88,101,242,0.4); }

/* ---- LAYOUT ---- */
.container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  max-width: 1380px;
  margin: 0 auto;
  padding: var(--header-h) 20px 24px;
  padding-top: calc(var(--header-h) + 20px);
  position: relative;
  z-index: 1;
}

@media (max-width: 1024px) {
  .container { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ---- CONTROLS ---- */
.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.select-wrap, .search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  transition: border-color 0.2s;
}

.select-wrap svg, .search-wrap svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex-shrink: 0;
}

.select-wrap:focus-within, .search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-wrap { flex: 1; min-width: 140px; }

select, input[type="text"] {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 0;
  outline: none;
  width: 100%;
}

select { cursor: pointer; }
select option { background: #1e2535; }

.popular-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.popular-btn svg { width: 14px; height: 14px; }
.popular-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }
.popular-btn.active {
  background: var(--hot-dim);
  border-color: var(--hot);
  color: var(--hot);
}

/* ---- SCHEDULE ---- */
.schedule { display: flex; flex-direction: column; gap: 2px; }

.date-group { margin-bottom: 12px; }

.date-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
}

.date-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.date-label {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  white-space: nowrap;
}

.match-list { display: flex; flex-direction: column; gap: 4px; }

.match {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.match::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.2s;
  border-radius: 0 2px 2px 0;
}

.match:hover {
  background: var(--surface-2);
  border-color: rgba(255,255,255,0.1);
  transform: translateX(2px);
}

.match:hover::before { background: var(--accent); }
.match.popular::before { background: var(--hot); }

.match-time {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  text-align: center;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.match-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.match-teams-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.match-badge {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 3px;
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
  padding: 2px;
}

.team-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}

.vs-sep {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.match-league {
  font-size: 11px;
  color: var(--muted);
}

.match-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.watch-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,255,0.25);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.watch-btn:hover { background: rgba(0,229,255,0.2); }

.popular-tag {
  font-size: 10px;
  background: var(--hot-dim);
  border: 1px solid rgba(255,61,90,0.3);
  color: var(--hot);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ---- SIDEBAR ---- */
.sidebar { display: flex; flex-direction: column; gap: 14px; padding-top: 56px; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.glow-card {
  border-color: rgba(0,229,255,0.2);
  background: linear-gradient(135deg, rgba(0,229,255,0.05), transparent);
}

.card-icon { font-size: 28px; margin-bottom: 10px; }

.sidebar-card h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.sidebar-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

.sidebar-card ol {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-card ol li {
  counter-increment: steps;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.sidebar-card ol li::before {
  content: counter(steps);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.sports-icons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.sports-icons span {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 6px 8px;
}

/* ---- STATES ---- */
.loading-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 32px;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- MOBILE ---- */
@media (max-width: 640px) {
  header { padding: 0 12px; }
  .brand-sub { display: none; }
  .discord-btn span { display: none; }
  .discord-btn { padding: 8px 10px; }

  .container {
    padding: calc(var(--header-h) + 12px) 12px 20px;
    grid-template-columns: 1fr;
  }

  .controls { flex-wrap: wrap; }
  .select-wrap { min-width: 100%; }

  .match {
    grid-template-columns: 44px 1fr;
    gap: 8px;
    padding: 10px 10px;
  }

  .match-action { display: none; }
  .match-time { font-size: 13px; }
  .match-badge { width: 20px; height: 20px; }
  .team-name { font-size: 13px; }
  .vs-sep { font-size: 10px; }
  .match-league { font-size: 10px; }
}
