:root {
  /* BGMI battleground palette — desert dust, gunmetal & signature orange */
  --bg: #0b0c08;
  --bg-soft: #14150f;
  --card: #191a12;
  --border: #33351f;
  --text: #f0ead8;
  --muted: #a8a48c;
  --accent: #ff9b21;
  --accent-2: #ffd54a;
  --army: #6b7a2f;
  --whatsapp: #25d366;
  --youtube: #ff0033;
  --instagram: #e1306c;
  --danger: #ff4d3d;
  --radius: 14px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Rajdhani", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Backdrop ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(120px); opacity: 0.4; pointer-events: none;
}
.bg-glow--1 { width: 480px; height: 480px; background: var(--accent-2); top: -140px; left: -120px; }
.bg-glow--2 { width: 420px; height: 420px; background: var(--accent); bottom: -160px; right: -120px; opacity: 0.28; }

/* Airdrop crate drifting across the battleground */
.bg-drop {
  position: fixed; z-index: -1; right: 6vw; top: -80px;
  font-size: 2rem; opacity: 0.18; pointer-events: none;
  animation: drop 14s linear infinite;
}
@keyframes drop {
  0% { transform: translateY(-10vh) rotate(-8deg); opacity: 0; }
  12% { opacity: 0.22; }
  88% { opacity: 0.22; }
  100% { transform: translateY(110vh) rotate(8deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-drop { animation: none; display: none; }
}

/* ---------- Nav ---------- */
.nav {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 20px 24px;
}
.nav__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.nav__icon {
  width: 48px; height: 48px; border-radius: 50%;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: bold;
  box-shadow: 0 0 20px rgba(255,155,33,0.3);
  border: 2px solid var(--accent);
}
.nav__name {
  font-family: "Orbitron", sans-serif; font-weight: 800;
  letter-spacing: 1px; font-size: 1.05rem;
}
.nav__tag {
  display: inline-block; margin-left: 8px; vertical-align: middle;
  font-family: "Orbitron", sans-serif; font-size: 0.6rem; font-weight: 800;
  letter-spacing: 1.5px; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 4px; padding: 2px 6px;
}
.nav__status {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; background: rgba(255,255,255,0.02);
}
.nav__status .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--whatsapp);
  box-shadow: 0 0 10px var(--whatsapp); animation: pulse 1.8s infinite;
}
.nav__status.is-closed .dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 60px 24px 40px; text-align: center;
}
.hero__eyebrow {
  font-family: "Orbitron", sans-serif; font-size: 0.72rem; letter-spacing: 3px;
  color: var(--accent); margin-bottom: 18px;
}
.hero__title {
  font-family: "Orbitron", sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 3.6rem); line-height: 1.1; letter-spacing: 1px;
  text-shadow: 0 0 40px rgba(255,155,33,0.15);
}
.hero__sub {
  max-width: 620px; margin: 22px auto 0; color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
}
.hero__sub strong { color: var(--text); }

/* ---------- Slots meter ---------- */
.slots { max-width: 520px; margin: 34px auto 0; }
.slots__meter {
  height: 14px; border-radius: 999px; background: var(--bg-soft);
  border: 1px solid var(--border); overflow: hidden;
}
.slots__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px; transition: width 0.6s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 16px rgba(255,155,33,0.5);
}
.slots__labels {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 0.92rem; color: var(--muted);
}
.slots__labels strong { color: var(--text); font-size: 1.05rem; }
.slots__left {
  font-weight: 700; color: var(--accent);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px;
}
.slots__left.is-low { color: var(--danger); }

/* Two calls to action on one line, wrapping to a stack when the row runs out of room.
   `.btn--whatsapp` is full-width everywhere else it is used (modal, pay panel), so the
   width has to be handed back here or it would push the register button onto its own row. */
.hero__actions {
  margin-top: 34px; display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center; gap: 14px;
}
.hero__actions .btn--whatsapp { width: auto; }

/* ---------- Buttons ---------- */
.btn {
  font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 1.05rem;
  border: none; border-radius: 10px; padding: 14px 30px; cursor: pointer;
  text-decoration: none; display: inline-block; transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
}
.btn--primary {
  color: #14150f; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 30px rgba(255,155,33,0.25);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(255,155,33,0.4); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--whatsapp {
  width: 100%; text-align: center; color: #05130a;
  background: var(--whatsapp); box-shadow: 0 8px 30px rgba(37,211,102,0.3);
}
.btn--whatsapp:hover { transform: translateY(-2px); }
.btn--ghost {
  color: var(--text); background: transparent; border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); }
/* `.btn` sets display:inline-block, and an author rule beats the browser's own
   [hidden] rule at equal specificity — so a hidden button would still be on screen
   unless this says otherwise. That matters here: the community link is withheld
   until an entry fee is verified, and a "hidden" button nobody hid is a leak. */
.btn[hidden] { display: none; }
/* The invite sits between the payment status and the pay steps, so it needs room of
   its own rather than butting up against either. */
.pay__wa { margin: 16px 0 4px; }

/* ---------- Cards ---------- */
.cards {
  max-width: var(--maxw); margin: 20px auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card__icon { font-size: 1.8rem; margin-bottom: 12px; }
.card h3 { font-family: "Orbitron", sans-serif; font-size: 1rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Live room credentials ---------- */
.room { max-width: var(--maxw); margin: 34px auto 0; padding: 0 24px; }
.room[hidden] { display: none; }
.room__card {
  background: linear-gradient(180deg, rgba(37,211,102,0.08), var(--card));
  border: 1px solid var(--whatsapp); border-radius: var(--radius);
  padding: 22px 22px 18px; box-shadow: 0 12px 50px rgba(37,211,102,0.14);
}
.room__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.room__badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Orbitron", sans-serif; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--whatsapp);
}
.room__badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--whatsapp);
  box-shadow: 0 0 10px var(--whatsapp); animation: pulse 1.8s infinite;
}
.room__timer {
  font-family: "Orbitron", sans-serif; font-weight: 800; font-size: 1.1rem;
  color: var(--accent); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 14px; background: rgba(255,155,33,0.08);
}
/* Under a minute left — make it impossible to miss. */
.room__timer.is-ending { color: var(--danger); border-color: var(--danger); background: rgba(255,77,61,0.1); }
.room__creds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.room__row {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.room__label {
  display: block; font-size: 0.72rem; color: var(--muted);
  letter-spacing: 1px; text-transform: uppercase;
}
.room__value {
  display: block; margin-top: 4px; word-break: break-all;
  font-family: "Orbitron", sans-serif; font-weight: 800;
  font-size: clamp(1.1rem, 4vw, 1.5rem); color: var(--accent);
}
.room__note { color: var(--muted); font-size: 0.82rem; margin-top: 14px; text-align: center; }
.room-form__clear { width: 100%; margin-top: 12px; }

/* Locked state — shown to anyone who hasn't proved they registered */
.room__gate[hidden], #roomUnlocked[hidden], .room__timer[hidden] { display: none; }
.room__gate-text { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.room__gate-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.room__gate-btn { width: 100%; margin-top: 4px; }
.room__team {
  text-align: center; font-weight: 700; color: var(--whatsapp);
  margin-bottom: 14px; font-size: 0.95rem;
}
.room__team:empty { display: none; }
.room__lock {
  display: block; margin: 12px auto 0; background: none; border: none;
  color: var(--muted); font-family: inherit; font-size: 0.85rem;
  cursor: pointer; text-decoration: underline;
}
.room__lock:hover { color: var(--accent); }

/* ---------- Entry fee ---------- */
.pay { max-width: var(--maxw); margin: 34px auto 0; padding: 0 24px; }
.pay[hidden] { display: none; }
.pay__card {
  background: linear-gradient(180deg, rgba(255,155,33,0.08), var(--card));
  border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 22px 22px 18px; box-shadow: 0 12px 50px rgba(255,155,33,0.12);
}
.pay__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.pay__badge {
  font-family: "Orbitron", sans-serif; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent);
}
.pay__amount {
  font-family: "Orbitron", sans-serif; font-weight: 800; font-size: 1.3rem;
  color: var(--accent-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 16px; background: rgba(255,213,74,0.08);
}
.pay__gate[hidden], #payPanel[hidden], #payDue[hidden], .pay__hold[hidden] { display: none; }
.pay__gate-text { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.pay__gate-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.pay__gate-btn { width: 100%; margin-top: 4px; }
.pay__team {
  text-align: center; font-weight: 700; color: var(--accent-2);
  margin-bottom: 12px; font-size: 0.95rem;
}
.pay__team:empty { display: none; }
.pay__status {
  text-align: center; font-weight: 700; font-size: 0.95rem;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; background: var(--bg-soft);
}
.pay__status.is-pending { color: var(--danger); border-color: var(--danger); background: rgba(255,77,61,0.08); }
.pay__status.is-submitted { color: var(--accent-2); border-color: var(--accent-2); background: rgba(255,213,74,0.08); }
.pay__status.is-verified { color: var(--whatsapp); border-color: var(--whatsapp); background: rgba(37,211,102,0.08); }
.pay__hold { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 10px; }
/* Scan or copy, pay, hand back the UTR — the card is numbered so the order is obvious
   without anyone reading a paragraph first. */
.pay__step {
  font-family: "Orbitron", sans-serif; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.5px; color: var(--accent); text-align: center;
  margin: 22px 0 12px;
}
.pay__ids {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-soft); overflow: hidden;
}
.pay__id-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
}
.pay__id-row + .pay__id-row { border-top: 1px solid var(--border); }
.pay__id-row[hidden] { display: none; }
.pay__id-label { color: var(--muted); font-size: 0.78rem; flex: 0 0 96px; }
.pay__id-value {
  color: var(--fg); font-weight: 700; font-size: 0.92rem;
  flex: 1 1 auto; word-break: break-all;
}
.pay__copy {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); font-family: inherit; font-size: 0.78rem;
  padding: 3px 10px; cursor: pointer; flex: 0 0 auto;
}
.pay__copy:hover { color: var(--accent); border-color: var(--accent); }
/* A scanned QR carries its own merchant signature, so this path works even where an
   intent link is refused. White plate because scanners struggle on a dark background. */
.pay__qr { margin: 0; text-align: center; }
.pay__qr[hidden] { display: none; }
.pay__qr .pay__step { margin-top: 4px; }
.pay__qr-img {
  width: 100%; max-width: 240px; aspect-ratio: 1; object-fit: contain;
  background: #fff; border-radius: 12px; padding: 10px; display: block; margin: 0 auto;
}
.pay__qr-note { color: var(--muted); font-size: 0.78rem; line-height: 1.5; margin-top: 10px; }
.pay__qr-note strong { color: var(--accent-2); }
.pay__utr { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 18px; }
.pay__utr .btn { width: 100%; }
.modal__pay {
  color: var(--danger); font-size: 0.86rem; line-height: 1.55; text-align: left;
  border: 1px solid var(--danger); border-radius: 12px;
  background: rgba(255,77,61,0.08); padding: 12px 14px; margin-top: 12px;
}
.modal__pay[hidden] { display: none; }

/* The page scrolls here on its own after registration — a beat of glow so the team
   sees where they landed. */
.pay--flash .pay__card { animation: pay-flash 1.6s ease-out 1; }
@keyframes pay-flash {
  0%, 100% { box-shadow: 0 12px 50px rgba(255,155,33,0.12); }
  30% { box-shadow: 0 0 0 4px rgba(255,155,33,0.35), 0 12px 60px rgba(255,155,33,0.4); }
}
@media (prefers-reduced-motion: reduce) {
  .pay--flash .pay__card { animation: none; }
}

/* Admin registration rows */
.reg-badge {
  display: inline-block; margin-left: 8px; font-size: 0.64rem; font-weight: 800;
  letter-spacing: 1px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid currentColor;
}
.reg-badge.is-pending { color: var(--danger); }
.reg-badge.is-submitted { color: var(--accent-2); }
.reg-badge.is-verified { color: var(--whatsapp); }
.reg-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.reg-act {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  color: var(--fg); font-family: inherit; font-size: 0.78rem;
  padding: 6px 12px; cursor: pointer;
}
.reg-act:hover { border-color: var(--accent); }
.reg-act:disabled { opacity: 0.5; cursor: default; }
.reg-act--ok { color: var(--whatsapp); }
.reg-act--ok:hover { border-color: var(--whatsapp); }
.reg-act--danger { color: var(--danger); }
.reg-act--danger:hover { border-color: var(--danger); }

/* Full-width field inside the two-column admin form grid */
.field--full { grid-column: 1 / -1; }
/* Admin-only guidance under an input — long enough to explain a UPI failure mode. */
.field__help {
  color: var(--muted); font-size: 0.75rem; line-height: 1.5; margin-top: 6px;
}
.field__help strong { color: var(--accent-2); }
.field__help code {
  font-family: inherit; color: var(--fg);
  background: var(--bg-soft); border-radius: 4px; padding: 0 4px;
}
.field label em { color: var(--muted); font-style: normal; font-weight: 400; }

/* ---------- Match details ---------- */
.details {
  max-width: var(--maxw); margin: 50px auto 10px; padding: 0 24px;
}
.details[hidden] { display: none; }
.details__head { text-align: center; margin-bottom: 26px; }
.details__head h2 {
  font-family: "Orbitron", sans-serif; font-size: clamp(1.3rem, 4vw, 1.8rem);
}
.details__head p { color: var(--muted); margin-top: 6px; }

.detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.detail {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; transition: border-color .2s ease;
}
.detail:hover { border-color: var(--accent); }
.detail__icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; font-size: 1.2rem;
  background: rgba(255,155,33,0.1); border: 1px solid var(--border);
}
.detail__label {
  display: block; font-size: 0.72rem; color: var(--muted);
  letter-spacing: 1px; text-transform: uppercase;
}
.detail__value { display: block; font-weight: 700; font-size: 1rem; margin-top: 2px; }

.prizes {
  margin-top: 16px; background: var(--card);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: 22px 20px;
}
.prizes[hidden] { display: none; }
.prizes__title {
  font-family: "Orbitron", sans-serif; font-size: 0.95rem;
  text-align: center; margin-bottom: 18px;
}
/* auto-fit, not a fixed count: an admin may configure two prizes or four, and a
   hard-coded three columns would strand the fourth card alone on its own row. */
.prizes__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.prize {
  text-align: center; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 12px;
}
.prize__icon { font-size: 1.5rem; }
.prize__label { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 6px; }
.prize__value {
  display: block; font-family: "Orbitron", sans-serif; font-weight: 800;
  font-size: 1.15rem; color: var(--accent); margin-top: 4px;
}

.rules {
  margin-top: 16px; background: rgba(255,77,61,0.06);
  border: 1px dashed var(--danger); border-radius: var(--radius); padding: 20px 22px;
}
.rules[hidden] { display: none; }
.rules__title { font-family: "Orbitron", sans-serif; font-size: 0.95rem; margin-bottom: 12px; }
.rules__list { list-style: none; display: grid; gap: 10px; }
.rules__list li {
  position: relative; padding-left: 22px; color: var(--muted); font-size: 0.95rem;
}
.rules__list li::before {
  content: "▸"; position: absolute; left: 4px; color: var(--danger); font-weight: 700;
}

/* ---------- Match details editor (admin) ---------- */
.modal__card--wide { max-width: 560px; text-align: left; }
.modal__card--wide h2 { text-align: center; }
.modal__sub { color: var(--muted); font-size: 0.85rem; text-align: center; margin-top: 6px; }
.details-form { margin-top: 22px; }
.details-form__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.details-form__hint { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 6px; }
.details-form__submit { width: 100%; margin-top: 8px; }

/* ---------- Teamboard ---------- */
/* The public roster. Sixteen seats are always drawn, so an empty board still reads
   as "this is the match", and a filling one shows exactly how much room is left. */
.board { max-width: 900px; margin: 60px auto; padding: 0 24px; }
.board__head { text-align: center; margin-bottom: 28px; }
.board__head h2 {
  font-family: "Orbitron", sans-serif; font-size: clamp(1.4rem, 4vw, 2rem);
}
.board__head p { color: var(--muted); margin-top: 6px; font-size: 0.9rem; }

.board__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px;
}
.board__slot {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; min-width: 0;
}
.board__num {
  font-family: "Orbitron", sans-serif; font-size: 0.8rem; font-weight: 700;
  color: var(--muted); flex: 0 0 auto;
}
.board__name {
  color: var(--muted); font-size: 0.92rem; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board__slot.is-taken {
  border-color: var(--accent); background: rgba(255,155,33,0.07);
}
.board__slot.is-taken .board__num { color: var(--accent); }
.board__slot.is-taken .board__name { color: var(--fg); font-weight: 700; }
.board__slot.is-holding { border-style: dashed; }
.board__slot.is-holding .board__name { color: var(--accent-2); font-style: italic; }

/* ---------- Register ---------- */
.register {
  max-width: 560px; margin: 60px auto; padding: 0 24px; scroll-margin-top: 20px;
}
.register__head { text-align: center; margin-bottom: 28px; }
.register__head h2 {
  font-family: "Orbitron", sans-serif; font-size: clamp(1.4rem, 4vw, 2rem);
}
.register__head p { color: var(--muted); margin-top: 6px; }

.form {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem;
}
.req { color: var(--danger); }
.field input, .field textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 14px; color: var(--text);
  font-family: inherit; font-size: 1rem; transition: border-color .15s ease, box-shadow .15s ease;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,155,33,0.15);
}
.field input::placeholder, .field textarea::placeholder { color: #6b6a52; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field__error { display: block; color: var(--danger); font-size: 0.82rem; margin-top: 6px; min-height: 0; }

/* ---------- Squad members (optional) ---------- */
.squad {
  border: 1px dashed var(--border); border-radius: 12px;
  padding: 18px 16px 4px; margin: 0 0 18px;
  background: rgba(255,155,33,0.03);
}
.squad__legend {
  padding: 0 8px; font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; gap: 8px;
}
.squad__optional {
  font-family: "Orbitron", sans-serif; font-size: 0.58rem; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; color: var(--army);
  border: 1px solid var(--army); border-radius: 4px; padding: 2px 6px;
}
.squad__hint { color: var(--muted); font-size: 0.82rem; margin: 2px 0 16px; }

/* ---------- Form-level alert ---------- */
.form__alert {
  border: 1px solid var(--danger); border-radius: 10px;
  background: rgba(255,77,61,0.1); color: var(--danger);
  padding: 12px 14px; font-size: 0.9rem; font-weight: 600;
  margin-bottom: 14px;
}
.form__alert[hidden] { display: none; }

.form__submit { width: 100%; margin-top: 6px; }
.form__note { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 14px; }
.form__fee {
  text-align: center; font-size: 0.86rem; font-weight: 700; color: var(--accent-2);
  border: 1px solid var(--accent); border-radius: 12px;
  background: rgba(255,155,33,0.08); padding: 11px 14px; margin-bottom: 16px;
}
.form__fee[hidden] { display: none; }

/* ---------- Closed ---------- */
.closed {
  text-align: center; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px 28px;
}
.closed__icon { font-size: 2.6rem; margin-bottom: 14px; }
.closed h2 { font-family: "Orbitron", sans-serif; margin-bottom: 8px; }
.closed p { color: var(--muted); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(3,3,8,0.8); backdrop-filter: blur(6px); }
.modal__card {
  position: relative; width: 100%; max-width: 420px; text-align: center;
  background: linear-gradient(180deg, #22231a, var(--card));
  border: 1px solid var(--accent); border-radius: 18px; padding: 34px 28px;
  box-shadow: 0 20px 80px rgba(255,155,33,0.2); animation: pop .35s cubic-bezier(.2,.9,.3,1.2);
  /* The card sits in a fixed, centred grid, so anything taller than the screen
     overflows past both edges and cannot be reached — the Save button included.
     Cap it to the viewport and let the card scroll instead of the page.
     dvh repeats the vh value for browsers that have it: on a phone, vh measures the
     screen with the address bar hidden, which is exactly the strip the last row
     would disappear behind. overscroll-behavior stops a scroll that reaches the end
     of the form from carrying on into the page underneath. */
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__badge {
  display: inline-block; font-weight: 700; font-size: 0.85rem; color: var(--whatsapp);
  border: 1px solid var(--whatsapp); border-radius: 999px; padding: 5px 14px; margin-bottom: 16px;
}
.modal__card h2 { font-family: "Orbitron", sans-serif; font-size: 1.5rem; }
.modal__team { color: var(--muted); margin-top: 6px; font-size: 1.05rem; font-weight: 600; }
.creds {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin: 22px 0;
}
.creds__row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.creds__label { color: var(--muted); font-size: 0.9rem; }
.creds__value {
  font-family: "Orbitron", sans-serif; font-weight: 600; letter-spacing: 1px;
  color: var(--accent); font-size: 1.05rem;
}
.modal__hint { color: var(--muted); font-size: 0.82rem; margin-top: 14px; }
.modal__close {
  margin-top: 16px; background: none; border: none; color: var(--muted);
  font-family: inherit; font-size: 0.95rem; cursor: pointer; text-decoration: underline;
}

/* ---------- Connect / Socials ---------- */
.connect {
  max-width: var(--maxw); margin: 20px auto 60px; padding: 0 24px; text-align: center;
}
.connect__head h2 {
  font-family: "Orbitron", sans-serif; font-size: clamp(1.3rem, 4vw, 1.8rem);
}
.connect__head p { color: var(--muted); margin-top: 6px; }

.socials {
  /* auto-fit rather than a fixed three: a hard-coded count strands the fourth card
     alone on a full-width row of its own. */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 16px; margin-top: 26px;
}
.connect__report-btn { display: block; margin: 22px auto 0; }
.social {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; text-decoration: none; color: var(--text);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.social:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: 0 10px 30px var(--brand-soft); }
.social:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.social__icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; color: var(--brand);
  background: var(--brand-soft); border: 1px solid var(--brand);
}
.social__icon svg { width: 22px; height: 22px; fill: currentColor; }
.social__label { display: block; font-size: 0.78rem; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.social__value { display: block; font-weight: 700; font-size: 1rem; }

.social--yt { --brand: var(--youtube); --brand-soft: rgba(255,0,51,0.12); }
.social--ig { --brand: var(--instagram); --brand-soft: rgba(225,48,108,0.12); }
.social--call { --brand: var(--whatsapp); --brand-soft: rgba(37,211,102,0.12); }
.social--community { --brand: var(--whatsapp); --brand-soft: rgba(37,211,102,0.12); }

/* ---------- Footer ---------- */
.footer { text-align: center; color: var(--muted); padding: 40px 24px; font-size: 0.88rem; }
.footer__links {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px 18px; margin-bottom: 14px;
}
.footer__links a {
  color: var(--muted); text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .2s ease;
}
.footer__links a svg { width: 16px; height: 16px; fill: currentColor; }
.footer__links a:hover { color: var(--accent); }
.footer__note { font-size: 0.8rem; opacity: 0.7; margin-top: 6px; }

/* ---------- Admin Panel ---------- */
.admin-panel { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.admin-panel[hidden] { display: none; }
.admin-backdrop { position: absolute; inset: 0; background: rgba(3,3,8,0.9); backdrop-filter: blur(6px); }
/* Wide enough for match rows and registration cards, and scrollable so the tallest
   section (the site-details form) can never push the Close button off-screen. */
.admin-card {
  position: relative; width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--danger); border-radius: 18px;
  padding: 30px 24px; box-shadow: 0 20px 80px rgba(255,77,61,0.3);
}
.admin-card h2 { font-family: "Orbitron", sans-serif; margin-bottom: 20px; color: var(--danger); text-align: center; }
.admin-btn {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; color: var(--text); font-family: inherit; font-weight: 600;
  cursor: pointer; transition: all .2s ease;
}
.admin-btn:hover { background: var(--bg-soft); border-color: var(--accent); }
.admin-btn--danger { border-color: var(--danger); color: var(--danger); }
.admin-btn--danger:hover { background: rgba(255,77,61,0.1); }
.admin-close { background: none; border: none; color: var(--muted); font-family: inherit;
  cursor: pointer; text-decoration: underline; width: 100%; text-align: center; margin-top: 16px; }

/* ---------- Admin accordion ---------- */
.admin-acc { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.admin-acc__item {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--bg-soft);
}
.admin-acc__head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border: none; border-radius: 0; text-align: left; font-size: 1rem;
  background: transparent;
}
.admin-acc__head:hover { background: rgba(255,155,33,0.06); }
.admin-acc__chev { color: var(--muted); transition: transform .2s ease; flex: 0 0 auto; }
.admin-acc__head.is-open { color: var(--accent); }
.admin-acc__head.is-open .admin-acc__chev { transform: rotate(180deg); color: var(--accent); }
.admin-acc__body {
  padding: 4px 16px 16px; border-top: 1px solid var(--border);
}
.admin-acc__body[hidden] { display: none; }
.admin-acc__hint { color: var(--muted); font-size: 0.85rem; margin: 10px 0 12px; }
/* Long lists scroll inside their section, so the other three headers stay in reach. */
.admin-acc__scroll { max-height: 340px; overflow-y: auto; }
.admin-acc__cta { width: 100%; margin-top: 12px; }
.admin-acc__status {
  border: 1px solid var(--whatsapp); border-radius: 10px;
  background: rgba(37,211,102,0.08); color: var(--whatsapp);
  padding: 11px 14px; font-size: 0.9rem; font-weight: 600; margin-top: 12px;
}
.admin-acc__status.is-error {
  border-color: var(--danger); background: rgba(255,77,61,0.1); color: var(--danger);
}
.admin-acc__status[hidden] { display: none; }

/* The match editor and room poster open while the admin panel (z-index 200) is up —
   without this they'd render underneath its backdrop. */
.modal--top { z-index: 300; }


/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
  /* One seat per row on a phone — two columns would clip most team names. */
  .board__grid { grid-template-columns: 1fr; }
  .socials { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .room__creds { grid-template-columns: 1fr; }
  .room__gate-fields { grid-template-columns: 1fr; }
  .pay__gate-fields { grid-template-columns: 1fr; }
  .pay { padding: 0 20px; }
  .pay__card { padding: 20px 18px 16px; }
  .prizes__row { grid-template-columns: 1fr; }
  .details-form__grid { grid-template-columns: 1fr; }
  /* Every field goes full-width on a phone, so the admin forms get long. Trim the
     card's own padding to buy back a couple of rows before scrolling starts. */
  .modal__card { padding: 24px 18px; }
  .nav { padding: 16px; }
  .nav__brand { gap: 10px; }
  .nav__icon { width: 40px; height: 40px; }
  .nav__icon svg { width: 22px; height: 22px; }
  .nav__status { font-size: 0.78rem; padding: 5px 11px; white-space: nowrap; }
  .hero { padding: 40px 20px 30px; }
  .form { padding: 22px 18px; }
}
@media (max-width: 420px) {
  .nav__name { font-size: 0.9rem; }
  .nav__tag { display: none; }
  .btn { width: 100%; text-align: center; }
  /* `.btn { width: 100% }` here loses to `.hero__actions .btn--whatsapp { width: auto }`
     — a media query adds no specificity — so the two hero buttons would end up different
     widths once they stack. Say it again at the specificity that wins. */
  .hero__actions { flex-direction: column; }
  .hero__actions .btn--whatsapp { width: 100%; }
}

/* ---------- Multiple matches ---------- */
/* One roster block per match on the public teamboard. */
.board__match { margin-bottom: 30px; }
.board__match:last-child { margin-bottom: 0; }
.board__match-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.board__match-title {
  font-family: "Orbitron", sans-serif; font-size: 0.95rem; letter-spacing: 0.5px;
  color: var(--accent-2); margin-bottom: 0;
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
}
.board__match-title::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.board__download {
  flex: 0 0 auto; border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--muted); border-radius: 999px; padding: 7px 14px;
  font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.board__download:hover { border-color: var(--accent); color: var(--accent-2); }
@media (max-width: 520px) {
  .board__match-head { flex-wrap: wrap; }
  .board__download { order: 1; }
}

/* The match picker on the registration form: one selectable card per open match. */
.match-choice { display: grid; gap: 10px; }
.match-opt {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s ease, background .15s ease;
}
.match-opt:hover { border-color: var(--accent); }
.match-opt input {
  flex: 0 0 auto; width: 18px; height: 18px; margin: 0;
  accent-color: var(--accent); cursor: pointer;
}
.match-opt__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.match-opt__name { font-weight: 700; font-size: 1rem; }
.match-opt__meta { color: var(--muted); font-size: 0.84rem; }
/* :has() is supported by every browser this page targets; older ones just miss the
   highlight, the checked radio itself still shows the pick. */
.match-opt:has(input:checked) {
  border-color: var(--accent); background: rgba(255,155,33,0.08);
}
.match-opt:has(input:checked) .match-opt__name { color: var(--accent); }

/* Which match a fresh slot belongs to, on the success modal. */
.modal__match { color: var(--accent-2); font-size: 0.92rem; margin: -6px 0 4px; }
.modal__match:empty { display: none; }

/* ---------- Combat pass ---------- */
:root {
  --bg: #080909;
  --bg-soft: #111412;
  --card: #151817;
  --border: #30382f;
  --accent: #ff4d2e;
  --accent-2: #ffc247;
  --army: #8fa83b;
  --radius: 8px;
}

body {
  background:
    linear-gradient(135deg, rgba(255, 77, 46, 0.06), transparent 30%),
    linear-gradient(315deg, rgba(143, 168, 59, 0.06), transparent 34%),
    var(--bg);
}

.bg-grid {
  opacity: 0.8;
  background-size: 34px 34px;
  background-image:
    linear-gradient(rgba(255, 194, 71, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 194, 71, 0.055) 1px, transparent 1px);
}

.nav {
  border-bottom: 1px solid rgba(255, 194, 71, 0.16);
  position: relative;
}
.nav::after {
  content: "LIVE // BATTLE LOBBY";
  position: absolute;
  right: 24px;
  bottom: -9px;
  padding: 0 8px;
  background: var(--bg);
  color: var(--accent-2);
  font-family: "Orbitron", sans-serif;
  font-size: 0.55rem;
  letter-spacing: 1.5px;
}
.nav__icon {
  border-radius: 8px;
  transform: rotate(-4deg);
  background: var(--accent);
  box-shadow: 5px 5px 0 rgba(255, 194, 71, 0.28), 0 0 24px rgba(255, 77, 46, 0.35);
}

.hero {
  position: relative;
  padding-top: 82px;
  padding-bottom: 52px;
}
.hero::before {
  content: "01";
  position: absolute;
  top: 42px;
  left: 24px;
  color: rgba(255, 194, 71, 0.16);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(5rem, 16vw, 11rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.hero__eyebrow { color: var(--accent-2); }
.hero__title {
  position: relative;
  font-size: clamp(2rem, 6vw, 4.2rem);
  text-shadow: 5px 5px 0 rgba(255, 77, 46, 0.12), 0 0 40px rgba(255, 77, 46, 0.22);
}
.hero__sub { position: relative; }
.slots__meter { border-radius: 3px; }
.slots__fill { border-radius: 2px; }

.btn { border-radius: 5px; text-transform: uppercase; letter-spacing: 0.8px; }
.btn--primary {
  background: linear-gradient(105deg, var(--accent), #ff7138 58%, var(--accent-2));
  box-shadow: 5px 5px 0 rgba(255, 194, 71, 0.2), 0 12px 34px rgba(255, 77, 46, 0.24);
}

.card {
  position: relative;
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(255, 77, 46, 0.08), transparent 45%), var(--card);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.card::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
  height: 3px;
  background: var(--accent-2);
}
.card__icon { filter: saturate(1.35); }

.match-opt:has(input:checked) {
  box-shadow: inset 4px 0 var(--accent), 0 0 20px rgba(255, 77, 46, 0.12);
}

.manual-team-modal select,
#manualTeamForm select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
}

.pay__receipt-field input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  background: rgba(255, 77, 46, 0.06);
  color: var(--text);
}
.pay__receipt-field small { color: var(--muted); }
.pay__receipt-preview {
  display: block;
  width: min(100%, 260px);
  max-height: 220px;
  object-fit: contain;
  margin-top: 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #050606;
}
.receipt-link {
  display: inline-block;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}
.announcement {
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px auto -18px;
  padding: 10px 24px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 77, 46, 0.12);
  color: var(--text);
}
.announcement[hidden] { display: none; }
.announcement__label {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-family: "Orbitron", sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.announcement p { font-weight: 600; }
.room__checkin { margin: 10px 0 4px; }
.leaderboard {
  max-width: var(--maxw);
  margin: 52px auto 0;
  padding: 0 24px;
}
.leaderboard .section__head { margin-bottom: 6px; }
.leaderboard .section__head h2 { display: flex; align-items: center; justify-content: center; gap: 10px; }
.leaderboard__trophy { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 194, 71, 0.72); border-radius: 50%; background: rgba(255, 194, 71, 0.11); font-size: 1.2rem; }
.leaderboard__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0; color: var(--muted); font-size: 0.82rem; }
.leaderboard__live { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-2); font-family: "Orbitron", sans-serif; font-size: 0.62rem; letter-spacing: 0.7px; }
.leaderboard__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--whatsapp); box-shadow: 0 0 10px var(--whatsapp); }
.leaderboard__points {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 16px 0 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 77, 46, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}
.leaderboard__points-label { color: var(--accent-2); font-family: "Orbitron", sans-serif; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.7px; }
.leaderboard__table-wrap { overflow-x: auto; border: 1px solid rgba(255, 194, 71, 0.42); border-radius: 8px; background: linear-gradient(145deg, rgba(255, 77, 46, 0.18), transparent 38%), var(--card); box-shadow: 10px 10px 0 rgba(255, 77, 46, 0.1), inset 0 1px 0 rgba(255,255,255,.08); }
.leaderboard__table, .results-editor { width: 100%; border-collapse: collapse; }
.leaderboard__table { min-width: 700px; }
.leaderboard__table th, .leaderboard__table td, .results-editor th, .results-editor td { padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.leaderboard__table th { color: #111; background: linear-gradient(90deg, var(--accent-2), #ffe18b); font-family: "Orbitron", sans-serif; font-size: 0.66rem; letter-spacing: 0.7px; }
.leaderboard__table th:nth-child(n+4), .leaderboard__table td:nth-child(n+4) { text-align: center; }
.results-editor th { color: var(--accent-2); font-family: "Orbitron", sans-serif; font-size: 0.7rem; letter-spacing: 0.6px; }
.leaderboard__table tbody tr { transition: background .15s ease, transform .15s ease; }
.leaderboard__table tbody tr:hover { background: rgba(255, 194, 71, 0.1); transform: translateX(3px); }
.leaderboard__table tbody tr:last-child td { border-bottom: 0; }
.leaderboard__rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; font-family: "Orbitron", sans-serif; font-size: 0.78rem; font-weight: 800; }
.leaderboard__rank-1 { background: linear-gradient(90deg, rgba(255, 194, 71, 0.28), transparent 72%); }
.leaderboard__rank-2 { background: linear-gradient(90deg, rgba(215, 225, 231, 0.14), transparent); }
.leaderboard__rank-3 { background: linear-gradient(90deg, rgba(214, 123, 61, 0.16), transparent); }
.leaderboard__rank-1 .leaderboard__rank { border-color: #ffd700; color: #ffd700; }
.leaderboard__rank-2 .leaderboard__rank { border-color: #d7e1e7; color: #d7e1e7; }
.leaderboard__rank-3 .leaderboard__rank { border-color: #d67b3d; color: #d67b3d; }
.leaderboard__team { font-weight: 800; letter-spacing: 0.2px; }
.leaderboard__cert-btn {
  border: none; background: none; cursor: pointer; font-size: 0.95rem;
  padding: 2px 4px; opacity: 0.75; vertical-align: middle;
}
.leaderboard__cert-btn:hover { opacity: 1; }
.leaderboard__total { display: inline-block; min-width: 43px; padding: 4px 8px; border-radius: 3px; background: linear-gradient(105deg, var(--accent), #ff7b3a); color: #160b07; text-align: center; box-shadow: 2px 2px 0 rgba(255, 194, 71, .32); }
.results-editor { min-width: 720px; }
.results-editor small { color: var(--muted); font-family: "Rajdhani", sans-serif; font-size: 0.8rem; }
.results-editor__inputs { display: flex; gap: 5px; }
.results-editor input { width: 58px; padding: 7px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-soft); color: var(--text); font: inherit; }
.results-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.results-preview span { padding: 7px 9px; border-left: 3px solid var(--accent); background: var(--bg-soft); font-size: 0.9rem; }
.results-preview b { float: right; color: var(--accent-2); }
@media (max-width: 520px) {
  .announcement { align-items: flex-start; flex-direction: column; gap: 4px; margin: 10px 20px -12px; padding: 10px 14px; }
  .leaderboard { padding: 0 16px; }
  .leaderboard__meta { align-items: flex-start; flex-direction: column; gap: 5px; }
  .results-preview { grid-template-columns: 1fr; }
}
.admin-reg-tools {
  display: flex;
  gap: 8px;
  margin: 14px 0 4px;
}
.admin-reg-tools input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
}
.admin-reg-tools .admin-btn { white-space: nowrap; }
.admin-reg-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 2px;
}
.admin-reg-summary span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}
.admin-reg-summary strong { color: var(--text); }
.admin-reg-summary .is-good strong { color: var(--whatsapp); }
.admin-reg-summary .is-warn strong { color: var(--accent-2); }
@media (max-width: 520px) {
  .admin-reg-tools { flex-direction: column; }
}

/* ---------- Nav: hamburger + drawer ---------- */
/* One container, two layouts: an inline row on desktop, a slide-in panel on
   mobile. Links, the live-status pill and the Google auth control all live
   inside it, so there's nothing left floating outside the drawer to toggle
   separately on a small screen. */
.nav__burger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 42px; height: 42px; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft);
  cursor: pointer; padding: 0;
}
.nav__burger span {
  display: block; width: 20px; height: 2px; background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__drawer { display: flex; align-items: center; gap: 22px; }
.nav__drawer-links { display: flex; align-items: center; gap: 18px; }
.nav__link {
  background: none; border: none; color: var(--muted); font: inherit; font-weight: 700;
  font-size: 0.92rem; text-decoration: none; cursor: pointer; padding: 2px 0;
}
.nav__link:hover { color: var(--accent-2); }
.nav__link--accent { color: var(--accent); }
.nav__link[hidden] { display: none; }
.nav__backdrop { display: none; }

@media (max-width: 860px) {
  .nav__burger { display: flex; }
  .nav__drawer {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(80vw, 320px);
    background: var(--card); border-left: 1px solid var(--border);
    border-top-left-radius: 20px; border-bottom-left-radius: 20px;
    box-shadow: -14px 0 40px rgba(0,0,0,0.4);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 26px; padding: 90px 22px 24px;
    transform: translateX(100%); transition: transform .25s ease;
    z-index: 400; overflow-y: auto;
  }
  .nav__drawer.is-open { transform: translateX(0); }
  .nav__drawer-links { flex-direction: column; align-items: stretch; gap: 6px; }
  .nav__link {
    padding: 12px 14px; border-radius: 12px; display: flex; align-items: center; gap: 10px;
  }
  .nav__link:hover, .nav__link:active { background: rgba(255,155,33,0.1); color: var(--accent-2); }
  .nav__backdrop {
    display: block; position: fixed; inset: 0; background: rgba(3,3,8,0.6);
    z-index: 390;
  }
  /* The class rule above beats the browser's own [hidden] at equal specificity —
     same bug as .btn and .auth__btn — so a closed drawer's backdrop would still
     sit over the whole page, invisible-ish and blocking every click underneath. */
  .nav__backdrop[hidden] { display: none; }
}

/* ---------- Google auth (nav) ---------- */
.auth {
  display: flex; align-items: center; gap: 10px;
}
.auth__btn { line-height: 0; }
/* The GIS button renders its own iframe — keep its wrapper from collapsing to 0
   height before the script finishes loading. */
.auth__btn:empty { min-width: 180px; min-height: 40px; }
/* Google's renderButton() sets its own inline display style on this element, which
   otherwise beats the browser's [hidden] rule — the same class of bug noted above
   for .btn, just arriving via inline style instead of an author rule this time. */
.auth__btn[hidden] { display: none !important; }
.auth__signed-in {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 8px 6px 6px; background: rgba(255,255,255,0.02);
}
.auth__avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border);
}
.auth__name {
  font-size: 0.86rem; font-weight: 600; color: var(--text);
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.auth__signout {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 0.78rem;
  cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.auth__signout:hover { border-color: var(--accent); color: var(--accent-2); }
@media (max-width: 860px) {
  .auth { flex-direction: column; align-items: flex-start; width: 100%; }
  .auth__signed-in { width: 100%; box-sizing: border-box; }
  .auth__name { max-width: none; flex: 1; }
}

/* ---------- My Teams: dedicated full-screen view ---------- */
/* Not an inline page section anymore — a separate screen the drawer and the
   post-sign-in flow switch to, same pattern as the admin panel but without the
   backdrop: scrollable, full-viewport, nav/footer swapped out from under it. */
.dashboard {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: var(--bg); padding: 96px 24px 60px;
}
.dashboard[hidden] { display: none; }
.dashboard__inner { max-width: var(--maxw); margin: 0 auto; }
.dashboard__head-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.dashboard__profile { display: flex; align-items: center; gap: 14px; }
.dashboard__avatar {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent); flex: 0 0 auto;
}
.dashboard__profile-name {
  font-family: "Orbitron", sans-serif; font-size: 1.15rem; margin: 2px 0 2px;
}
.dashboard__profile-email { color: var(--muted); font-size: 0.85rem; }
.dashboard__hint { color: var(--muted); margin: 14px 0 0; font-size: 0.92rem; }
.dashboard__back {
  flex: 0 0 auto; background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer;
}
.dashboard__back:hover { border-color: var(--accent); color: var(--accent-2); }
.dash-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin-top: 18px;
}
.dash-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s ease, transform .2s ease;
}
.dash-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.dash-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dash-card__identity { min-width: 0; flex: 1; }
.dash-card__name-row { display: flex; align-items: center; gap: 8px; }
.dash-card__team { font-weight: 800; font-size: 1.02rem; overflow-wrap: anywhere; }
.dash-card__edit {
  flex: 0 0 auto; background: none; border: none; cursor: pointer;
  font-size: 0.85rem; opacity: 0.6; padding: 2px 4px; line-height: 1;
}
.dash-card__edit:hover { opacity: 1; }
.dash-card__name-form { display: flex; gap: 6px; align-items: center; }
.dash-card__name-form[hidden] { display: none; }
.dash-card__name-form input {
  flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--accent);
  border-radius: 6px; background: var(--bg-soft); color: var(--text); font: inherit;
}
.dash-card__name-save, .dash-card__name-cancel {
  flex: 0 0 auto; border-radius: 6px; padding: 7px 10px; font: inherit; font-size: 0.82rem;
  cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text);
}
.dash-card__name-save { border-color: var(--accent); color: var(--accent-2); font-weight: 700; }
.dash-card__name-save:disabled { opacity: 0.6; cursor: wait; }
.dash-card__error { color: var(--danger); font-size: 0.8rem; margin: 0; }
.dash-card__error[hidden] { display: none; }
.dash-card__match { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.dash-card__id { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.4px; }
.dash-card__status {
  flex: 0 0 auto; padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--border);
}
.dash-card__status--ok { color: var(--whatsapp); border-color: var(--whatsapp); }
.dash-card__status--pending { color: var(--accent-2); border-color: var(--accent-2); }
.dash-card__stats { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-card__stat {
  padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  background: rgba(255,155,33,0.1); border: 1px solid var(--border); color: var(--text);
}
.dash-card__stat--rank { color: var(--accent-2); border-color: var(--accent-2); }
.dash-card__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dash-card__btn { padding: 9px 16px; font-size: 0.86rem; }
.dash-card__note { color: var(--muted); font-size: 0.84rem; }
.dash-empty { color: var(--muted); margin-top: 16px; }
@media (max-width: 520px) {
  .dashboard { padding: 86px 16px 40px; }
  .dashboard__head-row { flex-direction: column; }
  .dash-cards { grid-template-columns: 1fr; }
}
