/* HR Clips — High Rollers branding, on glass.
 *
 * The swatches are the authentic brand hexes, lifted verbatim from the daemon
 * dashboard's :root so the two surfaces cannot drift. They come from the logo:
 * casino felt, chip gold, card cream, ink outlines.
 *
 * Where this departs from the dashboard: the dashboard paints TAN panels and
 * puts INK text on them, which is right for a dense operator console. Here the
 * panels are dark translucent glass over the felt, with CREAM text. Same
 * palette, more depth — the felt and its glows show through, panels lift off
 * the background instead of sitting flat on it, and the gold reads as an accent
 * rather than as a fifth surface colour.
 *
 * Contrast was the constraint, not the look. Cream #FBE0A4 on the glass over
 * felt-deep is comfortably past 4.5:1; the muted tone is Tan, not a dimmed
 * cream, so secondary text stays legible instead of turning to mud. The
 * dashboard's dark --ok/--warn/--bad derivatives exist for text on TAN and are
 * deliberately NOT used here — on dark glass the bright brand hues are the
 * readable ones, which is the same reasoning applied to the opposite surface.
 */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* brand swatches (authentic hex) */
  --ink:#190502; --felt:#288330; --felt-deep:#1D5626; --gold:#CE7806;
  --gold-bright:#FFD527; --cream:#FBE0A4; --card-white:#E9E9EA;
  --chip-peach:#F1AC74; --tan:#B79672; --white:#FFFFFF; --red:#c23c2e;

  /* glass */
  --glass: rgba(14, 32, 16, 0.55);
  --glass-hi: rgba(255, 255, 255, 0.07);      /* top-edge highlight */
  --glass-line: rgba(251, 224, 164, 0.16);    /* cream at low alpha */
  --glass-line-hot: rgba(255, 213, 39, 0.55);
  --shadow-1: 0 1px 2px rgba(0,0,0,.28), 0 6px 16px rgba(0,0,0,.30);
  --shadow-2: 0 2px 6px rgba(0,0,0,.32), 0 18px 40px rgba(0,0,0,.42);

  --text: var(--cream);
  --muted: var(--tan);
  --accent: var(--gold-bright);

  --font-display:'Bebas Neue',Impact,'Oswald',sans-serif;
  --font-sans:'IBM Plex Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,'Cascadia Mono',Consolas,monospace;

  --r: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0; padding: 0 20px 72px;
  color: var(--text);
  font: 15px/1.6 var(--font-sans);
  background-color: #12401b;
  /* Felt with table lighting: a warm pool top-left, gold spill top-right, and a
     vignette so the panels have something to float above. */
  background-image:
    radial-gradient(1200px 620px at 6% -8%, rgba(40,131,48,.55), transparent 60%),
    radial-gradient(820px 420px at 100% -4%, rgba(206,120,6,.20), transparent 58%),
    radial-gradient(1100px 900px at 50% 120%, rgba(0,0,0,.55), transparent 70%),
    linear-gradient(180deg, #1D5626 0%, #143f1c 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}
body.shell { display: grid; place-items: center; padding: 24px; }

a { color: var(--gold-bright); text-decoration-color: rgba(255,213,39,.35); }
a:hover { color: var(--chip-peach); }
code, .mono { font-family: var(--font-mono); font-size: .88em; }

h1,h2,h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .035em; text-transform: uppercase; line-height: 1.05; }
h1 { font-size: 30px; margin: 0; text-shadow: 0 0 22px rgba(255,213,39,.3); }
h2 { font-size: 20px; margin: 30px 0 12px; }
h3 { font-size: 16px; margin: 0 0 6px; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); margin: 0 0 6px; }
.lede { color: var(--cream); opacity: .92; }
.muted { color: var(--muted); }

/* ---- the glass primitive ---- */
.glass, .card, .match, .sugg, .vid, dialog.sheet, .filters, .rail-item {
  background: linear-gradient(180deg, var(--glass-hi), transparent 42%), var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--glass-line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,.05);
}

/* ---- chrome ---- */
/* A floating bar rather than a band with sawn-off ends. The old version was a
   max-width block with its own background, so the gradient stopped dead at the
   content edge on both sides. Rounded, inset, and sitting on the felt like
   every other panel. */
header.top {
  max-width: 68rem; margin: 12px auto 6px; padding: 12px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  position: sticky; top: 10px; z-index: 60;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--glass-hi), transparent 45%), rgba(14,32,16,.82);
  -webkit-backdrop-filter: blur(16px) saturate(120%); backdrop-filter: blur(16px) saturate(120%);
  box-shadow: var(--shadow-2);
}
@media (max-width: 620px) {
  header.top { border-radius: 18px; padding: 10px 14px; }
}
header.top img.logo { height: 38px; width: auto; display: block; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
header.top nav { display: flex; gap: 6px; margin-left: auto; font-size: 14px; align-items: center; }
header.top nav a {
  color: var(--cream); text-decoration: none; padding: 6px 11px; border-radius: 999px;
  border: 1px solid transparent;
}
header.top nav a:hover { background: rgba(251,224,164,.10); color: var(--gold-bright); }
header.top nav a.here { border-color: var(--glass-line); background: rgba(255,213,39,.12); color: var(--gold-bright); }
.who { color: var(--tan); font-size: 12.5px; font-family: var(--font-mono); }
.who::before { content: "◆ "; color: var(--gold); }
main { max-width: 68rem; margin: 0 auto; }

.card { padding: 16px 20px; margin: 12px 0; }

.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 14px;
  background: linear-gradient(180deg, #E08A0C, var(--gold));
  color: #1a0d00; border: 1px solid rgba(0,0,0,.35); border-radius: 9px;
  padding: 8px 15px; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, var(--shadow-1);
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn.ghost {
  background: rgba(251,224,164,.07); color: var(--cream);
  border: 1px solid var(--glass-line); box-shadow: none;
}
.btn.ghost:hover { background: rgba(255,213,39,.14); color: var(--gold-bright); }

.warnbox {
  border-left: 3px solid var(--gold); border-radius: 0 var(--r) var(--r) 0;
  background: linear-gradient(90deg, rgba(206,120,6,.16), var(--glass));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 11px 15px; margin: 14px 0; box-shadow: var(--shadow-1);
}
.warnbox.bad { border-left-color: var(--red); background: linear-gradient(90deg, rgba(194,60,46,.20), var(--glass)); }
.warnbox.good { border-left-color: var(--felt); background: linear-gradient(90deg, rgba(40,131,48,.24), var(--glass)); }

/* ---- filters ---- */
/* The filter bar must outrank the content below it, and this is subtler than a
   z-index on the dropdown alone. Every card carries `backdrop-filter`, and that
   creates a stacking context — so a later sibling painted above the dropdown no
   matter how high its z-index was INSIDE the bar. The bar itself has to be a
   positioned, higher-stacked element for its popover to clear the gallery.
   Symptom was the player list disappearing behind the clip thumbnails. */
.filters {
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; margin: 10px 0 14px;
  position: relative; z-index: 50;
}
.filters input[type=search], .filters select {
  font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 9px;
  background: rgba(0,0,0,.28); color: var(--cream);
  border: 1px solid var(--glass-line);
}
.filters input[type=search] { min-width: 13rem; flex: 1 1 13rem; }
.filters input:focus, .filters select:focus { outline: 2px solid var(--glass-line-hot); outline-offset: 1px; }
.filters select option { background: #14301a; color: var(--cream); }
.f-who { position: relative; }
.f-who summary {
  list-style: none; cursor: pointer; font-size: 14px; padding: 7px 12px; border-radius: 9px;
  border: 1px solid var(--glass-line); background: rgba(0,0,0,.28); color: var(--cream);
}
.f-who summary::-webkit-details-marker { display: none; }
.f-who[open] summary { border-color: var(--glass-line-hot); color: var(--gold-bright); }
.f-who-list {
  position: absolute; z-index: 55; margin-top: 6px; min-width: 12rem; padding: 10px 12px;
  display: grid; gap: 6px; max-height: 60vh; overflow-y: auto;
  /* Opaque, not glass: a translucent popover over clip thumbnails is unreadable. */
  background: #163a1d; border: 1px solid var(--glass-line-hot); border-radius: var(--r);
  box-shadow: var(--shadow-2);
}
.f-who-list label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; white-space: nowrap; }
.f-count { font-size: 12.5px; margin-left: auto; font-family: var(--font-mono); }
.f-sort, .f-from, .f-to { font: inherit; }
.f-dates { display: none; gap: 6px; align-items: center; }
.f-dates.on { display: flex; }
.f-dates input[type=date] {
  font: inherit; font-size: 13.5px; padding: 6px 9px; border-radius: 9px;
  background: rgba(0,0,0,.28); color: var(--cream); border: 1px solid var(--glass-line);
  color-scheme: dark;
}

.seg { display: inline-flex; border: 1px solid var(--glass-line); border-radius: 9px; overflow: hidden; }
.seg button {
  font: inherit; font-size: 13.5px; padding: 7px 13px; cursor: pointer;
  background: rgba(0,0,0,.22); color: var(--cream); border: 0; border-right: 1px solid var(--glass-line);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: rgba(255,213,39,.18); color: var(--gold-bright); font-weight: 600; }

/* ---- latest clips rail ---- */
.rail-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(19rem, 22rem);
  gap: 14px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x mandatory;
  scrollbar-color: var(--gold) rgba(0,0,0,.25);
}
.rail-scroll::-webkit-scrollbar { height: 10px; }
.rail-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,.22); border-radius: 999px; }
.rail-scroll::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 999px; }
.rail-item {
  scroll-snap-align: start; overflow: hidden; display: block;
  text-decoration: none; color: var(--text);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.rail-item:hover { transform: translateY(-3px); border-color: var(--glass-line-hot); box-shadow: var(--shadow-2); }
.rail-item .v-body { padding: 10px 13px; }
.rail-item:hover .v-media .play span { background: var(--gold-bright); }

/* video frames */
.v-media { position: relative; aspect-ratio: 16/9; background: #0d1f10; display: block; }
.v-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-media iframe.yt, iframe.yt { width: 100%; height: 100%; border: 0; display: block; }
.v-media .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(closest-side, rgba(0,0,0,.15), rgba(0,0,0,.5));
}
.v-media .play span {
  width: 54px; height: 54px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(206,120,6,.92); color: #1a0d00; font-size: 20px; padding-left: 4px;
  box-shadow: var(--shadow-2); border: 1px solid rgba(0,0,0,.35);
}
.vid:hover .v-media .play span { background: var(--gold-bright); }
.v-title { font-weight: 600; font-size: 13.8px; line-height: 1.3; }
.v-meta { color: var(--muted); font-size: 12px; margin-top: 3px; font-family: var(--font-mono); }

/* ---- match list ---- */
.matches { display: grid; gap: 10px; }
.match {
  display: grid; grid-template-columns: 1fr auto; gap: 5px 16px;
  padding: 13px 16px; text-decoration: none; color: var(--text);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.match:hover {
  transform: translateY(-2px); border-color: var(--glass-line-hot); box-shadow: var(--shadow-2);
}
.match .m-map { font-family: var(--font-display); font-size: 20px; letter-spacing: .035em; text-transform: uppercase; }
.match .m-meta { font-size: 12.5px; color: var(--muted); }
.match .m-right { text-align: right; font-size: 12.5px; color: var(--muted); }

.badge {
  display: inline-block; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .09em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--glass-line); color: var(--tan); background: rgba(0,0,0,.22);
}
.badge.hot { border-color: rgba(255,213,39,.5); color: var(--gold-bright); background: rgba(255,213,39,.14); font-weight: 600; }
.badge.cold { opacity: .6; }
.badge.away { border-color: rgba(183,150,114,.4); }

/* ---- round strip ---- */
.strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.rnd {
  width: 46px; height: 46px; border-radius: 11px; padding: 0; cursor: pointer;
  font: inherit; display: grid; place-items: center; position: relative; color: var(--cream);
  background: linear-gradient(180deg, var(--glass-hi), transparent 45%), rgba(0,0,0,.3);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-1);
  transition: transform .12s ease, box-shadow .12s ease;
}
.rnd:hover { transform: translateY(-2px); }
.rnd.won { background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 45%), rgba(40,131,48,.62); border-color: rgba(120,220,140,.35); }
.rnd.lost { background: linear-gradient(180deg, rgba(255,255,255,.06), transparent 45%), rgba(194,60,46,.30); }
.rnd.active { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.rnd .k { font-weight: 700; font-size: 15px; }
.rnd .n { font-size: 9.5px; opacity: .72; font-family: var(--font-mono); }
.rnd .flame { position: absolute; top: -7px; right: -6px; font-size: 13px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }

/* ---- killfeed ---- */
.feed { display: grid; gap: 2px; }
.ev {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: baseline;
  padding: 6px 10px; border-radius: 9px; font-size: 14px;
  border-left: 3px solid transparent;
}
.ev .t { color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; }
.ev.mine { background: rgba(255,213,39,.13); border-left-color: var(--gold-bright); }
.ev.onme { background: rgba(194,60,46,.16); border-left-color: var(--red); }
.ev.roster:not(.mine):not(.onme) { background: rgba(40,131,48,.16); }
.ev.bomb { background: rgba(206,120,6,.14); border-left-color: var(--gold); font-weight: 600; }
.ev.bomb.defused { background: rgba(90,150,220,.14); border-left-color: #6ba7e8; }
.ev .who { font-weight: 600; }
.tag {
  font-family: var(--font-mono); font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: rgba(0,0,0,.30); color: var(--tan); margin-left: 5px;
  text-transform: uppercase; letter-spacing: .06em;
}
.tag.hs { background: rgba(255,213,39,.24); color: var(--gold-bright); }

/* ---- scoreboard ---- */
.sb-team + .sb-team { margin-top: 12px; }
.sb-head, .sb-row {
  display: grid; grid-template-columns: 1fr 5.5rem repeat(5, 3rem);
  gap: 6px; align-items: baseline; padding: 5px 8px; border-radius: 8px;
}
.sb-head {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--tan); border-bottom: 1px solid var(--glass-line);
}
.sb-head > span:nth-child(n+3), .sb-row > span:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.sb-row { font-size: 14px; }
.sb-row.hr { background: rgba(40,131,48,.20); }
.sb-row.focus { background: rgba(255,213,39,.16); box-shadow: inset 2px 0 0 var(--gold-bright); }
.sb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 620px) {
  .sb-head, .sb-row { grid-template-columns: 1fr repeat(4, 2.3rem); }
  .sb-head > span:nth-child(2), .sb-row > span:nth-child(2),
  .sb-head > span:nth-child(6), .sb-row > span:nth-child(6) { display: none; }
}

/* ---- queue ---- */
.q-job { display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; padding: 9px 0; border-bottom: 1px solid var(--glass-line); }
.q-job:last-child { border-bottom: none; }
.q-kind {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--glass-line); color: var(--tan);
}
.q-kind.clip { border-color: rgba(255,213,39,.5); color: var(--gold-bright); }
.q-kind.record { border-color: rgba(183,150,114,.5); }
.bar { height: 6px; border-radius: 999px; background: rgba(0,0,0,.3); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }

/* ---- suggestions ---- */
.rail { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.sugg { padding: 12px 14px; transition: transform .14s ease, border-color .14s ease; }
.sugg:hover { transform: translateY(-2px); border-color: var(--glass-line-hot); }
.sugg.selected { border-color: rgba(255,213,39,.5); box-shadow: var(--shadow-1), 0 0 0 1px rgba(255,213,39,.2) inset; }
.sugg .s-tag { font-family: var(--font-display); font-size: 18px; letter-spacing: .035em; text-transform: uppercase; }
.sugg .s-meta { color: var(--muted); font-size: 12.5px; }

/* ---- request sheet ---- */
dialog.sheet { max-width: 33rem; width: 92%; padding: 20px 24px; color: var(--text); box-shadow: var(--shadow-2); }
dialog.sheet::backdrop { background: rgba(8,20,10,.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.field { display: grid; gap: 4px; margin: 11px 0; }
.field label { font-size: 12.5px; color: var(--muted); }
.field input, .field select {
  font: inherit; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--glass-line); background: rgba(0,0,0,.3); color: var(--cream);
}
.field input:focus, .field select:focus { outline: 2px solid var(--glass-line-hot); outline-offset: 1px; }
.field select option { background: #14301a; }
.row { display: flex; gap: 13px; align-items: center; flex-wrap: wrap; }
details.adv summary { cursor: pointer; color: var(--muted); font-size: 13.5px; margin: 11px 0; }

/* ---- clip rows ---- */
.clip { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; border-bottom: 1px solid var(--glass-line); padding: 11px 0; }
.clip:last-child { border-bottom: none; }
.state { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; }
.state.done { color: #8fd6a4; }
.state.failed { color: #ef8f84; }
.state.live { color: var(--gold-bright); }

/* ---- gallery ---- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.vid { overflow: hidden; text-decoration: none; color: var(--text); display: block; cursor: pointer;
       transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.vid:hover { transform: translateY(-3px); border-color: var(--glass-line-hot); box-shadow: var(--shadow-2); }
.vid.playing { transform: none; }
.vid .v-body { padding: 10px 13px; }

@media (max-width: 620px) {
  body { padding: 0 12px 56px; }
  header.top img.logo { height: 30px; }
  header.top nav { gap: 2px; font-size: 13px; }
  header.top nav a { padding: 5px 8px; }
  h1 { font-size: 23px; }
  .rail-scroll { grid-auto-columns: 84vw; }
  .ev { grid-template-columns: 46px 1fr; }
  .ev > :last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .match:hover, .vid:hover, .sugg:hover, .rnd:hover, .btn:hover { transform: none; }
}
