:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --bg4: #202020;
  --border: rgba(255,255,255,0.07);
  --text: #f0f0f0;
  --muted: #888;
  --red: #e03131;
  --gold: #f59f00;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-grow { flex: 1; display: flex; flex-direction: column; }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Russo One', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.logo svg { width:22px; height:22px; }
.logo .logo-accent { color: var(--red); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn-multistream {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-multistream:hover { background: var(--bg2); }

.btn-discord {
  background: #5865F2;
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.btn-discord:hover { background: #4752c4; transform: scale(1.05); }

/* ── PAGE LAYOUT ── */
.page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  box-sizing: border-box;
}

/* ── MATCH HEADER ── */
.match-header {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.match-title {
  font-family: 'Russo One', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.match-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.match-meta .cat-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: capitalize;
}
.match-meta .time-txt {
  color: var(--muted);
  font-size: 0.78rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}
.btn-back:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* ── CONTENT GRID ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

/* ── PLAYER ── */
.player-section {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid var(--border);
}
.player-section iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.player-placeholder {
  position: absolute;
  inset: 0;
  background: #000;
}

/* ── STREAMS PANEL ── */
.streams-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 76px;
}
.streams-panel-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.streams-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.streams-scroll {
  overflow-y: auto;
  flex: 1;
  padding: 10px 0;
}

/* ── SOURCE GROUP ── */
.source-group {
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.source-group:last-child { border-bottom: none; margin-bottom: 0; }

.source-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 8px;
}
.source-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-transform: capitalize;
}
.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--red);
  margin-top: 2px;
}
.source-tag svg { width:11px; height:11px; }
.source-count-badge {
  background: rgba(224,49,49,0.15);
  color: var(--red);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(224,49,49,0.25);
  white-space: nowrap;
}

/* ── STREAM ROW ── */
.stream-rows { padding: 2px 0; }
.stream-row {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
  border-left: 3px solid transparent;
  gap: 10px;
}
.stream-row:hover { background: rgba(255,255,255,0.03); }
.stream-row.active {
  background: rgba(224,49,49,0.07);
  border-left-color: var(--red);
}

.quality-badge {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.quality-badge.hd { background: rgba(224,49,49,0.18); color: var(--red); border: 1px solid rgba(224,49,49,0.3); }
.quality-badge.sd { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border); }

.stream-label { font-size: 0.82rem; font-weight: 600; color: var(--text); flex: 1; }
.stream-current {
  font-size: 0.68rem;
  color: var(--red);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stream-current::before { content: '✓'; font-size: 0.68rem; }
.stream-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  margin-left: auto;
  flex-shrink: 0;
}
.stream-lang svg { width:12px; height:12px; opacity:0.6; }

/* ── LOADING / EMPTY ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.9rem;
  gap: 12px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding:40px 0; text-align:center; color:var(--muted); font-size:0.9rem; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* ── RESPONSIVE ── */
@media (min-width: 1200px) {
  .content-grid { grid-template-columns: 1fr 400px; }
}
@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 1fr 320px; gap: 16px; }
}
@media (max-width: 860px) {
  .content-grid { grid-template-columns: 1fr; }
  .streams-panel { position: static; max-height: 420px; }
}
@media (max-width: 600px) {
  nav { padding: 0 16px; gap: 12px; }
  .page { padding: 14px 12px 40px; }
  .match-title { font-size: 0.95rem; }
  .match-header { margin-bottom: 12px; }
  .streams-panel { max-height: 360px; border-radius: 8px; }
  .player-section { border-radius: 8px; }
  .stream-row { padding: 10px 14px; }
  .source-group-header { padding: 10px 14px 8px; }
}
@media (max-width: 380px) {
  .match-title { font-size: 0.85rem; }
  .logo { font-size: 1.05rem; }
}
/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
}
.site-footer p {
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}
