:root {
  --bg: #111827;
  --panel: #182235;
  --panel-soft: #22324d;
  --ink: #f9f3e7;
  --muted: #aebbd0;
  --gold: #e8bf62;
  --green: #35d084;
  --blue: #4eb3ff;
  --violet: #8b6cff;
  --pink: #ff6aa9;
  --danger: #ff6470;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Mali", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 22% 18%, rgba(78, 179, 255, 0.24), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(255, 106, 169, 0.2), transparent 26%),
    linear-gradient(135deg, #111827, #162033 50%, #102421);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

input,
select {
  font-size: 16px;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  width: min(1040px, calc(100% - 20px));
  margin: 0 auto;
  padding: 12px 0 22px;
  display: grid;
  gap: 12px;
}

.top-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.title-block {
  display: grid;
  gap: 10px;
}

.back-link {
  width: max-content;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: rgba(249, 243, 231, 0.9);
  background: rgba(9, 16, 27, 0.44);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.35;
}

h1 {
  margin: 0;
  color: #fff8e8;
  font-size: 2.35rem;
  line-height: 1.22;
  letter-spacing: 0;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.status-pill {
  min-width: 78px;
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(9, 16, 27, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-pill span {
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1.12;
}

.status-pill small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.game-layout {
  display: grid;
  gap: 12px;
}

.input-panel,
.stage-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(34, 50, 77, 0.88), rgba(18, 28, 45, 0.96));
  box-shadow: 0 18px 34px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.input-panel {
  padding: 12px;
}

.names-field {
  display: grid;
  gap: 10px;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(249, 243, 231, 0.84);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.field-heading strong {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid rgba(232, 191, 98, 0.28);
  border-radius: 999px;
  color: #fff3bd;
  background: rgba(232, 191, 98, 0.11);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
}

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

.add-name-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 0.28fr);
  gap: 8px;
}

.add-name-form input {
  min-width: 0;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  outline: 0;
  padding: 0 14px;
  color: var(--ink);
  caret-color: var(--gold);
  background: rgba(6, 12, 22, 0.55);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.22);
  font-size: 1rem;
}

.add-name-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(78, 179, 255, 0.18), inset 0 2px 10px rgba(0, 0, 0, 0.22);
}

.add-name-form input::placeholder {
  color: rgba(249, 243, 231, 0.48);
}

.add-btn {
  min-height: 54px;
  border: 0;
  border-radius: 10px;
  color: #171107;
  background: linear-gradient(180deg, #fff0a8, var(--gold));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  font-weight: 600;
  line-height: 1.25;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.add-btn:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-2px);
}

.add-btn:disabled {
  opacity: 0.55;
}

.name-editor-list {
  max-height: min(48vh, 500px);
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(6, 12, 22, 0.42);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.18);
  scrollbar-color: rgba(232, 191, 98, 0.55) rgba(255, 255, 255, 0.05);
}

.name-editor-list.is-empty {
  min-height: 112px;
  place-items: center;
  border-color: rgba(255, 106, 169, 0.44);
}

.editor-empty {
  color: rgba(249, 243, 231, 0.62);
  font-weight: 400;
}

.editor-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 58%),
    rgba(255, 255, 255, 0.06);
  animation: editorItemIn 260ms cubic-bezier(0.18, 0.86, 0.2, 1.18) both;
}

.editor-text {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(249, 243, 231, 0.92);
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.48;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.delete-name-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  color: #fff8e8;
  background: rgba(255, 100, 112, 0.18);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}

.delete-name-btn:hover:not(:disabled) {
  background: rgba(255, 100, 112, 0.34);
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.delete-name-btn:disabled {
  opacity: 0.55;
}

.name-editor-list::-webkit-scrollbar {
  width: 12px;
}

.name-editor-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.name-editor-list::-webkit-scrollbar-thumb {
  border: 3px solid rgba(6, 12, 22, 0.72);
  border-radius: 999px;
  background: rgba(232, 191, 98, 0.72);
}

.input-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.secondary-btn,
.random-btn {
  border: 0;
  border-radius: 10px;
  font-weight: 950;
  line-height: 1.25;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.secondary-btn {
  min-height: 46px;
  color: rgba(249, 243, 231, 0.92);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.secondary-btn:hover,
.random-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.stage-panel {
  position: relative;
  overflow: hidden;
  padding: 12px;
}

.stage {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.13), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(78, 179, 255, 0.22), transparent 44%),
    linear-gradient(145deg, rgba(11, 18, 32, 0.96), rgba(22, 18, 50, 0.98));
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  inset: 15px;
  pointer-events: none;
  border-radius: 10px;
}

.stage::before {
  border: 1px solid rgba(232, 191, 98, 0.42);
}

.stage::after {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  animation: stagePulse 3.4s ease-in-out infinite;
}

.stage-lights {
  position: absolute;
  inset: -20%;
  background:
    conic-gradient(from 0deg, transparent, rgba(78, 179, 255, 0.24), transparent, rgba(255, 106, 169, 0.22), transparent);
  opacity: 0.66;
  animation: lightSweep 7s linear infinite;
}

.orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: orbitSpin 14s linear infinite;
}

.stage.is-spinning .orbit {
  animation: orbitSpin 2.3s linear infinite;
}

.stage.is-spinning .stage-lights {
  opacity: 0.94;
  animation: lightSweep 1.9s linear infinite;
}

.stage.is-final .stage-lights {
  animation: lightSweep 5s linear infinite;
}

.orbit-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 68px;
  max-width: 116px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 248, 232, 0.94);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(var(--angle) * -1));
}

.name-tunnel {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.name-comet {
  --from-x: 0px;
  --from-y: 0px;
  --to-x: 0px;
  --to-y: 0px;
  --delay: 0ms;
  --duration: 1400ms;
  --h: 200;
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: 132px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid hsla(var(--h), 90%, 68%, 0.46);
  border-radius: 999px;
  color: #fff8e8;
  background:
    linear-gradient(90deg, hsla(var(--h), 92%, 62%, 0.32), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 0 18px hsla(var(--h), 92%, 62%, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-size: 0.76rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translate(calc(-50% + var(--from-x)), calc(-50% + var(--from-y))) scale(0.45);
}

.stage.is-spinning .name-comet {
  animation: cometRush var(--duration) cubic-bezier(0.13, 0.78, 0.2, 1) var(--delay) infinite;
}

.reel-bank {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(92%, 450px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  transform: translate(-50%, -50%);
  opacity: 0.52;
  filter: blur(0.2px);
}

.reel-window {
  position: relative;
  height: 178px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(5, 9, 18, 0.95), rgba(20, 28, 48, 0.7), rgba(5, 9, 18, 0.95));
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.42),
    0 12px 26px rgba(0, 0, 0, 0.28);
}

.stage.is-spinning .reel-window {
  border-color: rgba(78, 179, 255, 0.36);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.42),
    0 12px 26px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(78, 179, 255, 0.18);
}

.reel-window::before,
.reel-window::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 42%;
  pointer-events: none;
}

.reel-window::before {
  top: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.94), transparent);
}

.reel-window::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(6, 10, 20, 0.94), transparent);
}

.reel-window span:nth-child(3n) {
  color: #90d8ff;
}

.reel-track {
  display: grid;
  grid-auto-rows: 46px;
  will-change: transform;
}

.reel-track span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: rgba(255, 248, 232, 0.92);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(78, 179, 255, 0.3);
}

.reel-window:nth-child(2) .reel-track span {
  color: #fff0a8;
}

.stage.is-spinning .reel-bank {
  opacity: 0.94;
  filter: none;
  animation: reelBankHeat 520ms ease-in-out infinite alternate;
}

.stage.is-final .reel-bank {
  animation: reelBankFade 620ms ease both;
}

.scan-beam {
  position: absolute;
  z-index: 4;
  left: -30%;
  top: 0;
  width: 20%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.36), rgba(78, 179, 255, 0.34), transparent);
  transform: skewX(-16deg) translateX(-120%);
  opacity: 0;
  mix-blend-mode: screen;
}

.stage.is-spinning .scan-beam {
  opacity: 1;
  animation: scanStrike 760ms cubic-bezier(0.18, 0.8, 0.22, 1) infinite;
}

.winner-core {
  position: relative;
  z-index: 5;
  width: min(84%, 390px);
  min-height: 178px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 240, 168, 0.22), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 34px rgba(78, 179, 255, 0.12);
  backdrop-filter: blur(8px);
}

.winner-core::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(78, 179, 255, 0.74), rgba(255, 106, 169, 0.5), rgba(232, 191, 98, 0.78));
  opacity: 0;
  filter: blur(14px);
}

.result-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.winner-name {
  width: 100%;
  padding: 0 16px;
  color: #fff8e8;
  font-size: 2.25rem;
  font-weight: 950;
  line-height: 1.26;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 0 24px rgba(78, 179, 255, 0.42);
}

.stage.is-spinning .winner-core {
  animation: coreCharge 560ms ease-in-out infinite alternate;
}

.stage.is-spinning .winner-name {
  animation: nameFlicker 120ms steps(2, end) infinite;
}

.stage.is-final .winner-core {
  animation: finalPop 900ms cubic-bezier(0.17, 0.9, 0.2, 1.24) both;
}

.stage.is-final .winner-core::before {
  animation: winnerAura 1100ms ease both;
}

.shock-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 240, 168, 0.88);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  pointer-events: none;
}

.stage.is-final .shock-ring {
  animation: jackpotRing 900ms ease-out both;
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  margin: 12px 0;
  background: rgba(4, 9, 18, 0.52);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.meter div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--pink), var(--gold));
  box-shadow: 0 0 20px rgba(139, 108, 255, 0.5);
}

.random-btn {
  width: 100%;
  min-height: 64px;
  color: #171107;
  background: linear-gradient(180deg, #fff0a8, var(--gold));
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 1.2rem;
}

.random-btn:disabled {
  opacity: 0.58;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  --x: 0px;
  --y: 0px;
  --rot: 360deg;
  --delay: 0ms;
  position: absolute;
  left: 50%;
  top: 45%;
  width: 8px;
  height: 18px;
  border-radius: 2px;
  background: hsl(var(--h), 88%, 62%);
  transform: translate(-50%, -50%);
  animation: confettiBurst 1050ms cubic-bezier(0.16, 0.86, 0.18, 1) var(--delay) both;
}

.stage.is-spinning::before {
  animation: hotBorder 900ms ease-in-out infinite;
}

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

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

@keyframes cometRush {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--from-x)), calc(-50% + var(--from-y))) scale(0.35) rotate(-8deg);
    filter: blur(2px);
  }
  14% {
    opacity: 1;
  }
  55% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(1.18) rotate(2deg);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--to-x)), calc(-50% + var(--to-y))) scale(0.72) rotate(12deg);
    filter: blur(3px);
  }
}

@keyframes reelBankHeat {
  from {
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    transform: translate(-50%, -50%) scale(1.018);
  }
}

@keyframes reelBankFade {
  0% {
    opacity: 0.94;
    transform: translate(-50%, -50%) scale(1.02);
  }
  100% {
    opacity: 0.18;
    transform: translate(-50%, -50%) scale(0.94);
  }
}

@keyframes scanStrike {
  0% {
    transform: skewX(-16deg) translateX(-140%);
  }
  100% {
    transform: skewX(-16deg) translateX(760%);
  }
}

@keyframes stagePulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.9;
  }
}

@keyframes jackpotRing {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(16);
  }
}

@keyframes winnerAura {
  0% {
    opacity: 0;
  }
  42% {
    opacity: 1;
  }
  100% {
    opacity: 0.54;
  }
}

@keyframes hotBorder {
  0%,
  100% {
    border-color: rgba(232, 191, 98, 0.42);
    box-shadow: inset 0 0 0 rgba(232, 191, 98, 0);
  }
  50% {
    border-color: rgba(255, 106, 169, 0.82);
    box-shadow: inset 0 0 28px rgba(255, 106, 169, 0.16);
  }
}

@keyframes coreCharge {
  from {
    transform: scale(1);
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 0 34px rgba(78, 179, 255, 0.12);
  }
  to {
    transform: scale(1.035);
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.34),
      0 0 40px rgba(78, 179, 255, 0.2),
      inset 0 0 40px rgba(139, 108, 255, 0.18);
  }
}

@keyframes nameFlicker {
  0% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(2px);
  }
}

@keyframes finalPop {
  0% {
    transform: scale(0.82) rotate(-2deg);
  }
  46% {
    transform: scale(1.12) rotate(1deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes confettiBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.5);
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--rot)) scale(0.78);
  }
}

@keyframes editorItemIn {
  0% {
    opacity: 0;
    transform: translateY(-8px) rotateZ(-2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateZ(0);
  }
}

@media (min-width: 820px) {
  body {
    display: grid;
    place-items: center;
  }

  .app-shell {
    padding: 28px 0;
    gap: 18px;
  }

  .top-panel {
    align-items: end;
  }

  h1 {
    font-size: 4.2rem;
  }

  .game-layout {
    grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
    align-items: stretch;
    gap: 18px;
  }

  .input-panel,
  .stage-panel {
    padding: 18px;
  }

  .name-editor-list {
    max-height: 540px;
  }

  .stage {
    min-height: 482px;
  }

  .winner-name {
    font-size: 3.1rem;
  }
}

@media (max-width: 390px) {
  .top-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .status-pill {
    width: 100%;
  }

  .add-name-form {
    grid-template-columns: 1fr;
  }

  .name-editor-list {
    max-height: 430px;
  }

  .stage {
    min-height: 306px;
  }

  .winner-core {
    width: 88%;
    min-height: 160px;
  }

  .winner-name {
    font-size: 1.8rem;
  }
}

/* Slot-machine redesign */
.name-tunnel,
.scan-beam,
.orbit {
  display: none;
}

.stage {
  min-height: 410px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px 12px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 240, 168, 0.2), transparent 28%),
    radial-gradient(circle at 50% 58%, rgba(78, 179, 255, 0.24), transparent 46%),
    linear-gradient(145deg, rgba(9, 14, 25, 0.98), rgba(26, 20, 60, 0.98));
}

.slot-machine {
  position: relative;
  z-index: 4;
  width: min(96%, 520px);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(145deg, #263657, #121b31 64%, #0b101d);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -10px 24px rgba(0, 0, 0, 0.28);
}

.slot-machine::before,
.slot-machine::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff4b8 0 28%, #e8bf62 30% 54%, transparent 56%);
  background-size: 10px 28px;
  opacity: 0.82;
}

.slot-machine::before {
  left: 10px;
}

.slot-machine::after {
  right: 10px;
}

.stage.is-spinning .slot-machine::before,
.stage.is-spinning .slot-machine::after,
.stage.is-final .slot-machine::before,
.stage.is-final .slot-machine::after {
  animation: bulbChase 420ms steps(2, end) infinite;
}

.slot-marquee {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 16px 10px;
  padding: 0 12px;
  border-radius: 12px;
  color: #171107;
  background: linear-gradient(180deg, #fff1a8, #e8bf62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 8px 20px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.slot-marquee span,
.slot-marquee strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-marquee span {
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.2;
}

.slot-marquee strong {
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.2;
}

.slot-face {
  position: relative;
  margin: 0 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(4, 9, 18, 0.98), rgba(17, 25, 43, 0.95));
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.48);
}

.payline {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  z-index: 5;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 168, 0.95), rgba(255, 106, 169, 0.92), transparent);
  box-shadow: 0 0 18px rgba(255, 240, 168, 0.82);
  transform: translateY(-50%);
  pointer-events: none;
}

.reel-bank {
  position: relative;
  left: auto;
  top: auto;
  z-index: 3;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  transform: none;
  opacity: 1;
  filter: none;
}

.stage.is-spinning .reel-bank,
.stage.is-final .reel-bank {
  transform: none;
  opacity: 1;
  filter: none;
}

.stage.is-spinning .reel-bank {
  animation: slotBankShake 170ms ease-in-out infinite;
}

.stage.is-final .reel-bank {
  animation: slotBankSettle 680ms cubic-bezier(0.17, 0.9, 0.2, 1.24) both;
}

.reel-window {
  height: 150px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(1, 4, 10, 0.98), rgba(18, 30, 56, 0.72), rgba(1, 4, 10, 0.98));
}

.reel-window.is-stopped {
  border-color: rgba(255, 240, 168, 0.9);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(255, 240, 168, 0.38),
    0 12px 26px rgba(0, 0, 0, 0.28);
  animation: reelStopKick 360ms cubic-bezier(0.18, 0.86, 0.24, 1.32) both;
}

.reel-track {
  transition: transform 120ms linear;
}

.reel-window.is-stopped .reel-track {
  transition: transform 260ms cubic-bezier(0.18, 0.86, 0.24, 1.28);
}

.reel-track span {
  font-size: 0.9rem;
}

.winner-core {
  width: min(88%, 440px);
  min-height: 118px;
  gap: 6px;
  border-radius: 16px;
  transform: translateY(0);
}

.stage.is-spinning .winner-core {
  animation: slotReadoutPulse 420ms ease-in-out infinite alternate;
}

.stage.is-final .winner-core {
  animation: jackpotWinner 940ms cubic-bezier(0.15, 0.86, 0.22, 1.28) both;
}

.winner-name {
  font-size: 2rem;
}

.meter {
  margin: 10px 0;
}

@keyframes bulbChase {
  0% {
    opacity: 0.42;
    filter: brightness(0.9);
  }
  100% {
    opacity: 1;
    filter: brightness(1.35);
  }
}

@keyframes slotBankShake {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes slotBankSettle {
  0% {
    transform: scale(1.03);
  }
  52% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes reelStopKick {
  0% {
    transform: translateY(-14px) scale(1.02);
  }
  70% {
    transform: translateY(5px) scale(0.98);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes slotReadoutPulse {
  from {
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 0 34px rgba(78, 179, 255, 0.12);
  }
  to {
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.35),
      0 0 30px rgba(255, 240, 168, 0.22),
      inset 0 0 42px rgba(255, 106, 169, 0.15);
  }
}

@keyframes jackpotWinner {
  0% {
    transform: translateY(16px) scale(0.78);
    opacity: 0.35;
  }
  48% {
    transform: translateY(-8px) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (min-width: 820px) {
  .stage {
    min-height: 560px;
    padding: 24px;
  }

  .slot-machine {
    width: min(94%, 610px);
    padding: 14px;
  }

  .slot-marquee {
    min-height: 58px;
  }

  .slot-marquee strong {
    font-size: 1.32rem;
  }

  .reel-window {
    height: 184px;
  }

  .reel-track span {
    font-size: 1rem;
  }

  .winner-core {
    min-height: 136px;
  }

  .winner-name {
    font-size: 2.8rem;
  }
}

@media (max-width: 390px) {
  .stage {
    min-height: 390px;
    padding: 14px 8px;
  }

  .slot-machine {
    width: 100%;
    padding: 9px;
  }

  .slot-marquee,
  .slot-face {
    margin-left: 14px;
    margin-right: 14px;
  }

  .slot-marquee strong {
    font-size: 0.96rem;
  }

  .reel-window {
    height: 138px;
  }

  .reel-track span {
    font-size: 0.78rem;
  }

  .winner-core {
    min-height: 104px;
  }
}

/* Single-reel slot mode */
.winner-core,
.result-label,
.winner-name {
  display: none;
}

.stage {
  min-height: 360px;
}

.slot-machine {
  width: min(96%, 430px);
}

.slot-face {
  padding: 14px;
}

.reel-bank {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 300px);
  margin: 0 auto;
}

.reel-window {
  height: 168px;
  border-radius: 16px;
}

.reel-window::before,
.reel-window::after {
  height: 36%;
}

.reel-track {
  grid-auto-rows: 56px;
  transition: none;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.reel-track span {
  min-height: 56px;
  font-size: 1.34rem;
  letter-spacing: 0;
}

.reel-track .winner-row {
  color: #fff8e8;
  background:
    linear-gradient(90deg, transparent, rgba(255, 240, 168, 0.16), transparent);
  text-shadow:
    0 0 16px rgba(255, 240, 168, 0.82),
    0 0 28px rgba(255, 106, 169, 0.5);
}

.payline {
  height: 5px;
  left: 18px;
  right: 18px;
}

.stage.is-spinning .reel-bank {
  animation: none;
}

.stage.is-spinning .reel-window {
  animation: singleReelHeat 520ms ease-in-out infinite alternate;
}

.stage.is-final .reel-bank {
  animation: singleReelJackpot 760ms cubic-bezier(0.17, 0.9, 0.2, 1.24) both;
}

.reel-window.is-stopped {
  animation: singleReelStop 540ms cubic-bezier(0.15, 0.82, 0.22, 1.3) both;
}

.shock-ring {
  z-index: 6;
}

@keyframes singleReelHeat {
  from {
    box-shadow:
      inset 0 0 24px rgba(0, 0, 0, 0.42),
      0 12px 26px rgba(0, 0, 0, 0.28),
      0 0 12px rgba(78, 179, 255, 0.12);
  }
  to {
    box-shadow:
      inset 0 0 30px rgba(0, 0, 0, 0.48),
      0 12px 26px rgba(0, 0, 0, 0.28),
      0 0 34px rgba(78, 179, 255, 0.34),
      0 0 18px rgba(255, 106, 169, 0.18);
  }
}

@keyframes singleReelStop {
  0% {
    transform: translateY(-10px) scale(1.02);
  }
  62% {
    transform: translateY(5px) scale(0.985);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes singleReelJackpot {
  0% {
    transform: scale(1);
  }
  46% {
    transform: scale(1.045);
  }
  100% {
    transform: scale(1);
  }
}

@media (min-width: 820px) {
  .stage {
    min-height: 500px;
  }

  .slot-machine {
    width: min(88%, 500px);
  }

  .reel-bank {
    width: min(100%, 360px);
  }

  .reel-window {
    height: 168px;
  }

  .reel-track span {
    font-size: 1.48rem;
  }
}

@media (max-width: 390px) {
  .stage {
    min-height: 342px;
  }

  .reel-window {
    height: 168px;
  }

  .reel-track span {
    font-size: 1.1rem;
  }
}

/* Lighter typography */
.back-link,
.eyebrow,
.status-pill small,
.field-heading,
.field-heading strong,
.add-btn,
.secondary-btn,
.random-btn,
.slot-marquee span,
.slot-marquee strong,
.reel-track span {
  font-weight: 600;
}

.status-pill span,
h1 {
  font-weight: 700;
}

.payline {
  display: none;
}
