/* ============================================================
   Cappit front page v2 — layered on style.css, scoped to .lobbyV2 and
   the outer frame while the lobby is showing. Design tokens:
     ground  = the field grey (the game's own floor), not navy
     accents = team red / team blue ONLY
     display = Oxanium (the HUD/academy face), body = Inter
   No glass borders, no gradients-as-decoration, no pills, no emoji.
   ============================================================ */
:root {
  /* dark ground (owner preference; on ultrawide the light grey read as a
     grey band beside the hero) — near-black with a hint of the navy the
     game's own field void uses; team red/blue remain the only accents */
  --v2-ground: #0d1016;
  --v2-panel: #161b24;
  --v2-ink: #f2f4f8;
  --v2-ink-2: #c3c9d4;
  --v2-muted: #8891a0;
  --v2-line: #262d3a;
  --v2-blue: #2f7bff;
  --v2-blue-deep: #1c5fb8;
  --v2-red: #ef4444;
  --v2-red-deep: #c22f2f;
}

/* --- page frame: flat, light, no drop-shadow card --- */
body:has(.lobbyV2:not([hidden])) {
  background: var(--v2-ground);
  place-items: start center; /* top-anchored, not vertically centered — a landing page starts at the top */
  padding: 0 0 40px;
}
body:has(.lobbyV2:not([hidden])) .frame {
  width: 100%;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: var(--v2-ground);
}
/* content sections center at a comfortable measure; the hero (below) is
   full-bleed regardless of viewport width — object-fit: cover crops the
   video to fill, it never stretches/warps it */
.lobbyV2 .v2section, .lobbyV2 .v2footer { max-width: 1120px; margin-left: auto; margin-right: auto; }
body:has(.lobbyV2:not([hidden])) .topbar { max-width: none; }
body:has(.lobbyV2:not([hidden])) .topbar > * { }
body:has(.lobbyV2:not([hidden])) .topbar {
  background: rgba(13,16,22,0.92);
  border-bottom: 1px solid var(--v2-line);
  padding: 10px 22px;
}
.v2brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.v2brandText { font-family: Oxanium, Inter, sans-serif; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.06em; }
body:has(.lobbyV2:not([hidden])) .accountBar .secondary { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); }

.lobbyV2 { padding: 0 0 28px; }

/* --- HERO: full-bleed video, wordmark + PLAY centered over it (the
   whole hero IS the game — nothing else competes with it) --- */
.v2hero {
  position: relative; overflow: hidden;
  height: min(72vh, 640px); min-height: 440px;
  background: #0d1016;
  color: #fff;
  display: grid; place-items: center;
}
.v2heroVideos { position: absolute; inset: 0; }
.v2heroVideo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 900ms ease;
}
.v2heroVideo.is-active { opacity: 1; }
.v2heroShade {
  position: absolute; inset: 0;
  /* vignette + a soft center dim so white type reads over any clip */
  background:
    radial-gradient(ellipse at center, rgba(13,16,22,0.55) 0%, rgba(13,16,22,0.25) 45%, rgba(13,16,22,0.55) 100%),
    linear-gradient(180deg, rgba(13,16,22,0.55) 0%, rgba(13,16,22,0) 25%, rgba(13,16,22,0) 75%, rgba(13,16,22,0.6) 100%);
}
.v2heroInner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 24px; gap: 10px;
}
.v2wordmark { display: flex; align-items: center; gap: 16px; }
.v2mark { width: 64px; height: 64px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6)); }
.v2wordText {
  font-family: Oxanium, Inter, sans-serif; font-weight: 800; font-size: 4.6rem; line-height: 1;
  letter-spacing: 0.05em; text-shadow: 0 3px 0 rgba(0,0,0,0.55), 0 8px 28px rgba(0,0,0,0.6);
}
.v2tag { margin: 0 0 8px; font-size: 1.05rem; color: rgba(255,255,255,0.9); text-shadow: 0 2px 8px rgba(0,0,0,0.7); letter-spacing: 0.02em; }
.v2play {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px 56px; border: 0; border-radius: 8px;
  background: var(--v2-blue); color: #fff;
  cursor: pointer; box-shadow: 0 6px 0 var(--v2-blue-deep), 0 14px 40px rgba(0,0,0,0.5);
  transition: transform 80ms, box-shadow 80ms;
}
.v2play:hover { transform: translateY(-1px); box-shadow: 0 7px 0 var(--v2-blue-deep), 0 16px 44px rgba(0,0,0,0.5); }
.v2play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--v2-blue-deep), 0 8px 24px rgba(0,0,0,0.5); }
.v2playMain { font-family: Oxanium, Inter, sans-serif; font-weight: 800; font-size: 1.7rem; letter-spacing: 0.1em; }
.v2playSub { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; opacity: 0.95; }
.v2playSub .liveDot { background: #9cf0b8; }
.v2textBtn {
  background: none; border: 0; padding: 4px 0 0; color: rgba(255,255,255,0.85);
  font: inherit; font-size: 0.95rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}
.v2textBtn:hover { color: #fff; }
.v2heroCtl {
  position: absolute; right: 16px; bottom: 14px; z-index: 2;
  display: flex; gap: 4px; padding: 4px; border-radius: 8px;
  background: rgba(13,16,22,0.7); border: 1px solid rgba(255,255,255,0.15);
}
.v2heroCtl button {
  width: 34px; height: 30px; border: 0; border-radius: 6px; background: transparent;
  color: rgba(255,255,255,0.85); font-size: 0.75rem; cursor: pointer;
}
.v2heroCtl button:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* --- sections --- */
.v2section { padding: 26px 40px 0; }
.v2sectionHead { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.v2sectionHead h2 {
  margin: 0; font-family: Oxanium, Inter, sans-serif; font-weight: 800; font-size: 1.35rem; letter-spacing: 0.03em;
  color: var(--v2-ink); display: inline-flex; align-items: center; gap: 8px;
}
.v2muted { color: var(--v2-muted); font-size: 0.9rem; }
.v2sectionHead .liveDot::before { display: none; }
.v2sectionHead .liveDot { background: var(--v2-red); }

/* --- live list: dense flat rows on the panel color --- */
.v2roomList { gap: 0; border: 1px solid var(--v2-line); border-radius: 6px; overflow: hidden; background: var(--v2-panel); }
.v2roomList .roomRow { border: 0; border-bottom: 1px solid var(--v2-line); border-radius: 0; background: transparent; color: var(--v2-ink); padding: 10px 14px; }
.v2roomList .roomRow:last-child { border-bottom: 0; }
.v2roomList .roomRow:hover { background: #1c2230; }
.v2roomList .roomRow.live:hover { background: transparent; }
.v2roomList .roomMeta { color: var(--v2-muted); }
.v2roomList .roomListEmpty { color: var(--v2-muted); padding: 14px; }
.v2roomList .liveBadge { background: var(--v2-red); border-color: var(--v2-red); color: #fff; }
.v2roomList .roomBtn { background: #232a38; border-color: #313a4a; color: var(--v2-ink); }
.v2roomList .roomBtn.primaryish { background: var(--v2-blue); border-color: var(--v2-blue); color: #fff; }

/* --- modes: a list --- */
.v2modes { display: flex; flex-direction: column; border-top: 1px solid var(--v2-line); }
.v2mode { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--v2-line); align-items: start; }
.v2modeMain { padding: 22px 0; }
.v2modeIcon { width: 36px; height: 36px; color: var(--v2-ink); margin-top: 2px; }
.v2modeMain .v2modeIcon { color: var(--v2-blue); }
.v2modeBody h3 { margin: 0 0 4px; font-family: Oxanium, Inter, sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--v2-ink); }
.v2modeMain .v2modeBody h3 { font-size: 1.6rem; }
.v2modeBody p { margin: 0 0 10px; color: var(--v2-ink-2); max-width: 60ch; }
.v2actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.v2act {
  padding: 8px 14px; border-radius: 6px; border: 1px solid #313a4a;
  background: #1a202b; color: var(--v2-ink); font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer;
}
.v2act:hover { border-color: #4a5568; background: #202836; }
.v2actPrimary { background: #f2f4f8; border-color: #f2f4f8; color: #0d1016; }
.v2actPrimary:hover { background: #fff; }
.v2modeMain .v2actPrimary { background: var(--v2-blue); border-color: var(--v2-blue); }
.v2modeMain .v2actPrimary:hover { background: var(--v2-blue-deep); }
.v2soon { color: var(--v2-muted); font-size: 0.9rem; margin-left: 4px; }
.v2act .badge { margin-left: 4px; }
.v2custom { margin-top: 12px; padding: 16px; background: var(--v2-panel); border: 1px solid #313a4a; border-radius: 6px; }
.v2forms { color: var(--v2-ink); }
.v2forms form { border-color: #313a4a; background: #1a202b; }
.v2forms h3 { color: var(--v2-ink); }
.v2forms input, .v2forms select { color: var(--v2-ink); background: #0d1016; border-color: #313a4a; }
.v2forms label { color: var(--v2-ink-2); }

.v2footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 26px 40px 0; padding-top: 14px; border-top: 1px solid var(--v2-line);
  color: var(--v2-muted); font-size: 0.88rem;
}
.v2footer a { color: var(--v2-ink-2); }

/* --- mobile --- */
@media (max-width: 760px) {
  .v2hero { height: 78vh; min-height: 420px; }
  .v2wordText { font-size: 2.8rem; }
  .v2mark { width: 44px; height: 44px; }
  .v2play { padding: 14px 40px; }
  .v2section { padding: 20px 16px 0; }
  .v2mode { grid-template-columns: 32px 1fr; gap: 12px; }
  .v2modeIcon { width: 28px; height: 28px; }
  .v2footer { margin: 20px 16px 0; }
  .v2sectionHead { flex-direction: column; gap: 2px; align-items: flex-start; }
  .v2sectionHead h2 { white-space: nowrap; }
}
