/* ── Reset & tokens ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090b;
  --panel: #141418;
  --line: #27272a;
  --text: #fafafa;
  --dim: #a1a1aa;
  --hot: #ef4444;
  --go: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  --go-glow: rgba(239, 68, 68, 0.45);
  --live: #22c55e;
  --content-max: min(480px, 100%);
  --gate-max: min(340px, calc(100vw - 48px));
  --zone-top-h: 106px;
  --shell-gutter: clamp(12px, 4vw, 24px);
  --rail: clamp(100px, 12vw, 160px);
  --footer-h: 120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

[hidden] { display: none !important; }

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--live);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
}

.live-tag.sm { font-size: 12px; padding: 5px 12px; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: blink 1.2s ease infinite;
}

@keyframes blink { 50% { opacity: 0.35; } }

.btn-go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: clamp(14px, 3.5vw, 16px) clamp(16px, 4vw, 20px);
  border: none;
  border-radius: 12px;
  background: var(--go);
  color: #fff;
  font-size: clamp(15px, 3.8vw, 16px);
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 28px var(--go-glow);
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.btn-go:active { transform: scale(0.98); }

.btn-xl {
  font-size: clamp(16px, 4vw, 17px);
  padding: clamp(16px, 4vw, 18px) clamp(18px, 4.5vw, 22px);
  animation: pulse-btn 2.2s ease-in-out infinite;
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 6px 28px var(--go-glow); }
  50% { box-shadow: 0 8px 40px rgba(239, 68, 68, 0.55); }
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
  background-image: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(239, 68, 68, 0.12), transparent);
}

.gate-box {
  width: var(--gate-max);
  max-width: 100%;
  text-align: center;
  padding: clamp(24px, 5vw, 32px) clamp(16px, 4vw, 24px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.gate-box h1 {
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 900;
  margin: 16px 0 8px;
}

.gate-desc {
  color: var(--dim);
  font-size: 15px;
  margin-bottom: 24px;
}

.gate-leave {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--dim);
}

.gate-legal {
  margin-top: 20px;
  font-size: 11px;
  color: #52525b;
}

.gate-legal a { color: #71717a; text-decoration: underline; }

.page {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--footer-h) + 72px + env(safe-area-inset-bottom));
}

/* ── Three-column shell (desktop side ads) ── */
.shell {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex: 1 1 auto;
  gap: clamp(12px, 2vw, 24px);
  width: 100%;
  max-width: min(1680px, 100%);
  margin: 0 auto;
  padding: 0 var(--shell-gutter);
}

.shell-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--content-max);
  min-width: 0;
}

.zone-rail {
  display: none;
  flex: 0 0 var(--rail);
  width: var(--rail);
  min-height: min(600px, calc(100dvh - var(--footer-h) - 32px));
  position: sticky;
  top: 16px;
  text-align: center;
}

.zone-rail:not(:empty) {
  display: block;
  padding: 8px 0;
}

@media (min-width: 1100px) {
  .zone-rail:not(:empty) { display: block; }
}

@media (max-width: 1099px) {
  .zone-rail { display: none !important; }
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: clamp(12px, 3vw, 16px) var(--shell-gutter) 0;
}

.bar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.bar-title {
  font-size: clamp(12px, 2.5vw, 14px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  white-space: nowrap;
}

.cam-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cam-tab {
  padding: 5px 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.cam-tab:hover:not(.is-active) {
  color: var(--text);
  border-color: #3f3f46;
}

.cam-tab.is-active {
  color: var(--text);
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.5);
}

.bar .live-tag {
  flex-shrink: 0;
}

.core {
  padding: clamp(8px, 2vw, 12px) var(--shell-gutter) clamp(20px, 4vw, 28px);
}

.stage { text-align: center; }

.stage .btn-go {
  position: relative;
  z-index: 2;
  margin-top: 4px;
}

.stage-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hot);
  margin-bottom: 10px;
}

.widget {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  position: relative;
}

.widget:empty {
  min-height: 140px;
}

.widget:not(:empty) {
  min-height: 0;
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.12);
}

.widget:not(:empty) > div {
  width: 100% !important;
  max-width: 100%;
}

.stage-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--dim);
}

.alt-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.alt-links a {
  flex: 1 1 calc(33.333% - 6px);
  min-width: min(100%, 96px);
  text-align: center;
  padding: clamp(10px, 2.5vw, 12px) 8px;
  font-size: clamp(11px, 2.8vw, 12px);
  font-weight: 600;
  color: var(--dim);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.zone {
  text-align: center;
  padding: 0 var(--shell-gutter);
  max-width: 100%;
}

.zone:empty:not(.zone-top) { display: none; }

.zone:not(:empty) { padding: 8px var(--shell-gutter); }

/* ── Ad slot sizes by format ── */
.zone-mid-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.zone-mid:not(:empty) {
  min-height: 250px;
  max-width: 300px;
  width: 100%;
  margin-inline: auto;
}

/* 728×90 leaderboard — hold height before ExoClick fills the slot */
.vp-tablet #zone-top,
.vp-desktop #zone-top {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--zone-top-h);
  height: var(--zone-top-h);
  max-width: min(728px, calc(100% - 2 * var(--shell-gutter)));
  margin: 0 auto;
  padding: 8px var(--shell-gutter);
  overflow: hidden;
}

.zone-top:not(:empty) {
  max-width: min(728px, calc(100% - 2 * var(--shell-gutter)));
  margin: 0 auto;
}

.zone-rail:not(:empty) {
  min-height: min(600px, calc(100dvh - var(--footer-h) - 32px));
  max-width: 160px;
  margin-inline: auto;
}

.zone-bottom:not(:empty) {
  min-height: 90px;
  max-width: min(728px, 100%);
  margin: 8px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.zone img,
.zone iframe {
  display: block;
  max-width: 100%;
  margin-inline: auto;
}

/* Hide ad slots not used on current viewport (before JS injects) */
.vp-mobile #zone-top,
.vp-mobile .zone-rail { display: none !important; }

.vp-tablet .zone-rail { display: none !important; }

/* ── Sticky legal footer ── */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 160;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.97);
  backdrop-filter: blur(8px);
  text-align: center;
}

.footer-disclaimer {
  font-size: 10px;
  line-height: 1.45;
  color: #71717a;
  margin-bottom: 10px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 8px;
}

.footer-nav a {
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-nav a:hover { color: var(--text); }

.footer-copy {
  font-size: 10px;
  color: #52525b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--footer-h) + env(safe-area-inset-bottom));
  z-index: 200;
  padding: 10px var(--shell-gutter);
  background: linear-gradient(transparent, rgba(9, 9, 11, 0.95) 40%);
}

/* ── Responsive breakpoints ── */
@media (min-width: 480px) {
  :root { --content-max: min(520px, calc(100% - 2 * var(--shell-gutter))); }
}

@media (min-width: 768px) {
  :root {
    --content-max: min(720px, calc(100% - 2 * var(--shell-gutter)));
    --footer-h: 112px;
  }

  .alt-links a {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (min-width: 992px) {
  :root { --content-max: min(840px, calc(100% - 2 * var(--shell-gutter))); }
}

@media (min-width: 1100px) {
  .shell {
    max-width: min(1920px, 100%);
    padding: 0 clamp(16px, 2.5vw, 40px);
  }

  .shell-main {
    display: flex;
    flex-direction: column;
    max-width: none;
    flex: 1 1 auto;
  }

  .core {
    flex: 0 0 auto;
  }

  .zone-mid-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 300px));
    justify-content: center;
    align-items: start;
    gap: clamp(8px, 1.5vw, 20px);
    width: 100%;
    max-width: min(1280px, 100%);
    margin-inline: auto;
    padding: 20px 0 12px;
    border-top: 1px solid var(--line);
  }

  .zone-mid-row.is-active {
    margin-top: auto;
  }

  .zone-mid-row .zone-mid:not(:empty) {
    max-width: 300px;
    width: 100%;
    padding: 8px 0;
    margin-inline: auto;
  }
}

@media (max-width: 767px) {
  :root { --footer-h: 68px; }

  .footer-disclaimer { display: none; }

  .cam-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cam-tabs::-webkit-scrollbar { display: none; }

  .cam-tab {
    flex-shrink: 0;
  }

  .page {
    padding-bottom: calc(var(--footer-h) + 80px + env(safe-area-inset-bottom));
  }

  .alt-links a {
    flex: 1 1 calc(50% - 4px);
  }

  .alt-links a:last-child {
    flex: 1 1 100%;
  }
}

@media (max-width: 359px) {
  .alt-links {
    flex-direction: column;
  }

  .alt-links a {
    flex: 1 1 auto;
    width: 100%;
  }

  .bar {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
}

@media (min-width: 768px) {
  .dock { display: none !important; }
}

.foot {
  display: none;
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.9);
}

.flash-inner { text-align: center; }

.flash-inner p {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 700;
}

.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border: 3px solid #27272a;
  border-top-color: var(--hot);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toasts {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  width: min(340px, calc(100% - 24px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 6px;
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.on { opacity: 1; transform: translateY(0); }

.toast b { font-weight: 700; }

.legal {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: clamp(24px, 5vw, 32px) var(--shell-gutter);
}

.legal-doc {
  width: 100%;
  max-width: min(520px, 100%);
}

.legal-doc h1 { font-size: clamp(20px, 5vw, 24px); margin-bottom: 8px; }

.legal-doc h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--text);
}

.legal-date { color: var(--dim); font-size: 13px; margin-bottom: 24px; }

.legal-doc p { color: var(--dim); font-size: 14px; margin-bottom: 16px; line-height: 1.6; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.legal-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  text-decoration: underline;
}
