:root {
  color-scheme: dark;
  --orange: #ef6c23;
  --orange-soft: #9c4017;
  --ink: #070707;
  --panel: #111214;
  --panel-2: #18191c;
  --line: #303136;
  --muted: #a7a7ac;
  --danger: #ff6b6b;
  --success: #67d391;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% -20%, #2d160c 0, #0c0c0d 34rem, #050505 70rem);
  color: #f7f7f7;
}
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid color-mix(in srgb, var(--orange) 28%, transparent);
  background: rgba(5, 5, 5, .88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 2px solid var(--orange); border-radius: 12px;
  color: var(--orange); font-size: 25px; font-weight: 950;
  box-shadow: 0 0 24px rgba(239,108,35,.25);
}
.brand strong, .brand small { display: block; letter-spacing: .16em; }
.brand strong { color: var(--orange); font-size: 17px; }
.brand small { font-size: 11px; margin-top: 2px; }
nav { display: flex; gap: 8px; }
nav a { padding: 10px 14px; border-radius: 9px; text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
nav a[aria-current="page"] { background: #2a160e; color: var(--orange); }
.boxing-home-link {
  padding: 11px 16px;
  border: 1px solid #6b4428;
  border-radius: 10px;
  background: linear-gradient(145deg, #24170e, #100d0b);
  color: #ffd28d;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-align: center;
}
.boxing-home-link:hover, .boxing-home-link:focus-visible { border-color: var(--orange); color: #fff; outline: none; }

main { width: min(1480px, 100%); min-height: calc(100vh - 142px); margin: auto; padding: clamp(20px, 4vw, 52px); }
.eyebrow { color: var(--orange); font-size: 12px; font-weight: 850; letter-spacing: .19em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 5vw, 58px); line-height: .98; letter-spacing: -.045em; }
.lede { color: var(--muted); max-width: 680px; line-height: 1.55; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 26px; margin-top: 28px; }
.watch-column { min-width: 0; display: grid; gap: 20px; align-content: start; }
.player-panel, .directory-panel, .manage-panel, .login-panel {
  background: linear-gradient(145deg, rgba(25,26,29,.96), rgba(10,10,11,.97));
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 22px 70px rgba(0,0,0,.28);
}
.player-panel { padding: 18px; min-width: 0; }
.player-heading { display: flex; justify-content: space-between; gap: 14px; align-items: end; margin-bottom: 14px; }
.player-heading h2 { margin-bottom: 3px; font-size: 21px; }
.location, .source-label { color: var(--muted); font-size: 13px; }
.player-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid #2b2b2b; display: grid; place-items: center; }
.player-frame iframe, .player-frame video { border: 0; width: 100%; height: 100%; object-fit: contain; }
.player-placeholder { text-align: center; color: var(--muted); padding: 24px; }
.player-placeholder .icon { display: block; color: var(--orange); font-size: 44px; margin-bottom: 10px; }
.retry { margin-top: 12px; }

.sponsor-section { padding: 20px; border: 1px solid #3a2a22; border-radius: 20px; background: linear-gradient(145deg, #17120f, #090909); }
.sponsor-heading h2 { margin: 4px 0 16px; font-size: 22px; }
.sponsor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sponsor-card { min-height: 132px; padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; text-decoration: none; border: 1px solid #483126; border-radius: 14px; background: #101011; color: #fff; overflow: hidden; }
a.sponsor-card:hover, a.sponsor-card:focus-visible { border-color: var(--orange); outline: none; }
.sponsor-card img { width: min(100%, 150px); height: 58px; object-fit: contain; }
.sponsor-logo-placeholder { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--orange-soft); border-radius: 10px; color: var(--orange); font-weight: 950; }
.sponsor-space { border-style: dashed; }
.sponsor-space span { color: var(--orange); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.sponsor-space small { color: var(--muted); }

.directory-panel { padding: 18px; min-height: 420px; }
.directory-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.directory-title h2 { margin: 0; font-size: 18px; }
.feed-list, .feed-group { display: grid; gap: 10px; }
.feed-group + .feed-group { margin-top: 12px; padding-top: 16px; border-top: 1px solid #303136; }
.feed-group h3 { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.feed-card { position: relative; width: 100%; color: white; border: 1px solid #323238; border-radius: 13px; background: #151619; overflow: hidden; }
.feed-card.promoted.featured { border-color: #9c501e; background: #21150f; }
.feed-card.promoted.community { border-color: #436452; background: #101b15; }
.feed-select { width: 100%; text-align: left; color: white; padding: 15px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; border: 0; background: transparent; cursor: pointer; }
.feed-select:hover, .feed-select:focus-visible { background: #1c1714; outline: 2px solid var(--orange-soft); outline-offset: -2px; }
.feed-select[aria-pressed="true"] { background: #25150e; }
.feed-play { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--orange); background: #2a160d; }
.feed-select strong, .feed-select small { display: block; }
.feed-select small { color: var(--muted); margin-top: 4px; }
.feed-type { color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.placement-badges { display: flex; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; }
.placement-badges b { padding: 4px 7px; border-radius: 999px; background: var(--orange); color: #111; font-size: 9px; letter-spacing: .08em; }
.placement-badges .sponsored { background: #fff; }
.placement-badges .community { background: #315940; color: #d9ffe6; }
.feed-actions { margin: 0 12px 12px 65px; display: flex; gap: 7px; flex-wrap: wrap; }
.share-stream, .vote-stream { padding: 6px 9px; border: 1px solid #46474c; border-radius: 7px; background: transparent; color: #c4c4c8; font-size: 9px; font-weight: 850; letter-spacing: .1em; cursor: pointer; }
.share-stream:hover, .share-stream:focus-visible { color: #fff; border-color: var(--orange); outline: none; }
.vote-stream:hover, .vote-stream:focus-visible, .vote-stream.selected { color: #111; border-color: var(--orange); background: var(--orange); outline: none; }
.vote-stream:disabled { opacity: .55; cursor: wait; }
.share-status { min-height: 18px; margin: 4px 0 0; color: var(--success); font-size: 12px; }

.weekly-leaderboard { margin-top: 24px; padding: 18px 20px; display: grid; grid-template-columns: minmax(220px, .7fr) minmax(300px, 1.3fr); gap: 20px; border: 1px solid #38433c; border-radius: 18px; background: linear-gradient(145deg, #111814, #090a09); }
.weekly-leaderboard h2 { margin: 4px 0 5px; font-size: 21px; }
.weekly-leaderboard p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.weekly-leaderboard .state { min-height: 80px; padding: 10px; }
.leaderboard-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.leaderboard-list li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; background: #151917; font-size: 13px; }
.leaderboard-list li > span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.leaderboard-rank { color: var(--orange); font-weight: 900; }

.install-invite { position: fixed; z-index: 20; left: clamp(12px, 3vw, 34px); bottom: clamp(12px, 3vw, 34px); width: min(390px, calc(100% - 24px)); padding: 18px; border: 1px solid #7d4124; border-radius: 16px; background: rgba(16, 13, 12, .98); box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.install-invite[hidden] { display: none; }
.install-invite [hidden] { display: none; }
.install-invite h2 { margin: 4px 28px 6px 0; font-size: 21px; }
.install-invite p { margin-bottom: 8px; color: #e6e6e8; line-height: 1.45; }
.install-invite .install-help { color: var(--muted); font-size: 13px; }
.install-invite small { min-height: 18px; display: block; color: #d5a98f; line-height: 1.4; }
.install-invite-actions { display: flex; gap: 8px; margin-top: 13px; }
.install-close { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.install-close:focus-visible { outline: 2px solid var(--orange); border-radius: 8px; }

.state { min-height: 240px; display: grid; place-items: center; text-align: center; padding: 28px; color: var(--muted); }
.state strong { display: block; color: white; margin-bottom: 8px; }
.state.error { color: #ffb3b3; }
.state code { display: block; margin: 10px 0; font-size: 12px; overflow-wrap: anywhere; }
.spinner { width: 26px; height: 26px; display: inline-block; border: 3px solid #3b291f; border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-state { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }

.button { border: 1px solid var(--orange); border-radius: 9px; background: var(--orange); color: #111; padding: 10px 15px; font-weight: 850; cursor: pointer; }
.button.secondary { color: #fff; background: transparent; border-color: #4b4c51; }
.button.danger { color: #fff; background: #6d2424; border-color: #a64242; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.manage-shell { max-width: 1100px; margin: auto; }
.manage-header { display: flex; gap: 20px; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.manage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.login-panel { max-width: 460px; padding: 26px; margin: 8vh auto; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 12px; font-weight: 800; color: var(--muted); }
.field input, .field select { width: 100%; border: 1px solid #3a3b40; background: #09090a; color: white; padding: 12px; border-radius: 9px; }
.field input:focus, .field select:focus { outline: 2px solid var(--orange-soft); border-color: var(--orange); }
.form-error { color: #ff9999; min-height: 22px; font-size: 13px; }
.manage-panel { overflow: hidden; }
.manage-section-title { margin: 0 0 10px; }
.manage-subheader { margin: 34px 0 12px; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.manage-subheader h2 { margin: 3px 0 0; }
.check-field { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 800; }
.manage-row { display: grid; grid-template-columns: 1.1fr 1fr .8fr auto; gap: 14px; padding: 16px 18px; align-items: center; border-bottom: 1px solid #2b2c30; }
.manage-row:last-child { border-bottom: 0; }
.manage-row small { color: var(--muted); overflow-wrap: anywhere; }
.status { width: max-content; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 850; letter-spacing: .08em; background: #2c2d31; }
.status.enabled { color: var(--success); background: #13251b; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: end; }
.row-actions button { padding: 7px 10px; }
.modal { border: 1px solid #4b4c50; border-radius: 18px; background: #141518; color: white; width: min(560px, calc(100% - 28px)); padding: 0; }
.modal::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(4px); }
.modal form { padding: 24px; }
.modal-actions { display: flex; justify-content: end; gap: 9px; margin-top: 20px; }

footer { min-height: 66px; padding: 18px clamp(18px, 4vw, 64px); border-top: 1px solid #27272a; color: #77787c; display: flex; justify-content: space-between; align-items: center; gap: 18px; font-size: 11px; letter-spacing: .08em; }
.visit-counter { display: grid; justify-items: center; gap: 3px; text-align: center; letter-spacing: normal; }
.visit-counter > span:first-child { color: #eee; font-weight: 750; }
.visit-counter strong { color: var(--orange); font-size: 22px; font-variant-numeric: tabular-nums; }
.visit-counter small { color: #929398; }
.visit-counter .tracking-pending { color: #d69a76; }

@media (max-width: 880px) {
  .watch-layout { grid-template-columns: 1fr; }
  .sponsor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-panel { min-height: 0; }
  .manage-row { grid-template-columns: 1fr auto; }
  .manage-row > :nth-child(2), .manage-row > :nth-child(3) { grid-column: 1 / -1; }
  .row-actions { grid-column: 2; grid-row: 1; }
  .weekly-leaderboard { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header { min-height: 66px; padding: 10px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: 14px; }
  nav a { padding: 9px 8px; font-size: 10px; }
  .boxing-home-link { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: 10px 12px; }
  main { padding: 22px 14px 34px; }
  .player-panel, .directory-panel { padding: 12px; border-radius: 15px; }
  .sponsor-section { padding: 14px; border-radius: 15px; }
  .sponsor-grid { grid-template-columns: 1fr; }
  .player-heading { align-items: start; flex-direction: column; }
  .manage-header { align-items: start; flex-direction: column; }
  .manage-row { grid-template-columns: 1fr; }
  .row-actions { grid-column: 1; grid-row: auto; justify-content: start; }
  .feed-select { grid-template-columns: 34px 1fr; padding: 12px; }
  .feed-type { grid-column: 2; }
  .feed-actions { margin-left: 58px; }
  footer { flex-direction: column; }
}


/* Larger sponsor artwork */
.sponsor-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}
.sponsor-card {
  min-width: 0;
  min-height: 260px;
  padding: 20px;
  gap: 16px;
}
.sponsor-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 220px;
  object-fit: contain;
}
.sponsor-card strong {
  overflow-wrap: anywhere;
}
@media (max-width: 540px) {
  .sponsor-grid { grid-template-columns: 1fr; }
  .sponsor-card { min-height: 230px; padding: 16px; }
  .sponsor-card img { height: 190px; }
}
