/* ==========================================================================
   PixelPit Arcade — core stylesheet
   ========================================================================== */

:root {
  --bg: #0a0a12;
  --bg-soft: #10101c;
  --panel: #16162a;
  --panel-2: #1e1e35;
  --line: #2a2a44;
  --text: #ececfa;
  --muted: #9494b8;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-3: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --header-h: 64px;
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }

/* Author styles beat the browser's own `[hidden] { display: none }`, so any
   class rule that sets `display` would keep a hidden element on screen.
   Pin it down once here rather than per component. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(139, 92, 246, .20), transparent 60%),
    radial-gradient(800px 460px at 90% 4%, rgba(236, 72, 153, .16), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

/* Scrollbars ------------------------------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: #34345a transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #34345a; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #45457a; background-clip: content-box; }

/* ==========================================================================
   Header
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: rgba(10, 10, 18, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.burger:hover { background: var(--panel-2); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.3px;
  flex: 0 0 auto;
}
.brand .logo {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(139, 92, 246, .45);
}
.brand .logo svg { width: 22px; height: 22px; }
.brand .name b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 520px;
  margin: 0 auto;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input::placeholder { color: #6f6f95; }
.search input:focus {
  border-color: var(--accent);
  background: var(--panel-2);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .16);
}
.search .icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #7a7aa3; pointer-events: none;
}
.search kbd {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font: 600 11px/1 ui-monospace, monospace;
  color: #7a7aa3;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 6px;
  background: var(--bg-soft);
}
.search input:focus ~ kbd { opacity: 0; }

.top-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { background: var(--panel-2); border-color: #3b3b63; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 6px 18px rgba(139, 92, 246, .35); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.icon-only { width: 40px; padding: 0; justify-content: center; }
.btn svg { width: 17px; height: 17px; }

/* ==========================================================================
   Layout
   ========================================================================== */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 22px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px 20px 60px;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 44px);
  overflow-y: auto;
  padding-right: 4px;
}

.side-title {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 4px 0 10px 12px;
}

.cat-list { display: flex; flex-direction: column; gap: 3px; margin-bottom: 26px; }

.cat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background .14s, color .14s;
}
.cat .emo { font-size: 17px; width: 22px; text-align: center; }
.cat .count { margin-left: auto; font-size: 12px; color: #61618a; font-weight: 700; }
.cat:hover { background: var(--panel); color: var(--text); }
.cat.active { background: var(--panel-2); color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.cat.active .count { color: var(--accent); }

.side-card {
  background: linear-gradient(160deg, rgba(139, 92, 246, .18), rgba(236, 72, 153, .10));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.side-card h4 { margin: 0 0 6px; font-size: 15px; }
.side-card p { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { margin-bottom: 34px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.3px;
}
.section-head .sub { color: var(--muted); font-size: 13.5px; }
.section-head .spacer { flex: 1; }
.section-head .link {
  font-size: 13px; color: var(--muted); font-weight: 600; cursor: pointer;
}
.section-head .link:hover { color: var(--text); }

/* Hero ------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 34px;
}
.hero-main {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background: var(--panel);
}
.hero-main .art { position: absolute; inset: 0; }
.hero-main .art svg { width: 100%; height: 100%; }
.hero-main .veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 6, 14, .96) 8%, rgba(6, 6, 14, .55) 45%, transparent 78%);
}
.hero-copy { position: relative; padding: 26px; max-width: 560px; }
.hero-copy .kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: #fff; background: var(--grad);
  padding: 6px 11px; border-radius: 999px; margin-bottom: 12px;
}
.hero-copy h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.1; letter-spacing: -1px; }
.hero-copy p { margin: 0 0 18px; color: #c3c3dd; font-size: 15px; line-height: 1.55; max-width: 460px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; min-width: 0; }
.hero-tile {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  min-height: 142px;
  transition: transform .16s, border-color .16s;
}
.hero-tile:hover { transform: translateY(-3px); border-color: #47477a; }
.hero-tile .art { position: absolute; inset: 0; }
.hero-tile .art svg { width: 100%; height: 100%; }
.hero-tile .veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 6, 14, .92), transparent 62%); }
.hero-tile .tile-copy { position: relative; padding: 14px 16px; }
.hero-tile h3 { margin: 0 0 3px; font-size: 17px; letter-spacing: -.2px; }
.hero-tile span { font-size: 12.5px; color: var(--muted); }

/* ==========================================================================
   Game grid + cards
   ========================================================================== */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .14s;
}
.chip:hover { color: var(--text); border-color: #3d3d66; }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}
.grid.dense { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 13px; }

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2, .8, .3, 1), border-color .16s, box-shadow .16s;
  display: block;
}
.card:hover { transform: translateY(-4px); border-color: #4b4b80; box-shadow: var(--shadow); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card .thumb { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.card .thumb svg { width: 100%; height: 100%; display: block; transition: transform .3s ease; }
.card:hover .thumb svg { transform: scale(1.06); }

.card .play-overlay {
  position: absolute; inset: 0;
  background: rgba(8, 8, 18, .55);
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity .18s;
}
.card:hover .play-overlay { opacity: 1; }
.play-overlay .pbtn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
  transform: scale(.85);
  transition: transform .18s;
}
.card:hover .play-overlay .pbtn { transform: scale(1); }
.play-overlay svg { width: 22px; height: 22px; margin-left: 3px; }

.card .meta { padding: 10px 12px 12px; }
.card .meta h3 {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .meta .tag { font-size: 12px; color: var(--muted); }

.badge {
  position: absolute; top: 9px; left: 9px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px;
  color: #fff;
  backdrop-filter: blur(4px);
}
.badge.hot { background: linear-gradient(135deg, #f97316, #ef4444); }
.badge.new { background: linear-gradient(135deg, #22d3ee, #3b82f6); }
.badge.top { background: linear-gradient(135deg, #a855f7, #6366f1); }

.fav-btn {
  position: absolute; top: 7px; right: 7px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(10, 10, 20, .6);
  backdrop-filter: blur(6px);
  color: #d8d8f0;
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(.8);
  transition: .16s;
}
.card:hover .fav-btn, .fav-btn.on { opacity: 1; transform: scale(1); }
.fav-btn:hover { background: rgba(236, 72, 153, .85); }
.fav-btn.on { color: #ff4d8d; }
.fav-btn svg { width: 16px; height: 16px; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 46px 20px;
  text-align: center;
  color: var(--muted);
}
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* ==========================================================================
   Player page
   ========================================================================== */

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

.stage-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stage-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.stage-bar .title { font-weight: 700; font-size: 15px; }
.stage-bar .dot { color: var(--line); }
.stage-bar .cat-lbl { font-size: 13px; color: var(--muted); }
.stage-bar .spacer { flex: 1; }
.stage-bar .btn { height: 34px; padding: 0 12px; font-size: 13px; }
.stage-bar .btn.icon-only { width: 34px; }

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #05050c;
  max-height: calc(100vh - var(--header-h) - 130px);
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage:fullscreen { aspect-ratio: auto; max-height: none; }

.about {
  margin-top: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.about h2 { margin: 0 0 10px; font-size: 19px; }
.about p { margin: 0 0 16px; color: #c1c1dc; line-height: 1.65; font-size: 14.5px; }
.about h3 { margin: 18px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.keys { display: flex; flex-wrap: wrap; gap: 8px; }
.keys .k {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 12px; font-size: 13.5px; color: #cfcfe8;
}
.keys .k b { font: 700 12px/1 ui-monospace, monospace; background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 4px 7px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-row a { font-size: 12.5px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.tag-row a:hover { color: var(--text); border-color: #3d3d66; }

.rail-title {
  font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin: 2px 0 12px;
}
.rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.stat-strip {
  display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}
.stat {
  flex: 1 1 90px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.stat b { display: block; font-size: 20px; letter-spacing: -.5px; }
.stat span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line);
  background: rgba(8, 8, 16, .6);
  padding: 30px 20px;
  color: var(--muted);
  font-size: 13.5px;
}
.footer-in { max-width: 1560px; margin: 0 auto; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-in .spacer { flex: 1; }
.footer a:hover { color: var(--text); }

/* Toast ------------------------------------------------------------------ */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translate(-50%, 16px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: .22s;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Live / backend features
   ========================================================================== */

.badge.live {
  background: linear-gradient(135deg, #ef4444, #f97316);
  display: inline-flex; align-items: center; gap: 5px;
}
.badge.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff;
  animation: blip 1.4s infinite;
}
@keyframes blip { 50% { opacity: .3 } }

.online-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 13.5px; font-weight: 700;
  white-space: nowrap;
}
.online-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; animation: blip 1.4s infinite;
}
.online-pill.off .dot { background: #6b7280; animation: none; }
.online-pill b { color: var(--ok); }

.announce {
  background: linear-gradient(90deg, rgba(139, 92, 246, .25), rgba(236, 72, 153, .18));
  border-bottom: 1px solid var(--line);
  padding: 11px 20px;
  font-size: 14px;
  text-align: center;
}
.announce b { color: var(--warn); }

/* Live rail --------------------------------------------------------------- */
.live-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.live-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #3a2a4f;
  min-height: 180px;
  display: flex; align-items: flex-end;
  transition: transform .16s, border-color .16s;
}
.live-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.live-card .art { position: absolute; inset: 0; }
.live-card .art svg { width: 100%; height: 100%; }
.live-card .veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 6, 14, .95), transparent 70%); }
.live-card .copy { position: relative; padding: 16px; width: 100%; }
.live-card h3 { margin: 0 0 4px; font-size: 18px; }
.live-card .row2 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.live-count {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239, 68, 68, .18); color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, .35);
  padding: 3px 9px; border-radius: 999px; font-weight: 700;
}
.live-count i { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; animation: blip 1.4s infinite; }

/* Chat widget -------------------------------------------------------------- */
.chat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 18px;
}
.chat-card h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.chat-log {
  height: 180px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; line-height: 1.45;
  margin-bottom: 10px;
}
.chat-log .msg b { font-weight: 700; }
.chat-log .sys { color: var(--muted); font-style: italic; font-size: 12.5px; }
.chat-card input {
  width: 100%; height: 36px; border-radius: 9px; padding: 0 11px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 13px; outline: none;
}
.chat-card input:focus { border-color: var(--accent); }
.chat-card .off-note { font-size: 12.5px; color: var(--muted); }

/* Auth --------------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(4, 4, 10, .72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal .sheet {
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow);
  animation: rise2 .2s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes rise2 { from { transform: translateY(14px) scale(.97); opacity: 0 } }
.modal h2 { margin: 0 0 6px; font-size: 22px; }
.modal p.sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: 12px; margin-bottom: 18px; }
.tabs button {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  padding: 9px; border-radius: 9px; font: 600 14px inherit; cursor: pointer;
}
.tabs button.on { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input {
  width: 100%; height: 44px; border-radius: 11px; padding: 0 13px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 15px; outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139, 92, 246, .14); }
.form-err { color: #fca5a5; font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.modal .actions { display: flex; gap: 10px; }
.modal .actions .btn { flex: 1; justify-content: center; }
.guest-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #fff;
}

/* Leaderboard -------------------------------------------------------------- */
.board-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
.board-card h3 {
  margin: 0 0 12px; font-size: 12px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: 9px; font-size: 14px;
}
.lb-row + .lb-row { border-top: 1px solid var(--line); }
.lb-row .pos {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--bg-soft); display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: var(--muted);
}
.lb-row:nth-child(1) .pos { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #3b2a05; }
.lb-row:nth-child(2) .pos { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #1e293b; }
.lb-row:nth-child(3) .pos { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }
.lb-row .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .val { font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-row.you { background: rgba(139, 92, 246, .14); }
.lb-empty { color: var(--muted); font-size: 13.5px; padding: 6px; }

/* ==========================================================================
   Ad slots
   ========================================================================== */

[data-ad] {
  margin: 0 0 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  overflow: hidden;
}
[data-ad][hidden] { display: none; }
[data-ad].ad-filled { min-height: 90px; }
[data-ad] iframe, [data-ad] ins, [data-ad] img { max-width: 100%; }

/* A quiet label keeps the placement honest and is required by several
   networks' policies. */
[data-ad].ad-filled::before {
  content: 'Advertisement';
  position: absolute;
  transform: translateY(-16px);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #5b5b7a;
  pointer-events: none;
}
[data-ad].ad-filled { position: relative; margin-top: 20px; }

.side-ad { margin-top: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .player-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .hero-copy h1 { font-size: 27px; }
}

@media (max-width: 860px) {
  .burger { display: grid; place-items: center; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 16px 14px 50px; }
  .sidebar {
    position: fixed;
    top: var(--header-h); left: 0; bottom: 0;
    width: 262px;
    background: var(--bg-soft);
    border-right: 1px solid var(--line);
    padding: 18px 14px;
    max-height: none;
    transform: translateX(-104%);
    transition: transform .22s ease;
    z-index: 70;
  }
  body.nav-open .sidebar { transform: none; }
  .scrim {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: rgba(4, 4, 10, .6);
    opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 65;
  }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .top-actions .label { display: none; }
  .btn { padding: 0 12px; }
  .stage { aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .brand .name { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 11px; }
  .hero-copy { padding: 18px; }
  .hero-copy h1 { font-size: 23px; }
  .hero-main { min-height: 230px; }
  .search kbd { display: none; }
  .stage-bar .btn .label { display: none; }
  .stage-bar .btn { padding: 0 10px; }
}
