/* ───────────────────────────────────────────────
   streamball.top — shared styles v2: tokens, header, footer, multi-stream
   Pure black, one loud green.
   ─────────────────────────────────────────────── */
:root {
  --bg: #000000;
  --surface: #0b0b0b;
  --surface-2: #151515;
  --line: #1f1f1f;
  --line-strong: #303030;
  --ink: #f5f5f2;
  --muted: #8e8e8a;
  --accent: #19e36a;
  --accent-dim: #0f9d48;
  --accent-ink: #03130a;
  --live: var(--accent);

  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(14px, 4vw, 32px);
  --header-h: 60px;
  --r: 12px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }

a { color: inherit; }
img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Header ───────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(0, 0, 0, .86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  text-decoration: none;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -.04em;
}
.brand-tld { color: var(--accent); }
.brand-tagline {
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: 600 .9375rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
@media (hover: hover) { .btn:hover { border-color: var(--accent); color: var(--accent); } }
.btn-solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .btn-solid:hover { background: #55ec8b; border-color: #55ec8b; color: var(--accent-ink); } }
.btn svg { flex: none; }

/* ── Mirror links ─────────────────────────────── */
.mirrors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: .875rem;
  color: var(--muted);
}
.mirrors a { font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
@media (hover: hover) { .mirrors a:hover { color: var(--accent); border-color: var(--accent); } }

/* ── Footer ───────────────────────────────────── */
.section-footer {
  margin-top: 16px;
  padding: 0 0 18px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.6;
}
.section-footer p { margin: 0 auto; max-width: 70ch; border-top: 1px solid var(--line); padding-top: 12px; text-align: center; }

.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(25, 227, 106, .6);
  animation: pulse 2s infinite;
  flex: none;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(25, 227, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 227, 106, 0); }
}

/* ── Phones ───────────────────────────────────── */
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .brand-name { font-size: 1.15rem; }
  .brand-tagline { display: block; font-size: .7rem; }
  .btn { padding: 0 14px; min-height: 38px; }
  .btn-icon .btn-label { display: none; }
  .btn-icon { width: 40px; padding: 0; }
  .btn-discord { width: auto; padding: 0 14px; }
  .btn-discord .btn-label { display: inline; }
  .section-footer { margin-top: 12px; padding: 0 0 14px; font-size: .75rem; }
  .section-footer p { padding-top: 10px; line-height: 1.45; }
}

/* ── MULTI STREAM OVERLAY ─────────────────────── */
#msOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ms-modal {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  width: 100%;
  max-width: 1160px;
  height: 88vh;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ms-modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.ms-modal-title { font: 700 1.1rem var(--font-display); letter-spacing: -.03em; }
.ms-modal-sub { font-size: .8125rem; color: var(--muted); flex: 1; }
.ms-close-btn {
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink);
  padding: 8px 16px; border-radius: 10px; cursor: pointer; font: 600 .875rem var(--font-body);
}
@media (hover: hover) { .ms-close-btn:hover { border-color: var(--accent); color: var(--accent); } }

.ms-panels {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px;
  flex: 1; overflow: hidden; min-height: 0; height: 0;
}
.ms-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  display: flex; flex-direction: column; overflow: hidden; min-height: 0; height: 100%;
}
.ms-search-area { display: flex; flex-direction: column; height: 100%; min-height: 300px; }
.ms-search-wrap { padding: 10px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ms-search-input {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--ink); padding: 10px 12px; font: 500 16px var(--font-body);
}
.ms-search-input::placeholder { color: var(--muted); }
.ms-results { flex: 1; overflow-y: auto; padding: 4px 0; }
.ms-result-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
@media (hover: hover) { .ms-result-item:hover { background: var(--surface-2); } }
.ms-result-sport {
  font-size: .6875rem; font-weight: 700; color: var(--accent);
  border: 1px solid var(--accent-dim); padding: 2px 8px; border-radius: 6px; flex-shrink: 0;
}
.ms-result-title { flex: 1; font-size: .875rem; line-height: 1.3; }
.ms-result-time { font-size: .8125rem; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ms-no-results { padding: 20px; text-align: center; color: var(--muted); font-size: .875rem; }

.ms-player-area { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.ms-panel-topbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.ms-panel-title { flex: 1; font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.ms-change-btn {
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink);
  padding: 5px 12px; border-radius: 8px; cursor: pointer; font: 600 .75rem var(--font-body); flex-shrink: 0;
}
@media (hover: hover) { .ms-change-btn:hover { border-color: var(--accent); color: var(--accent); } }
.ms-stream-btns {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px;
  flex-shrink: 0; border-bottom: 1px solid var(--line);
}
.ms-stream-btn {
  background: transparent; border: 1px solid var(--line-strong); color: var(--muted);
  padding: 5px 12px; border-radius: 8px; cursor: pointer; font: 600 .75rem var(--font-body);
}
.ms-stream-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .ms-stream-btn:hover:not(.active) { color: var(--ink); border-color: var(--accent); } }
.ms-iframe-wrap { flex: 1; position: relative; min-height: 200px; background: #000; }
.ms-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

@media (max-width: 700px) {
  #msOverlay { padding: 0; align-items: flex-start; }
  .ms-modal { border-radius: 0; height: 100dvh; max-height: 100dvh; border: none; }
  .ms-panels { grid-template-columns: 1fr; overflow-y: auto; gap: 10px; padding: 10px; }
  .ms-panel { min-height: 420px; height: auto; flex-shrink: 0; }
  .ms-player-area { min-height: 420px; }
  .ms-stream-btns { max-height: 76px; overflow-y: auto; }
  .ms-iframe-wrap { min-height: 240px; }
  .ms-search-area { min-height: 300px; }
  .ms-modal-sub { display: none; }
}
