/* ==========================================================================
   LOOTBOXX Prelander — style.css
   Dark navy/purple brand system, mobile-first
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
  /* brand tokens (matched to reference UI) */
  --bg: #08070f;
  --bg-1: #0b0a17;
  --bg-2: #100e1f;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-border: rgba(255, 255, 255, 0.08);

  --purple-from: #6a1fff;
  --purple-to: #a53bff;
  --purple-border: rgba(176, 107, 255, 0.45);
  --purple-glow: rgba(138, 63, 255, 0.55);

  --pink: #da77f2;
  --pink-mid: #cc5de8;
  --pink-deep: #ae3ec9;

  --gold: #ffcf5c;
  --green: #33d17a;
  --red: #ff5c7a;

  --text: #f5f3fb;
  --text-dim: #b6b1c9;
  --text-faint: #7d7896;

  --heading-font-stack: 'TT Chocolates', 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
  --body-font-stack: 'Plus Jakarta Sans', system-ui, sans-serif;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --container: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(106, 31, 255, 0.28), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(218, 119, 242, 0.16), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(106, 31, 255, 0.18), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--body-font-stack);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* focus visibility for accessibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------- header --------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 7, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--heading-font-stack);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--purple-to) 0%, var(--purple-from) 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 8px 18px -8px rgba(106, 31, 255, 0.85);
}
.trust-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 7px 12px;
  border-radius: 999px;
}
.trust-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

/* ---------------------------------- buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body-font-stack);
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 12px 22px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
}
.btn--secondary {
  background: linear-gradient(180deg, var(--purple-to) 0%, var(--purple-from) 100%);
  border-color: var(--purple-border);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(106, 31, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn--secondary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn--secondary:active { transform: translateY(0); }
.btn--lg { padding: 16px 30px; font-size: 16px; }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--ghost {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}
.btn--ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.18); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.3); }
.btn--pulse {
  animation: pulseGlow 2.1s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 22px -10px rgba(106, 31, 255, 0.7), inset 0 1px 0 rgba(255,255,255,0.22), 0 0 0 0 rgba(176,107,255,0.5); }
  50% { box-shadow: 0 8px 30px -6px rgba(176,107,255,0.95), inset 0 1px 0 rgba(255,255,255,0.3), 0 0 0 10px rgba(176,107,255,0); }
}

/* ---------------------------------- hero (minimal) --------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-mini {
  padding: 36px 0 8px;
  text-align: center;
}
.hero-mini__title {
  font-family: var(--heading-font-stack);
  font-size: clamp(26px, 6.6vw, 40px);
  line-height: 1.14;
  margin: 0 0 10px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.05s;
}
.hero-mini__title span {
  background: linear-gradient(95deg, var(--pink) 0%, var(--purple-to) 55%, var(--purple-from) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-mini__bonus {
  font-family: var(--heading-font-stack);
  font-weight: 800;
  font-size: clamp(20px, 5vw, 26px);
  margin: 0;
  background: linear-gradient(95deg, #fff 0%, var(--pink) 60%, var(--purple-to) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.15s;
}

/* ---------------------------------- box picker --------------------------------- */
.picker {
  padding: 34px 0 10px;
}
.picker__head {
  text-align: center;
  margin-bottom: 24px;
}
.picker__head h2 {
  font-family: var(--heading-font-stack);
  font-size: clamp(20px, 5vw, 26px);
  margin: 0 0 6px;
}
.picker__head p {
  color: var(--text-dim);
  font-size: 13.5px;
  margin: 0;
}

.box-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 620px;
  margin: 0 auto;
}
@media (max-width: 560px) {
  .box-grid { gap: 10px; }
}

.box-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 16px 12px 18px;
  text-align: center;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards var(--stagger, 0.1s), floaty 4.5s ease-in-out infinite var(--stagger, 0.1s);
}
.box-card::before {
  /* ambient corner glow, tinted per-card via --card-glow */
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  width: 140%;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--card-glow, var(--purple-glow)), transparent 65%);
  opacity: 0.35;
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}
.box-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 1px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: linear-gradient(180deg, var(--card-glow, var(--purple-glow)), transparent);
}
.box-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}
.box-card:hover::before { opacity: 0.55; }
.box-card__media {
  position: relative;
  z-index: 1;
  display: block;
  padding: 10px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 42%, rgba(255,255,255,0.06), transparent 72%);
}
.box-card__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.5));
  transition: transform 0.3s ease;
}
.box-card:hover .box-card__media img,
.box-card.is-selected .box-card__media img {
  transform: scale(1.04);
}
.box-card__name {
  position: relative;
  z-index: 1;
  font-family: var(--heading-font-stack);
  font-size: 15px;
  margin: 10px 0 0;
  font-weight: 700;
  color: var(--cb-text, #fff);
}
.box-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(20,16,32,0.55);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
}
.box-card__check svg { width: 13px; height: 13px; }

.box-card.is-selected {
  border-color: var(--cb-border, rgba(204,93,232,.6));
  box-shadow: 0 0 0 1px var(--cb-border, rgba(204,93,232,.5)), 0 16px 38px -12px var(--card-glow, rgba(176,107,255,.65));
  transform: translateY(-6px) scale(1.02);
  animation-play-state: paused;
}
.box-card.is-selected::before { opacity: 0.65; }
.box-card.is-selected::after { opacity: 1; }
.box-card.is-selected .box-card__check {
  opacity: 1;
  transform: scale(1);
  background: linear-gradient(180deg, var(--cb-mid, var(--purple-to)), var(--cb-to, var(--purple-from)));
  border-color: transparent;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.box-card.is-selected { animation: fadeUp 0.001s forwards; }

/* claim area */
.claim-area {
  max-width: 420px;
  margin: 26px auto 0;
  text-align: center;
  min-height: 74px;
}
.claim-hint {
  color: var(--text-faint);
  font-size: 13px;
  margin: 0 0 12px;
}
.claim-area .btn { width: 100%; }
.claim-area .claim-note {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 10px;
  line-height: 1.5;
}

.section-title {
  text-align: center;
  font-family: var(--heading-font-stack);
  font-size: clamp(20px, 5vw, 24px);
  margin: 0 0 4px;
}
.section-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 13.5px;
  margin: 0 auto 20px;
  max-width: 460px;
}

/* ---------------------------------- live winners --------------------------------- */
.live {
  padding: 44px 0 10px;
}
.live__panel {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.live__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--panel-border);
}
.live__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--heading-font-stack);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.live__title .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.35} }
.live__count {
  font-size: 11.5px;
  color: var(--text-faint);
}

.live__table {
  width: 100%;
  border-collapse: collapse;
}
.live__cols {
  display: grid;
  grid-template-columns: 1.1fr 2fr 0.9fr 0.8fr;
  padding: 10px 18px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--panel-border);
}
.live__body {
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.live__row {
  display: grid;
  grid-template-columns: 1.1fr 2fr 0.9fr 0.8fr;
  align-items: center;
  padding: 11px 18px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  animation: rowIn 0.45s ease;
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(-8px); background: rgba(176,107,255,0.14); }
  to { opacity: 1; transform: translateY(0); background: transparent; }
}
.live__row .user { color: var(--text); font-weight: 600; }
.live__row .item { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live__row .time { color: var(--text-faint); font-size: 12px; }
.live__row .amount { color: var(--green); font-weight: 700; text-align: right; }
.live__row .amount.big { color: var(--gold); }

@media (max-width: 520px) {
  .live__cols { grid-template-columns: 1fr 1.6fr 0.8fr; }
  .live__cols .col-time { display: none; }
  .live__row { grid-template-columns: 1fr 1.6fr 0.8fr; }
  .live__row .time { display: none; }
}

/* ---------------------------------- trust / faq --------------------------------- */
.trust {
  padding: 44px 0 10px;
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}
@media (max-width: 720px) {
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
}
.trust-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.trust-card__icon {
  width: 34px; height: 34px;
  margin: 0 auto 8px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(176,107,255,0.12);
  color: var(--pink);
}
.trust-card p { font-size: 12.5px; color: var(--text-dim); margin: 0; line-height: 1.4; }
.trust-card strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 3px; }

.faq { padding: 44px 0 20px; }
.faq__list { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 4px 16px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--pink);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-dim); font-size: 13px; line-height: 1.6; margin: 0 0 14px; }

/* ---------------------------------- footer --------------------------------- */
footer {
  padding: 30px 0 100px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 30px;
}
.footer__disclaimer {
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto 14px;
  text-align: center;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  font-size: 12px;
  color: var(--text-faint);
}
.footer__links a { text-decoration: underline; text-underline-offset: 2px; }
.footer__links a:hover { color: var(--text-dim); }

/* toast */
.toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #15111f;
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6);
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
