/* SOHO Slot — minimal SOHO landing block.
 * One matte-glass frame, three reels, a tries counter and two buttons.
 * Visual language reuses the landing .glass panel tokens.
 */

:root {
  --slot-acid: #b4ff00;
  --slot-acid-faint: rgba(180, 255, 0, 0.24);
  --slot-glass-bg: rgba(16, 19, 25, 0.34);
  --slot-line: var(--line-strong);
  --slot-line-soft: rgba(233, 233, 242, 0.08);
  --slot-cell-h: clamp(220px, 32vh, 310px);
}

/* ---------------- background ---------------- */

.slot-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.slot-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(5, 6, 8, 0.62);
}

/* ---------------- page ---------------- */

.slot-main {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(64px, 9vh, 96px) 20px 44px;
  overflow-x: clip;
}

.slot-stage {
  width: min(100%, 920px);
  margin-inline: auto;
  text-align: center;
}

/* ---------------- header copy ---------------- */

.slot-copy {
  margin-bottom: clamp(20px, 3vh, 30px);
}

.slot-copy .section-label {
  margin-bottom: 12px;
}

.slot-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
}

.slot-sub {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* live GTD counter — server-authoritative, refreshed by polling */
.slot-gtd-label {
  color: var(--slot-acid);
  transition: color 200ms ease;
}

.slot-gtd-label.is-low {
  color: #ffe066;
}

.slot-gtd-label.is-empty {
  color: var(--faint);
}

.slot-gtd-label.is-empty #slot-gtd-num {
  animation: slot-blip 600ms ease-in-out;
}

@keyframes slot-blip {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------------- main glass frame ---------------- */

.slot-machine {
  position: relative;
  width: min(880px, calc(100vw - 48px));
  margin-inline: auto;
  border-radius: 14px;
  border: 1px solid var(--slot-line);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 38%, rgba(255, 255, 255, 0) 62%),
    var(--slot-glass-bg);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow:
    0 30px 60px -24px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: clamp(24px, 3vw, 32px);
  text-align: left;
}

/* ---------------- reels ---------------- */

.slot-reels {
  position: relative;
  display: flex;
  gap: 0;
  height: var(--slot-cell-h);
  background: rgba(3, 5, 8, 0.92);
  border: 1px solid rgba(233, 233, 242, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.slot-reel {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 20%),
    linear-gradient(180deg, rgba(11, 14, 19, 0.92) 0%, rgba(4, 6, 9, 0.96) 100%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.slot-reel-sep {
  flex: 0 0 auto;
  width: 2px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0%, rgba(10, 13, 18, 0.92) 100%);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
}

.slot-reel-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

/* ---------------- symbols ---------------- */

.slot-cell {
  height: var(--slot-cell-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-cell-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slot-symbol-img {
  display: block;
  width: 80%;
  height: 80%;
  object-fit: contain;
  object-position: center;
}

/* ---------------- payline ---------------- */

.slot-payline {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: rgba(233, 233, 242, 0.08);
  z-index: 3;
  pointer-events: none;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.slot-machine.is-win .slot-payline {
  background: var(--slot-acid);
  box-shadow: 0 0 12px rgba(180, 255, 0, 0.45);
}

.slot-payline-chip {
  position: absolute;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 0.26em;
  color: var(--faint);
  opacity: 0;
  transition: opacity 180ms ease, color 180ms ease;
}

.slot-machine.is-win .slot-payline-chip {
  opacity: 1;
  color: var(--slot-acid);
}

/* ---------------- control bar ---------------- */

.slot-controls {
  margin-top: clamp(18px, 2.4vw, 24px);
  padding-top: 18px;
  border-top: 1px solid var(--slot-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.slot-tries {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.slot-tries-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.slot-tries-number {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.slot-actions {
  display: flex;
  gap: 10px;
}

/* buttons — landing language (radius 10, .16em caps, 12px) */
.slot-btn {
  appearance: none;
  height: 52px;
  padding: 0 22px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease, opacity 200ms ease;
}

.slot-btn--primary {
  background: var(--slot-acid);
  border: 1px solid var(--slot-acid);
  color: #0a0c10;
}

.slot-btn--primary:hover:not(:disabled) {
  background: #c9ff3d;
  border-color: #c9ff3d;
  transform: translateY(-1px);
}

.slot-btn--ghost {
  background: transparent;
  border: 1px solid var(--slot-line);
  color: var(--muted);
}

.slot-btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(233, 233, 242, 0.28);
  color: var(--text);
}

.slot-btn:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* ---------------- status / disclaimer ---------------- */

.slot-status {
  margin-top: 14px;
  min-height: 18px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.slot-status.is-error {
  color: #ff9a9a;
}

.slot-status.is-good {
  color: var(--slot-acid);
}

.slot-disclaimer {
  margin-top: 14px;
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------------- turnstile ---------------- */

.slot-turnstile {
  display: flex;
  justify-content: center;
  margin: 14px auto 0;
}

.slot-turnstile:empty {
  display: none;
}

/* ---------------- win / lose ---------------- */

.slot-machine.is-win {
  border-color: var(--slot-acid-faint);
  animation: slot-vibrate 340ms ease-in-out;
}

@keyframes slot-vibrate {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, 1px); }
}

.slot-machine.is-lose {
  animation: slot-shake 300ms ease-in-out;
}

@keyframes slot-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  45% { transform: translateX(2px); }
  70% { transform: translateX(-1px); }
}

.slot-machine.is-win .slot-cell.is-hit .slot-symbol-img {
  filter: drop-shadow(0 0 12px rgba(180, 255, 0, 0.5));
}

/* ---------------- modals ---------------- */

.slot-modal {
  max-width: 460px;
  text-align: center;
  background: rgba(13, 16, 20, 0.78);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: 1px solid var(--slot-line);
  border-radius: 16px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.slot-modal-kicker {
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--faint);
  text-transform: uppercase;
}

.slot-modal-kicker--acid {
  color: var(--slot-acid);
}

.slot-modal-title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text);
}

.slot-modal-sub {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.slot-claim-form {
  margin-top: 26px;
  text-align: left;
}

.slot-claim-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--faint);
  margin-bottom: 10px;
}

.slot-wallet {
  width: 100%;
}

.slot-form-err {
  min-height: 16px;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff9a9a;
}

.slot-claim-form .wl-btn {
  width: 100%;
}

.slot-claim-note {
  margin-top: 12px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}

.slot-referral {
  margin-top: 26px;
  text-align: left;
}

.slot-referral-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--faint);
  margin-bottom: 10px;
}

.slot-referral-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  background: rgba(8, 10, 13, 0.7);
  border: 1px solid var(--slot-line);
  border-radius: 10px;
  padding: 12px 14px;
  word-break: break-all;
}

.slot-referral-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.slot-referral-actions .wl-btn {
  justify-content: center;
  display: flex;
  align-items: center;
  text-align: center;
}

.slot-modal-close {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--faint);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 22px;
  padding: 10px;
  cursor: pointer;
}

.slot-modal-close:hover {
  color: var(--text);
}

/* ---------------- WIN → SHARE modal ---------------- */

.share-wallet {
  display: inline-flex;
  margin-top: 16px;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--slot-acid);
  background: rgba(9, 11, 14, 0.62);
  border: 1px solid var(--slot-line);
  border-radius: 10px;
}

/* 16:9 winner-art preview. Tries assets/share/gtd-winner.png when present;
 * without it a CSS placeholder renders (no broken-image icon). */
.share-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--slot-line);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(180, 255, 0, 0.12) 0%, rgba(180, 255, 0, 0) 55%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 45%),
    var(--slot-glass-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-preview-caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(5, 6, 8, 0.6);
  border: 1px solid rgba(180, 255, 0, 0.28);
  border-radius: 6px;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--slot-acid);
  pointer-events: none;
}

.share-preview:not(.has-img) .share-preview-caption {
  position: static;
  background: rgba(5, 6, 8, 0.45);
}

.share-actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.share-actions .wl-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.share-post-btn {
  background: var(--slot-acid);
  border: 1px solid var(--slot-acid);
  color: #0a0c10;
}

.share-post-btn:hover {
  background: #c9ff3d;
  border-color: #c9ff3d;
  color: #0a0c10;
}

/* tiny claimed-state affordance — reopens ONLY the share modal */
.share-win-cta {
  appearance: none;
  display: block;
  margin: 10px auto 0;
  background: transparent;
  border: 0;
  color: var(--faint);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 160ms ease;
}

.share-win-cta:hover {
  color: var(--slot-acid);
}

.share-win-cta[hidden] {
  display: none;
}

/* ---------------- responsive ---------------- */

@media (max-width: 780px) {
  .slot-machine {
    width: calc(100vw - 32px);
    padding: 22px 18px;
    --slot-cell-h: clamp(180px, 30svh, 240px);
  }

  .slot-controls {
    margin-top: 16px;
    padding-top: 16px;
  }
}

@media (max-width: 420px) {
  .slot-machine {
    --slot-cell-h: clamp(160px, 27svh, 210px);
    padding: 18px 14px;
  }

  .slot-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .slot-tries {
    justify-content: center;
  }

  .slot-actions {
    flex-direction: column;
    gap: 10px;
  }

  .slot-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slot-machine.is-win,
  .slot-machine.is-lose {
    animation: none;
  }

  .slot-reel-strip {
    transition: none !important;
    filter: none !important;
  }
}

/* ---------------- bonus toast ---------------- */

.slot-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 8px);
  z-index: 60;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--slot-acid-faint);
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.8);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slot-acid);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.slot-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .slot-toast {
    transition: none;
  }
}
