/* ── Slot Machine Pull — retro arcade neon ──────────────────────────
   Pitch black with neon grid horizon, chrome cabinet with glowing
   tube outline, ivory reels, neon-sign headline, lever CTA. */

:root {
  --black: #060608;
  --pink: #ff3d9a;
  --cyan: #2de2e6;
  --ivory: #fdf8ec;
  --chrome-hi: #d9dde3;
  --chrome-lo: #7d838d;
  --ink: #1d1b24;
  --ink-soft: #736f80;
  --card: #f6f4fb;
  --line: #e2def0;
  --err: #ff4d6d;
  --font-neon: 'Bungee', cursive;
  --font-body: 'Space Grotesk', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { position: relative; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

.wrap { position: relative; width: 100%; max-width: 520px; margin: 0 auto; padding: 0 20px; z-index: 2; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Neon grid horizon ────────────────────────────────────────────── */
.neon-grid {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42vh;
  background:
    linear-gradient(transparent 0%, rgba(255, 61, 154, 0.14) 100%),
    repeating-linear-gradient(0deg, rgba(45, 226, 230, 0.22) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(45, 226, 230, 0.22) 0 1px, transparent 1px 44px);
  transform: perspective(300px) rotateX(38deg);
  transform-origin: bottom;
  pointer-events: none;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 48px 0 24px; }

.neon-sign {
  font-family: var(--font-neon);
  font-size: clamp(2.6rem, 12vw, 4.2rem);
  line-height: 0.98;
  color: var(--pink);
  text-shadow:
    0 0 6px rgba(255, 61, 154, 0.9),
    0 0 22px rgba(255, 61, 154, 0.65),
    0 0 60px rgba(255, 61, 154, 0.4);
  animation: neonflicker 4.5s linear infinite;
}

@keyframes neonflicker {
  0%, 100% { opacity: 1; }
  3% { opacity: 0.6; }
  5% { opacity: 1; }
  52% { opacity: 1; }
  54% { opacity: 0.75; }
  56% { opacity: 1; }
}

.hero .sub { margin-top: 14px; color: var(--cyan); font-weight: 600; letter-spacing: 0.06em; }

/* ── Notes ────────────────────────────────────────────────────────── */
.note {
  margin: 18px 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(253, 248, 236, 0.08);
  border: 1px solid rgba(45, 226, 230, 0.4);
  text-align: center;
}

/* ── Cabinet ──────────────────────────────────────────────────────── */
.cabinet {
  position: relative;
  background: linear-gradient(160deg, var(--chrome-hi), var(--chrome-lo));
  border-radius: 22px;
  padding: 18px;
  box-shadow:
    0 0 0 2px rgba(45, 226, 230, 0.7),
    0 0 28px rgba(45, 226, 230, 0.35),
    0 24px 60px rgba(0, 0, 0, 0.7);
  margin-bottom: 22px;
}

.reel-window {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #14121c;
  border-radius: 14px;
  padding: 14px;
}

.reel {
  height: 110px;
  background: linear-gradient(180deg, #e8e2d0 0%, var(--ivory) 30%, var(--ivory) 70%, #e8e2d0 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, 0.25), inset 0 -6px 10px rgba(0, 0, 0, 0.25);
}

.reel-sym { font-size: 3.2rem; line-height: 1; }

.reel.spinning .reel-sym { animation: reelblur 0.09s linear infinite; }

@keyframes reelblur {
  0%   { transform: translateY(-46%); filter: blur(2px); }
  100% { transform: translateY(46%); filter: blur(2px); }
}

.reel.landed .reel-sym { animation: reelbounce 0.4s ease; }

@keyframes reelbounce {
  0% { transform: translateY(-24%); }
  60% { transform: translateY(8%); }
  100% { transform: translateY(0); }
}

.payline {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  box-shadow: 0 0 12px rgba(255, 61, 154, 0.8);
  pointer-events: none;
}

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  color: var(--ink);
  border-radius: 16px;
  padding: 26px 24px 28px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}

.card h2 {
  font-family: var(--font-neon);
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 18px;
}

/* Fields */
.field { margin-bottom: 14px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label {
  display: block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--pink); }
input.error { border-color: var(--err); }
input::placeholder { color: var(--ink-soft); opacity: 0.7; }

.fine { margin-top: 12px; text-align: center; color: var(--ink-soft); font-size: 0.85rem; }

.form-error { color: var(--err); font-weight: 700; text-align: center; margin-top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-neon);
  font-size: 0.95rem;
  padding: 16px 30px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  line-height: 1.2;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(3px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(120deg, var(--pink), #c21f70);
  color: #fff;
  box-shadow: 0 6px 0 #8a1450, 0 0 24px rgba(255, 61, 154, 0.5);
}

.btn-primary:active:not(:disabled) { box-shadow: 0 2px 0 #8a1450; }

.lever-knob {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, var(--cyan) 60%);
  box-shadow: 0 0 10px rgba(45, 226, 230, 0.9);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
}

.btn-block { width: 100%; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Result ───────────────────────────────────────────────────────── */
.result-card { text-align: center; margin-top: 12px; }

.result-kicker {
  font-family: var(--font-neon);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.win-kicker { color: var(--pink); text-shadow: 0 0 12px rgba(255, 61, 154, 0.5); }
.lose-kicker { color: var(--ink-soft); }

.result-card h2 { font-family: var(--font-neon); font-size: 1.4rem; }

.code-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 6px;
  flex-wrap: wrap;
}

.code {
  font-family: var(--font-neon);
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  background: var(--black);
  color: var(--cyan);
  padding: 10px 22px;
  border-radius: 8px;
  text-shadow: 0 0 10px rgba(45, 226, 230, 0.7);
}

.qr-wrap { margin: 16px 0 6px; }

.qr-wrap img { width: 150px; height: 150px; border-radius: 8px; border: 4px solid var(--black); }

.qr-note { color: var(--ink-soft); font-size: 0.88rem; margin-top: 8px; }

.expiry { color: var(--err); font-weight: 700; font-size: 0.9rem; margin-top: 12px; }

.result-note { color: var(--ink-soft); margin-top: 12px; font-size: 0.92rem; }

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  text-align: center;
  padding: 24px 20px;
  color: rgba(253, 248, 236, 0.55);
  font-size: 0.85rem;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .field-grid { grid-template-columns: 1fr; }
  .reel { height: 88px; }
  .reel-sym { font-size: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .neon-sign { animation: none; }
}
