:root {
  color-scheme: dark;
  font: 16px/1.42 "Segoe UI", system-ui, sans-serif;
  --bg: #050605;
  --text: #f6f7f3;
  --muted: #acb5af;
  --brand: #f1ff0a;
  --green: #28df91;
  --line: #ffffff20;
  --toast-bottom: max(12px, env(safe-area-inset-bottom));
  --toast-space: calc(50px + var(--toast-bottom));
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100vh; height: 100dvh; overflow: hidden; }
body {
  height: 100%;
  margin: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) var(--toast-space);
  overflow: hidden;
  color: var(--text);
  background: radial-gradient(ellipse min(76vw, 1040px) 420px at 45% 360px, #0a2016 0%, transparent 73%), var(--bg);
}
button, a { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
h1, h2, p { margin: 0; }

.topbar { border-bottom: 1px solid #ffffff0d; }
.topbar-inner {
  width: min(100% - 48px, 1040px);
  min-height: clamp(48px, 9dvh, 76px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.logo { display: block; width: 116px; height: auto; }
.trial-badge {
  display: grid;
  gap: 1px;
  text-align: center;
  padding: 7px 13px;
  border: 1px solid #ffffff19;
  background: #0e100e;
  border-radius: 11px;
  line-height: 1.25;
}
.trial-badge span { color: var(--muted); font-size: 10px; font-weight: 670; text-transform: uppercase; }
.trial-badge strong { color: var(--brand); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

.landing {
  width: min(1400px, 100% - 72px);
  height: min(100%, 720px);
  min-height: 0;
  align-self: center;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(10px, 3dvh, 34px);
  margin-inline: auto;
  padding-top: clamp(10px, 3dvh, 36px);
}
.intro { text-align: center; }
.intro h1 {
  font-size: clamp(26px, min(5.18vw, 9dvh), 80px);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -.058em;
  text-transform: uppercase;
}
.intro h1 strong { color: var(--brand); font-weight: inherit; text-shadow: 0 0 38px #efff0a3e; }
.intro p { margin-top: clamp(5px, 1.5dvh, 12px); font-size: clamp(14px, 1.35vw, 19px); color: var(--muted); }
.round-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
}

.camera-slot {
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  display: grid;
  align-items: center;
  justify-items: center;
  container-type: size;
}
.camera {
  overflow: hidden;
  position: relative;
  isolation: isolate;
  width: min(100%, calc(100cqh * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #111916;
  border: 1px solid #a6c5b931;
  border-radius: 12px;
  box-shadow: 0 18px 62px -30px #1cd47561;
}
.camera::after {
  position: absolute;
  content: "";
  inset: 45% 0 0;
  background: linear-gradient(transparent, #040705ba);
  pointer-events: none;
  z-index: 1;
}
.camera video { display: block; width: 100%; height: 100%; object-fit: cover; }
.camera-label, .timer {
  position: absolute;
  top: 13px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #131815df;
  border: 1px solid #ffffff26;
  border-radius: 999px;
  color: #fff;
}
.camera-label { left: 13px; padding: 4px 9px; font-size: 10px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.camera-label span { width: 6px; height: 6px; border-radius: 50%; background: #e0ef8d; }
.timer { right: 13px; padding: 5px 9px; color: var(--brand); font: 730 15px ui-monospace, monospace; }
.camera-cue {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: max-content;
  max-width: calc(100% - 36px);
  display: grid;
  gap: 2px;
  padding: 10px clamp(12px, 2vw, 24px);
  text-align: center;
  border: 1px solid #35db8b8c;
  border-radius: 13px;
  box-shadow: 0 0 26px #24d98145;
  background: #06120ee8;
}
.camera-cue span { color: var(--green); font-size: 10px; letter-spacing: .15em; font-weight: 800; text-transform: uppercase; }
.camera-cue strong { font-size: clamp(12px, 1.39vw, 19px); font-weight: 810; }
.camera-cue[data-countdown] strong { font-variant-numeric: tabular-nums; }
.camera-counter {
  position: absolute;
  z-index: 2;
  inset: auto 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #ffffff36;
  border-radius: 9px;
  background: #080b09e8;
}
.camera-counter span { display: flex; align-items: center; gap: 7px; color: #dce5df; font-size: 10px; font-weight: 770; letter-spacing: .09em; text-transform: uppercase; }
.camera-counter svg { stroke: var(--green); stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.camera-counter strong { font: 720 23px/1 ui-monospace, Consolas, monospace; color: var(--text); font-variant-numeric: tabular-nums; }

.pick-panel { min-width: 0; text-align: center; }
.tag { color: var(--green); font-size: 12px; letter-spacing: .15em; font-weight: 790; text-transform: uppercase; }
.pick-panel h2 {
  max-width: 23ch;
  margin: 8px auto clamp(10px, 2.5dvh, 20px);
  font-size: clamp(22px, min(2.7vw, 5.5dvh), 39px);
  line-height: 1.13;
  letter-spacing: -.038em;
  font-weight: 770;
  text-wrap: balance;
}
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.7vw, 23px); }
.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, .85vw, 13px);
  min-height: clamp(47px, min(7.1vw, 13dvh), 105px);
  border: 1px solid #ffffff30;
  border-radius: clamp(12px, 1.3vw, 19px);
  padding: 10px;
  text-align: center;
  font-size: clamp(13px, 1.4vw, 20px);
  font-weight: 740;
  letter-spacing: -.024em;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.choice strong { font-weight: 860; font-variant-numeric: tabular-nums; }
.choice-copy { line-height: 1.14; white-space: nowrap; }
.choice-copy small { display: block; margin-top: 3px; font-size: .76em; font-weight: 660; opacity: .85; }
.choice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(24px, 2.7vw, 36px);
  aspect-ratio: 1;
  border: 1px solid #ffffff2e;
  border-radius: 9px;
}
.choice-icon svg {
  width: 62%;
  height: 62%;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.choice-more {
  color: #061e13;
  background: linear-gradient(145deg, #38efa3, #22c17d);
  box-shadow: 0 5px 24px #24d7833d, inset 0 1px #ffffff40;
}
.choice-more .choice-icon { border-color: #10291d2b; background: #0f4a2d1f; }
.choice-less {
  color: #fff;
  background: linear-gradient(145deg, #b92c36, #920f1d);
  box-shadow: 0 5px 24px #e342513d, inset 0 1px #ffffff29;
}
.choice-less .choice-icon { background: #6b081f47; }
.choice:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-2px); }
.choice:active:not(:disabled) { transform: translateY(1px); }
.choice:disabled { opacity: .46; cursor: default; box-shadow: none; }
.choice[data-selected="true"]:disabled { opacity: 1; outline: 2px solid #ffffffcf; outline-offset: 3px; }
.note { color: var(--muted); font-size: 12px; margin-top: 13px; }
.note:empty { margin: 0; }

.withdrawal-toast {
  position: fixed;
  z-index: 10;
  right: max(16px, env(safe-area-inset-right));
  bottom: var(--toast-bottom);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(340px, calc(100vw - 28px));
  min-height: 44px;
  padding: 7px 13px 7px 8px;
  border: 1px solid #52e8a55c;
  border-radius: 10px;
  background: #0e1b15f5;
  box-shadow: 0 10px 30px #0008;
  pointer-events: none;
  animation: withdrawal-in .24s ease-out both;
}
.withdrawal-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #16392a;
  color: #62f2ac;
}
.withdrawal-icon path { stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.withdrawal-caption { display: block; color: var(--muted); font-size: 10px; line-height: 1.15; }
#withdrawal-message { color: var(--text); font-size: 13px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
@keyframes withdrawal-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.stake-dialog {
  width: min(510px, calc(100% - 28px));
  max-height: calc(100dvh - 24px);
  padding: clamp(16px, 4dvh, 27px);
  border: 1px solid #ffffff24;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0, #14291c, transparent 65%), #0d100e;
  color: var(--text);
  box-shadow: 0 24px 80px #000a;
}
.stake-dialog::backdrop { background: #040605cc; backdrop-filter: blur(5px); }
.stake-form { display: grid; gap: clamp(8px, 2dvh, 16px); }
.stake-header { position: relative; padding-inline: 38px; text-align: center; }
.stake-header h2 { font-size: clamp(17px, 2.7vw, 22px); font-weight: 760; }
.stake-header h2:focus { outline: none; }
.stake-close {
  position: absolute;
  top: 50%;
  right: 0;
  translate: 0 -50%;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
}
.stake-close:hover { border-color: var(--line); color: var(--text); }
.stake-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .12em;
  color: var(--text);
  font-size: clamp(34px, min(9vw, 12dvh), 76px);
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -.055em;
}
.stake-value input {
  width: min(calc(var(--amount-length, 4) * .94ch + .24ch), calc(100% - 2ch));
  min-width: 2ch;
  margin: 0;
  padding: 0 .04em;
  border: 0;
  border-bottom: 2px solid #ffffff4d;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: center;
}
.stake-value input::placeholder { color: #c1c9c2; }
.stake-value input:focus { border-color: var(--brand); outline: none; }
.stake-balance { color: var(--muted); font-size: 13px; text-align: center; }
.stake-balance strong { margin-left: 4px; color: var(--text); font-variant-numeric: tabular-nums; }
.stake-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(5px, 1.2vw, 9px); }
.stake-presets button {
  min-height: 42px;
  padding: 4px 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #171d18;
  font-size: clamp(12px, 2.75vw, 14px);
  font-weight: 750;
  white-space: nowrap;
}
.stake-presets button:is(:hover, [aria-pressed="true"]):not(:disabled) { border-color: #b3c152; color: var(--brand); }
.stake-presets button:disabled { opacity: .48; cursor: default; }
.stake-preview {
  display: grid;
  align-items: center;
  min-height: 46px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #111713;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.stake-preview[data-valid] { color: var(--green); font-weight: 740; }
.stake-submit {
  min-height: 50px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #171a05;
  font-weight: 800;
}
.stake-submit:hover:not(:disabled) { background: #f8ff69; }
.stake-submit:disabled { background: #343c35; color: #bcc4bb; cursor: default; }

#resultado {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  width: min(360px, calc(100% - 32px), calc((100dvh - 88px) * 9 / 8));
  overflow: visible;
}
#resultado::backdrop { background: #080909d9; backdrop-filter: blur(4px); }
.prize-link { display: block; border-radius: 20px; }
.prize-art { width: 100%; height: auto; display: block; }
.prize-link:hover .prize-art rect:last-of-type { filter: brightness(1.045); }
.result-footer { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin-top: 8px; padding-inline: 2px; color: #e0e2df; font-size: 12px; }
.replay { border: 0; padding: 2px 0; background: transparent; color: inherit; font-size: 12px; text-decoration: underline; }
.replay:hover { color: var(--brand); }

@media (max-width: 950px) {
  .landing { width: calc(100% - 38px); }
  .topbar-inner { width: calc(100% - 38px); min-height: clamp(48px, 9dvh, 64px); }
  .round-layout { grid-template-columns: minmax(0, 1.42fr) minmax(265px, 1fr); gap: 22px; }
}
@media (max-width: 680px) {
  body { background: radial-gradient(ellipse 95vw 330px at 50% 300px, #0a2116 0%, transparent 76%), var(--bg); }
  .topbar-inner, .landing { width: calc(100% - 28px); }
  .topbar-inner { min-height: clamp(46px, 8dvh, 57px); }
  .logo { width: 102px; }
  .landing { height: min(100%, calc(330px + 56.25vw)); }
  .intro h1 { font-size: clamp(24px, min(7.15vw, 8dvh), 43px); }
  .round-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: clamp(9px, 2dvh, 18px); }
  .camera-slot { align-items: end; }
  .camera { border-radius: 9px; }
  .camera-counter { inset: auto 7px 7px; padding: 5px 7px; }
  .camera-counter strong { font-size: 18px; }
  .camera-label, .timer { top: 7px; }
  .camera-label { left: 7px; }
  .timer { right: 7px; }
  .choice { min-height: clamp(44px, 10dvh, 57px); font-size: 14px; }
  .withdrawal-toast { right: 12px; }
}
@media (min-width: 480px) and (max-width: 680px) and (min-aspect-ratio: 6/5) {
  .round-layout { grid-template-columns: minmax(0, 1.2fr) minmax(210px, 1fr); grid-template-rows: minmax(0, 1fr); gap: 14px; }
  .camera-slot { align-items: center; }
}
@media (max-height: 480px) {
  .landing { padding-top: 8px; gap: 8px; }
  .intro p { font-size: 13px; }
  .pick-panel h2 { margin-block: 5px 8px; font-size: 20px; }
  .choice { padding: 6px; }
  .note { margin-top: 9px; }
}
@media (max-height: 360px) {
  .stake-dialog { padding-block: 12px; }
  .stake-form { gap: 6px; }
  .stake-presets button, .stake-preview { min-height: 32px; }
  .stake-submit { min-height: 40px; }
}
@media (max-width: 479px) and (max-height: 480px) {
  :root { --toast-space: calc(46px + var(--toast-bottom)); }
  .landing { gap: 6px; }
  .intro h1 { font-size: clamp(20px, 6vw, 28px); }
  .intro p { margin-top: 4px; }
  .round-layout { gap: 7px; }
  .tag { line-height: 1.2; }
  .note { margin-top: 7px; }
}
@container (max-height: 155px) {
  .camera-cue:not([data-countdown]) { display: none; }
  .camera-cue[data-countdown] { max-width: calc(100% - 14px); padding: 6px 8px; }
}
@container (max-height: 100px) {
  .camera:has(.camera-cue[data-countdown]) :is(.camera-label, .camera-counter) { visibility: hidden; }
  .camera-label, .timer { top: 4px; padding: 3px 5px; }
  .camera-label { left: 4px; font-size: 8px; }
  .timer { right: 4px; font-size: 12px; }
  .camera-counter { inset: auto 4px 4px; padding: 3px 5px; }
  .camera-counter span { gap: 4px; font-size: 8px; }
  .camera-counter svg { width: 12px; height: 12px; }
  .camera-counter strong { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .withdrawal-toast { animation: none; }
  .choice { transition: none; }
  .choice:hover:not(:disabled), .choice:active:not(:disabled) { transform: none; }
}
