:root {
  --bg: #07111f;
  --panel: rgba(10, 18, 35, 0.72);
  --stroke: rgba(255, 255, 255, 0.09);
  --text: #f6f8ff;
  --muted: #a9b6d3;
  --gold: #ffce6b;
  --gold-strong: #ff9f43;
  --teal: #4ce0d2;
  --blue: #6b8cff;
  --danger: #ff6b7a;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(255, 0, 140, 0.12), transparent 28%),
    radial-gradient(circle at top left, rgba(255, 170, 0, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 82, 156, 0.16), transparent 30%),
    linear-gradient(180deg, #220312 0%, #3a0721 38%, #13030b 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%);
}
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  border-radius: 24px;
  padding: 20px 22px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--stroke);
  outline: none;
}
textarea:focus, .upload-dropzone:focus-within {
  border-color: rgba(255, 206, 107, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 206, 107, 0.12);
}
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.section { position: relative; padding: 48px 0 56px; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(5, 11, 21, 0.7);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-wrap {
  min-height: 82px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text);
}
.brand img { border-radius: 18px; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,0.24); }
.brand span, .brand small { display: block; }
.brand span { font-weight: 800; letter-spacing: 0.08em; }
.brand small { color: var(--muted); letter-spacing: 0.24em; font-size: 0.72rem; }
.nav { display: flex; flex-wrap: wrap; gap: 10px; }
.nav a, .hero-points span, .panel-badge {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.94rem;
}
.hero-grid, .grid, .wheel-layout, .wheel-main-grid { display: grid; gap: 24px; }
.hero-grid, .two-col { grid-template-columns: 1.2fr 0.8fr; }
.wheel-main-grid { grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr); }
.wheel-layout { grid-template-columns: 1fr; align-items: start; }
.hero { padding-top: 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 16px; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; font-weight: 700;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1.05; margin-bottom: 18px; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; margin-bottom: 14px; }
h3 { font-size: 1.2rem; margin-bottom: 14px; }
.lead, .section-head p, .metric-block p, .winner-box small, .tips-list, .muted-copy { color: var(--muted); line-height: 1.7; }
.hero-actions, .panel-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-actions { margin: 30px 0 24px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 16px; font-weight: 700; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #08111d;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-strong) 100%);
  box-shadow: 0 18px 40px rgba(255, 159, 67, 0.28);
}
.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
}
.glass, .panel {
  border-radius: 28px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero-card, .panel, .wheel-layout { padding: 28px; }
.stat-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.stat-grid article, .winner-box {
  padding: 18px; border-radius: 20px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
}
.stat-grid span { display: block; font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.stat-grid small, .winner-label { color: var(--muted); }
.section-head.left { max-width: 760px; margin-bottom: 24px; }
.upload-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 220px; padding: 24px; border-radius: 24px;
  border: 1.5px dashed rgba(255,255,255,0.16); background: rgba(255,255,255,0.03); text-align: center;
}
.upload-dropzone input { display: none; }
.upload-title { font-size: 1.1rem; font-weight: 700; }
.top-gap { margin-top: 18px; }
.thumb-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 18px;
}
.thumb-card {
  overflow: hidden; border-radius: 18px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
}
.thumb-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.thumb-card p {
  margin: 0; padding: 10px 12px 12px; font-size: 0.84rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tips-list { padding-left: 18px; margin-bottom: 0; }
.field-label, .panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; font-weight: 700;
}
.panel-head.stacked { align-items: flex-start; }
.participant-list {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px; min-height: 220px;
}
.participant-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
}
.participant-chip.secret span,
.participant-chip.secret button { letter-spacing: 0.16em; }
.participant-chip button {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 107, 122, 0.14); color: #ffd6db;
}
.empty-state { color: var(--muted); }
.number-map {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.number-map__title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.number-map__row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.number-map__row strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,206,107,0.2), rgba(255,159,67,0.14));
  color: #fff3cf;
}
.number-map__row span {
  color: var(--text);
  word-break: break-word;
}
.dream-wheel-stage {
  position: relative;
  overflow: visible;
  background:
    radial-gradient(circle at center, rgba(255, 0, 149, 0.12), transparent 42%),
    radial-gradient(circle at 20% 20%, rgba(255, 206, 107, 0.14), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(255, 82, 156, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}
.roulette-machine-full {
  display: grid;
  gap: 22px;
}
.roulette-machine {
  position: relative;
  display: grid;
  gap: 14px;
  align-items: center;
  justify-items: center;
  padding: 18px 14px 8px;
}
.slot-aura {
  position: absolute;
  inset: 4% 2%;
  border-radius: 44px;
  background:
    radial-gradient(circle at center, rgba(255, 80, 181, 0.34), transparent 36%),
    radial-gradient(circle at center, rgba(255, 206, 107, 0.26), transparent 60%),
    radial-gradient(circle at center, rgba(255,255,255,0.18), transparent 18%);
  filter: blur(24px);
  pointer-events: none;
}
.slot-topbar {
  width: min(92%, 520px);
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff0b5 0%, #ffbf3e 38%, #b8650b 100%);
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.4), 0 12px 18px rgba(0,0,0,0.18);
}
.slot-shell {
  position: relative;
  width: min(100%, 980px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 12px;
}
.slot-edge {
  position: relative;
  min-height: 236px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff4bf 0%, #ffd15e 18%, #f3a821 48%, #b96a08 100%);
  box-shadow:
    inset 0 4px 10px rgba(255,255,255,0.48),
    inset 0 -14px 20px rgba(112,56,0,0.34),
    0 24px 42px rgba(0,0,0,0.26);
}
.slot-edge::after {
  content: "";
  position: absolute;
  inset: 12px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02));
}
.slot-reels {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 18px;
  border-radius: 46px;
  background:
    linear-gradient(180deg, rgba(90, 8, 38, 0.98), rgba(33, 4, 14, 1)),
    radial-gradient(circle at top, rgba(255,255,255,0.14), transparent 55%);
  border: 2px solid rgba(255,206,107,0.34);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.14),
    inset 0 -36px 56px rgba(0,0,0,0.34),
    0 0 56px rgba(255, 0, 128, 0.22),
    0 40px 86px rgba(0,0,0,0.4);
}
.slot-reels::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 32px;
  border: 1px solid rgba(255, 206, 107, 0.14);
  pointer-events: none;
}
.slot-column {
  position: relative;
  min-width: 0;
  padding: 12px;
  border-radius: 34px;
  background: linear-gradient(180deg, #fff1bb 0%, #ffc84d 24%, #cf7c10 70%, #9c5208 100%);
  box-shadow:
    inset 0 3px 7px rgba(255,255,255,0.46),
    inset 0 -12px 16px rgba(120,60,0,0.24),
    0 14px 24px rgba(0,0,0,0.22);
}
.slot-window {
  position: relative;
  height: 96px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 30% 16%, rgba(255,255,255,1), rgba(255,255,255,1) 26%, rgba(254,241,228,0.98) 56%, rgba(224,184,150,0.94) 100%);
  border: 2px solid rgba(108, 34, 0, 0.14);
  box-shadow:
    inset 0 18px 30px rgba(255,255,255,0.88),
    inset 0 -30px 34px rgba(138,74,16,0.24),
    inset 18px 0 24px rgba(255,255,255,0.16),
    inset -18px 0 24px rgba(146, 89, 38, 0.12),
    0 10px 22px rgba(0,0,0,0.1);
}
.slot-window::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.02) 58%, rgba(115,66,18,0.12) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.16), transparent 28%, transparent 72%, rgba(136,77,18,0.08));
}
.slot-window::after {
  content: "";
  position: absolute;
  inset: 6px 10px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.2) 0%, transparent 58%, rgba(122,66,18,0.08) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.3), transparent 22%, transparent 78%, rgba(115,66,18,0.08));
  pointer-events: none;
}
.roulette-window-center {
  box-shadow: inset 0 10px 18px rgba(255,255,255,0.55), inset 0 -18px 24px rgba(138,74,16,0.18), 0 0 24px rgba(255,206,107,0.18);
}
.reel-track {
  position: absolute;
  inset: 0;
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  z-index: 3;
}
.reel-item {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  text-align: center;
  color: #cf121c;
  text-shadow: 0 1px 0 rgba(255,255,255,0.42);
  overflow: visible;
  border-bottom: 1px solid rgba(123, 37, 9, 0.08);
  background:
    linear-gradient(90deg, rgba(120,70,24,0.08) 0%, rgba(255,255,255,0.02) 18%, rgba(255,255,255,0.02) 82%, rgba(120,70,24,0.08) 100%);
}
.reel-item span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #d7181f;
  -webkit-text-stroke: 2px #2d0506;
  text-shadow: 0 2px 0 rgba(255,255,255,0.35), 0 4px 10px rgba(0,0,0,0.16);
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.slot-handle {
  position: relative;
  justify-self: center;
  width: 78px;
  height: 196px;
  background: transparent;
  padding: 0;
  border: 0;
  cursor: pointer;
}
.slot-handle:disabled { cursor: not-allowed; opacity: 0.7; }
.slot-handle-stem {
  position: absolute;
  top: 28px;
  left: 50%;
  width: 16px;
  height: 120px;
  transform: translateX(-50%) translateY(0);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff0b5 0%, #ffbf3e 38%, #b8650b 100%);
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.4), 0 10px 22px rgba(0,0,0,0.24);
}
.slot-handle-knob {
  position: absolute;
  top: 0;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translateX(-50%) translateY(0);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb0b0, #d31717 58%, #7d0505 100%);
  box-shadow: inset 0 4px 8px rgba(255,255,255,0.25), 0 14px 26px rgba(0,0,0,0.28);
}
.slot-handle-base {
  position: absolute;
  bottom: 14px;
  left: 50%;
  width: 56px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff0b5 0%, #ffbf3e 38%, #b8650b 100%);
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.4), 0 10px 18px rgba(0,0,0,0.2);
}
@keyframes lever-pull {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  28% {
    transform: translateX(-50%) translateY(42px);
  }
  52% {
    transform: translateX(-50%) translateY(18px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

.slot-handle.is-spinning .slot-handle-knob,
.slot-handle.is-spinning .slot-handle-stem {
  animation: lever-pull 620ms cubic-bezier(0.2, 0.9, 0.25, 1) 1;
}
.slot-base {
  width: min(76%, 420px);
  height: 18px;
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(180deg, #fff0b5 0%, #ffbf3e 38%, #b8650b 100%);
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.4), 0 16px 24px rgba(0,0,0,0.2);
}
.wheel-controls { display: none; }
.winner-box { text-align: center; }
.winner-box h3 { font-size: clamp(1.5rem, 3vw, 2.4rem); margin-bottom: 10px; }
.winner-box-hero {
  padding: 28px;
  background: linear-gradient(135deg, rgba(255,206,107,0.28), rgba(255,0,128,0.12));
  border: 1px solid rgba(255,206,107,0.42);
  box-shadow: 0 24px 50px rgba(255, 159, 67, 0.18), 0 0 32px rgba(255, 0, 140, 0.12);
}
.winner-box-bottom {
  width: min(100%, 760px);
  margin: 0 auto;
}
.winner-actions {
  width: min(100%, 760px);
  margin: 0 auto;
  justify-content: center;
}
.winner-actions .btn {
  min-width: 260px;
}
.winner-box-hero h3 {
  font-family: "Arial Black", "Inter", sans-serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.04;
  color: #fff8e6;
  text-shadow: 0 2px 0 rgba(146, 66, 0, 0.34), 0 0 14px rgba(255, 206, 107, 0.18);
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.column { flex-direction: column; }
.filters-panel { display: grid; gap: 16px; align-content: start; }
.toggle-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}
.toggle-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--gold-strong);
}
.toggle-row strong {
  display: block;
  margin-bottom: 4px;
}
.toggle-row small {
  color: var(--muted);
  line-height: 1.55;
}
.bg-orb, .bg-grid { position: fixed; pointer-events: none; z-index: -2; }
.bg-orb { width: 420px; height: 420px; border-radius: 50%; filter: blur(80px); opacity: 0.32; }
.orb-1 { top: 40px; left: -120px; background: rgba(107, 140, 255, 0.42); }
.orb-2 { right: -120px; top: 260px; background: rgba(255, 159, 67, 0.26); }
.bg-grid {
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
  z-index: -3;
}
@media (max-width: 980px) {
  .hero-grid, .two-col, .wheel-main-grid, .wheel-layout { grid-template-columns: 1fr; }
  .nav-wrap { padding: 12px 0; align-items: flex-start; flex-direction: column; }
  .wheel-controls,
  .filters-panel { order: 2; }
}
@media (max-width: 1100px) {
  .number-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .container { width: min(100% - 18px, 1180px); }
  .section { padding: 28px 0 36px; }
  .hero { padding-top: 26px; }
  .hero-card, .panel, .wheel-layout { padding: 16px; }
  .nav { width: 100%; }
  .nav a { flex: 1 1 calc(50% - 10px); text-align: center; }
  h1 { font-size: clamp(1.85rem, 9vw, 2.5rem); }
  h2 { font-size: clamp(1.45rem, 8vw, 2rem); }
  .hero-actions,
  .hero-points,
  .panel-actions,
  .winner-actions { flex-direction: column; }
  textarea {
    min-height: 210px;
    padding: 16px;
    border-radius: 18px;
  }
  .stat-grid { grid-template-columns: 1fr; }
  .btn, .panel-actions .btn, .winner-actions .btn { width: 100%; min-width: 0; }
  .upload-dropzone {
    min-height: 170px;
    padding: 16px;
    border-radius: 18px;
  }
  .thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .participant-list { min-height: auto; }
  .participant-chip {
    width: 100%;
    justify-content: space-between;
    border-radius: 18px;
    padding: 12px 14px;
  }
  .roulette-machine {
    padding: 8px 2px 4px;
  }
  .slot-topbar {
    width: min(94%, 340px);
    height: 12px;
  }
  .slot-shell {
    width: 100%;
    grid-template-columns: 10px minmax(0, 1fr) 44px;
    gap: 4px;
  }
  .slot-edge {
    min-height: 132px;
  }
  .slot-reels {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 4px;
    border-radius: 20px;
  }
  .slot-column {
    min-width: 0;
    padding: 4px;
    border-radius: 14px;
  }
  .slot-window {
    height: 64px;
    border-radius: 14px;
  }
  .reel-item {
    height: 64px;
    padding: 0 2px;
  }
  .reel-item span {
    font-size: 1rem;
    -webkit-text-stroke: 0.8px #2d0506;
  }
  .slot-handle {
    width: 44px;
    height: 128px;
  }
  .slot-handle-stem {
    top: 24px;
    width: 8px;
    height: 76px;
  }
  .slot-handle-knob {
    width: 30px;
    height: 30px;
  }
  .slot-handle-base {
    width: 34px;
    height: 16px;
    bottom: 10px;
  }
  .slot-base {
    width: min(72%, 260px);
    height: 12px;
  }
  .winner-box-bottom,
  .winner-actions {
    width: 100%;
  }
  .winner-box-hero {
    padding: 18px;
    border-radius: 16px;
  }
  .winner-box-hero h3 { font-size: clamp(1.35rem, 7vw, 2rem); }
  .filters-panel { gap: 12px; }
  .toggle-row {
    padding: 12px;
    border-radius: 14px;
  }
  .number-map {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 14px); }
  .site-header { position: static; }
  .brand img {
    width: 42px;
    height: 42px;
  }
  .brand { gap: 10px; }
  .brand span { font-size: 0.92rem; }
  .brand small { font-size: 0.62rem; }
  .nav a {
    flex: 1 1 100%;
    font-size: 0.84rem;
    padding: 8px 10px;
  }
  .hero-points span,
  .panel-badge {
    width: 100%;
    text-align: center;
  }
  .thumb-grid { grid-template-columns: 1fr 1fr; }
  .slot-shell {
    grid-template-columns: 6px minmax(0, 1fr) 38px;
    gap: 3px;
  }
  .slot-reels {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 6px 3px;
  }
  .slot-window {
    height: 52px;
    border-radius: 12px;
  }
  .reel-item {
    height: 52px;
  }
  .reel-item span {
    font-size: 0.9rem;
    -webkit-text-stroke: 0.7px #2d0506;
  }
  .slot-edge {
    min-height: 108px;
  }
  .slot-handle {
    width: 38px;
    height: 112px;
  }
  .slot-handle-stem {
    top: 18px;
    width: 7px;
    height: 66px;
  }
  .slot-handle-knob {
    width: 26px;
    height: 26px;
  }
}

/* ==================== RANDOM-SITE ADDITIONS ==================== */

/* ---- Two-layer background crossfade between modes ---- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.bg-layer-slot {
  background:
    radial-gradient(circle at center, rgba(255, 0, 140, 0.12), transparent 28%),
    radial-gradient(circle at top left, rgba(255, 170, 0, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 82, 156, 0.16), transparent 30%),
    linear-gradient(180deg, #220312 0%, #3a0721 38%, #13030b 100%);
}
.bg-layer-wheel {
  background:
    radial-gradient(circle at 30% 25%, rgba(76, 224, 210, 0.22), transparent 36%),
    radial-gradient(circle at 75% 70%, rgba(107, 140, 255, 0.22), transparent 32%),
    radial-gradient(circle at 50% 95%, rgba(255, 206, 107, 0.12), transparent 36%),
    linear-gradient(180deg, #04111e 0%, #062737 42%, #021018 100%);
}
body.theme-slot .bg-layer-slot   { opacity: 1; }
body.theme-slot .bg-layer-wheel  { opacity: 0; }
body.theme-wheel .bg-layer-slot  { opacity: 0; }
body.theme-wheel .bg-layer-wheel { opacity: 1; }
/* Override default body background — give it back to layers */
body { background: #07111f; }

/* ---- Mode switcher ---- */
.mode-switcher {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}
.mode-btn {
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  background: transparent;
  color: var(--muted);
  transition: background 0.25s ease, color 0.25s ease;
}
.mode-btn.is-active {
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  color: #07111d;
  box-shadow: 0 8px 22px rgba(255,159,67,0.32);
}

/* ---- Header buttons ---- */
.header-actions { display: flex; gap: 8px; }
.btn-ghost {
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 0.9rem;
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); }

/* ---- Mode visibility ---- */
body.theme-slot .mode-only-wheel,
body.theme-wheel .mode-only-slot { display: none !important; }

/* ---- Wheel mode-specific styles (from raffle-wheel-site) ---- */
.dream-wheel-stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 206, 107, 0.12), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(107, 140, 255, 0.12), transparent 26%),
    radial-gradient(circle at 50% 60%, rgba(27, 163, 129, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}
.wheel-scene {
  position: relative;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}
.dream-wheel-skin {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(6, 48, 43, 0.96), rgba(9, 63, 54, 0.92)),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 206, 107, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    inset 0 18px 32px rgba(255,255,255,0.04),
    inset 0 -28px 42px rgba(0,0,0,0.2);
}
.dream-wheel-pattern {
  position: relative;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(30deg, rgba(255,255,255,0.04) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.04) 87.5%),
    linear-gradient(150deg, rgba(255,255,255,0.04) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.04) 87.5%);
  background-size: 64px 38px, 64px 38px;
}
.pattern-badge {
  position: absolute;
  width: 30px; height: 30px;
  border-radius: 10px;
  background-image: url('./assets/logo.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.14;
}
.pattern-badge:nth-child(1) { top: 22px; left: 12%; transform: rotate(-10deg); }
.pattern-badge:nth-child(2) { top: 50%; left: 48%; transform: translate(-50%, -50%) rotate(8deg); }
.pattern-badge:nth-child(3) { right: 14%; bottom: 18px; transform: rotate(12deg); }
.wheel-wrap {
  position: relative;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,0.24), rgba(255,255,255,0.04) 30%, rgba(0,0,0,0.1) 72%),
    conic-gradient(from 180deg, rgba(255,206,107,0.2), rgba(107,140,255,0.12), rgba(76,224,210,0.12), rgba(255,206,107,0.2));
  box-shadow:
    inset 0 2px 18px rgba(255,255,255,0.14),
    inset 0 -30px 60px rgba(0,0,0,0.28),
    0 36px 90px rgba(0,0,0,0.42);
}
.wheel-wrap::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,206,107,0.4);
  pointer-events: none;
}
#wheelCanvas {
  width: 100%;
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 28px 54px rgba(0,0,0,0.36));
}
.wheel-pointer {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 48px solid var(--gold);
  z-index: 3;
  filter: drop-shadow(0 12px 22px rgba(255,206,107,0.4));
}
.wheel-pointer::after {
  content: "";
  position: absolute;
  left: -13px; top: -48px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7d8, #ffce6b 55%, #d88c1d 100%);
  box-shadow: 0 8px 16px rgba(0,0,0,0.28);
}
.wheel-controls { display: grid; gap: 18px; margin-top: 18px; }
.column { flex-direction: column; }
.btn.big { min-height: 60px; font-size: 1.1rem; }

/* ---- Locked state (until authorized) ---- */
body.is-locked .site-header,
body.is-locked main {
  filter: blur(2px) brightness(0.55);
  pointer-events: none;
  user-select: none;
}
body.is-locked .auth-overlay { pointer-events: auto; }

/* ---- Lock body scroll while ANY modal open ---- */
body.is-modal-open {
  overflow: hidden;
  /* iOS Safari: position fixed предотвращает rubber-band scroll фона */
  position: fixed;
  inset: 0;
  width: 100%;
}
.btn-ghost:disabled,
.mode-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Auth modal ---- */
[hidden] { display: none !important; }
.auth-overlay,
.cabinet-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 16, 0.78);
  backdrop-filter: blur(8px);
}
.cabinet-overlay { z-index: 110; }
.auth-card,
.cabinet-card {
  position: relative;
  width: min(420px, 100%);
  padding: 32px;
  border-radius: 28px;
  display: grid;
  gap: 18px;
  text-align: left;
}
.auth-card {
  width: min(380px, 100%);
  padding: 28px 28px 30px;
  text-align: center;
  background: linear-gradient(180deg, rgba(20,28,48,0.92), rgba(10,16,30,0.94));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 90px rgba(0,0,0,0.5);
}
.auth-card h2 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}
.auth-card .muted-copy {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.cabinet-card { width: min(560px, 100%); }
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}
.auth-brand img { border-radius: 14px; flex-shrink: 0; }
.auth-brand strong { display: block; font-weight: 800; letter-spacing: 0.06em; line-height: 1.1; }
.auth-brand small { color: var(--muted); letter-spacing: 0.18em; font-size: 0.7rem; }
#redeemForm {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
#redeemForm input[type="text"] {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-align: center;
}
#redeemForm .btn { width: 100%; height: 52px; min-height: 52px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.auth-card #openLeadBtn { width: 100%; height: 50px; min-height: 50px; }

.lead-card {
  width: min(420px, 100%);
}
.lead-card form {
  display: grid;
  gap: 10px;
}
.lead-card input[type="text"],
.lead-card input[type="tel"],
.lead-card textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--stroke);
  color: var(--text);
  font: inherit;
}
.lead-card textarea {
  min-height: 80px;
  resize: vertical;
}
.lead-card .btn { width: 100%; height: 50px; min-height: 50px; }
.lead-or {
  margin: 6px 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}
.tg-btn {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 136, 204, 0.18);
  border: 1px solid rgba(0, 136, 204, 0.45);
  color: #d4ecf9;
}
.tg-btn:hover { background: rgba(0, 136, 204, 0.28); }
.tg-btn-secondary {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border-radius: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 6px;
}
.tg-btn-secondary:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.lead-success {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(93, 223, 160, 0.14);
  border: 1px solid rgba(93, 223, 160, 0.34);
  color: #d0f6e0;
  font-size: 0.92rem;
  text-align: center;
}
#redeemForm input:focus {
  outline: none;
  border-color: rgba(255,206,107,0.6);
  box-shadow: 0 0 0 3px rgba(255,206,107,0.14);
}
.auth-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,107,122,0.12);
  border: 1px solid rgba(255,107,122,0.28);
  color: #ffd6db;
  font-size: 0.9rem;
}

/* ---- Cabinet modal ---- */
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}
.cabinet-head h2 { margin: 0 0 6px; }
.cabinet-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.cabinet-stats article {
  text-align: center;
  padding: 16px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
}
.cabinet-stats article span {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--gold);
}
.cabinet-stats article small {
  color: var(--muted);
  font-size: 0.78rem;
}
.cabinet-winners {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.cabinet-winners .winner-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
  font-size: 0.92rem;
}
.cabinet-winners .winner-row .at {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---- Spin animation enhancements ---- */
@keyframes flash-screen {
  0%   { opacity: 0; }
  20%  { opacity: 0.6; }
  100% { opacity: 0; }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 206, 107, 0.0), 0 24px 50px rgba(255, 159, 67, 0.18); }
  50%      { box-shadow: 0 0 60px 8px rgba(255, 206, 107, 0.35), 0 24px 50px rgba(255, 159, 67, 0.4); }
}
@keyframes winner-pop {
  0%   { transform: scale(0.92); opacity: 0; }
  60%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}

.dream-wheel-stage.is-spinning #wheelCanvas { filter: drop-shadow(0 28px 54px rgba(0,0,0,0.36)) blur(0.6px); }

.winner-box-hero.has-winner {
  animation: glow-pulse 2.4s ease-in-out 2;
}
.winner-box-hero.has-winner h3 {
  animation: winner-pop 0.6s cubic-bezier(0.18, 1.2, 0.4, 1) both;
  background: linear-gradient(135deg, #fff8e6, #ffce6b 60%, #ff9f43);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.screen-flash {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: radial-gradient(circle at center, rgba(255, 232, 180, 0.55), transparent 60%);
  pointer-events: none;
  animation: flash-screen 0.6s ease-out;
}

/* Mode switcher feedback */
.mode-btn.is-active {
  transform: scale(1.02);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Slot controls — retro 3D button under the machine */
.slot-controls {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
.btn-retro {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 320px);
  height: 70px;
  padding: 0 32px;
  border: 0;
  border-radius: 20px;
  font: 800 1.1rem 'Inter', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a1a00;
  cursor: pointer;
  background:
    linear-gradient(180deg, #ffe9a8 0%, #ffce6b 35%, #ff9f43 70%, #c95f0c 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.8),
    inset 0 -10px 0 rgba(0,0,0,0.18),
    0 8px 0 #6a2a0a,
    0 12px 24px rgba(0,0,0,0.5);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn-retro::before {
  content: '';
  position: absolute;
  inset: 6px 8px auto 8px;
  height: 18px;
  border-radius: 14px 14px 60% 60% / 18px 18px 100% 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0));
  pointer-events: none;
}
.btn-retro:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn-retro:active:not(:disabled),
.btn-retro.is-pressed {
  transform: translateY(6px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.5),
    inset 0 -4px 0 rgba(0,0,0,0.18),
    0 2px 0 #6a2a0a,
    0 4px 8px rgba(0,0,0,0.4);
}
.btn-retro:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.4),
    inset 0 -6px 0 rgba(0,0,0,0.18),
    0 4px 0 #6a2a0a,
    0 6px 12px rgba(0,0,0,0.4);
}

/* ---- Mobile tweaks ---- */
@media (max-width: 720px) {
  .nav-wrap { flex-wrap: wrap; gap: 12px; }
  .mode-switcher { width: 100%; justify-content: center; }
  .header-actions { width: 100%; justify-content: flex-end; }
  .hero-grid, .two-col, .wheel-main-grid { grid-template-columns: 1fr; }
  .wheel-scene { grid-template-rows: 60px minmax(0, 1fr) 60px; }
  .cabinet-stats { grid-template-columns: 1fr; }
  .auth-card, .cabinet-card { padding: 22px; }
}
@media (max-width: 640px) {
  .bg-orb, body::before { display: none; }
  .auth-overlay, .cabinet-overlay { backdrop-filter: none; }
  .glass, .panel { backdrop-filter: none; }
  .site-header { backdrop-filter: none; }
}

/* ---- Retro lamp slot machine — clean version ---- */
/* Hide the auras/strips that Дима didn't want */
.slot-aura,
.slot-topbar,
.slot-base { display: none !important; }
.roulette-machine,
.roulette-machine-full {
  background: transparent !important;
  box-shadow: none !important;
}

.slot-window {
  position: relative;
  border-width: 6px;
  border-style: solid;
  border-image: linear-gradient(180deg, #ffe9a8 0%, #ffce6b 35%, #ff9f43 65%, #8a3c0d 100%) 1;
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.55),
    inset 0 6px 12px rgba(0,0,0,0.6);
  background: linear-gradient(180deg, #1a0410 0%, #2c0716 50%, #1a0410 100%);
}
.slot-window::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 28%, transparent 72%, rgba(0,0,0,0.4) 100%);
  border-radius: inherit;
}

.reel-item {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  color: #ffce6b;
  text-shadow:
    0 0 16px rgba(255, 206, 107, 0.55),
    0 0 4px rgba(255, 159, 67, 0.85),
    0 2px 0 rgba(0,0,0,0.6);
  letter-spacing: 0.04em;
}

.slot-shell {
  position: relative;
  background: linear-gradient(180deg, #3a0816 0%, #1f0410 100%);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 36px rgba(0,0,0,0.45);
}

/* ---- Mobile optimisation: cheaper paint ---- */
@media (max-width: 640px) {
  .reel-item {
    text-shadow:
      0 0 6px rgba(255, 206, 107, 0.6),
      0 1px 0 rgba(0,0,0,0.6);
  }
  .slot-window {
    border-width: 4px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5), inset 0 4px 8px rgba(0,0,0,0.55);
  }
  .slot-shell {
    padding: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  }
  .btn-retro {
    height: 60px;
    font-size: 1rem;
    box-shadow:
      inset 0 2px 0 rgba(255,255,255,0.6),
      inset 0 -6px 0 rgba(0,0,0,0.18),
      0 6px 0 #6a2a0a;
  }
  .winner-box-hero.has-winner {
    animation: none;
  }
  .screen-flash {
    background: radial-gradient(circle at center, rgba(255, 232, 180, 0.4), transparent 60%);
  }
}

/* ---- Hero card v2 — living stats ---- */
.hero-card-eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero-card-title {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}
.hero-card-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-card .stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.hero-card .stat-grid article {
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 16px;
}
.stat-ico {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--gold);
  opacity: 0.85;
}
.hero-card .stat-grid article span:not(.stat-ico) {
  font-size: 1.6rem;
  margin-bottom: 2px;
}

.hero-last-winner {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 206, 107, 0.14), rgba(255, 159, 67, 0.06));
  border: 1px solid rgba(255, 206, 107, 0.28);
  display: grid;
  gap: 4px;
}
.hero-last-winner small {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-last-winner strong {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.hero-last-winner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .hero-card .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card .stat-grid article span:not(.stat-ico) { font-size: 1.4rem; }
}
