:root {
  --bg-night: #130814;
  --bg-plum: #251028;
  --bg-moss: #233126;
  --bone: #f4eee4;
  --bone-shadow: #d8d0c6;
  --lime: #b9ff44;
  --orange: #ff8f3f;
  --orange-deep: #ce4f1f;
  --gold: #ffd46e;
  --ink: #1d1418;
  --panel: rgba(24, 12, 20, 0.82);
  --panel-border: rgba(255, 226, 148, 0.22);
  --text-soft: #f8f2e5;
  --text-muted: #dacfbf;
  --shadow: 0 32px 70px rgba(4, 1, 7, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-soft);
  background:
    radial-gradient(circle at top, rgba(90, 132, 61, 0.18), transparent 28%),
    radial-gradient(circle at 20% 20%, rgba(248, 130, 62, 0.2), transparent 24%),
    linear-gradient(135deg, var(--bg-night), var(--bg-plum) 45%, #0f1f17 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    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: 44px 44px;
  opacity: 0.22;
  pointer-events: none;
}

.page-shell {
  position: relative;
  isolation: isolate;
}

.mist {
  position: fixed;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.22;
  pointer-events: none;
}

.mist-a {
  width: 320px;
  height: 160px;
  top: 8%;
  left: -6%;
  background: rgba(190, 255, 96, 0.2);
  animation: drift 12s ease-in-out infinite alternate;
}

.mist-b {
  width: 420px;
  height: 190px;
  right: -8%;
  top: 52%;
  background: rgba(255, 151, 82, 0.2);
  animation: drift 15s ease-in-out infinite alternate-reverse;
}

.hero {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 1.5rem;
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: minmax(280px, 450px) minmax(320px, 1fr);
}

.eyebrow,
.status-label,
.step-label,
.final-label {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
}

h1 {
  margin: 0.35rem 0 1rem;
  font-family: "Creepster", cursive;
  font-size: clamp(3.3rem, 7vw, 6.6rem);
  line-height: 0.95;
  font-weight: 400;
  color: #fff3c0;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.34);
}

.intro {
  margin: 0 0 1.75rem;
  max-width: 38ch;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease, background 0.22s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.spin-button,
.ghost-button {
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 800;
}

.spin-button {
  background: linear-gradient(135deg, #fff0a0, #ff9f43 55%, #ef5823);
  color: #231210;
  box-shadow: 0 18px 30px rgba(255, 123, 46, 0.28);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
}

.status-panel,
.recipe-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.status-panel {
  padding: 1rem 1.1rem 1.15rem;
  max-width: 36rem;
}

.status-text {
  margin: 0.45rem 0 0;
  line-height: 1.65;
  color: #fff7dc;
}

.stage {
  position: relative;
  perspective: 1400px;
}

.character-card {
  position: relative;
  border-radius: 34px;
  padding: 1rem;
  min-height: 640px;
  background:
    radial-gradient(circle at 58% 34%, rgba(255, 165, 72, 0.25), transparent 20%),
    radial-gradient(circle at 30% 26%, rgba(185, 255, 68, 0.16), transparent 22%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.batcolyte-sign {
  position: absolute;
  top: 0.7rem;
  left: 50%;
  width: min(78%, 640px);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

.batcolyte-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.batcolyte-word {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 60px;
  font-weight: 700;
  letter-spacing: 2px;
  paint-order: stroke fill;
}

.batcolyte-backglow {
  fill: rgba(111, 162, 255, 0.24);
  stroke: rgba(91, 132, 255, 0.34);
  stroke-width: 9;
  filter: url(#batcolyteGlowBlue);
  animation: signFlicker 5.6s ease-in-out infinite;
}

.batcolyte-gold {
  fill: rgba(255, 216, 144, 0.2);
  stroke: rgba(255, 206, 112, 0.44);
  stroke-width: 4;
  filter: url(#batcolyteGlowGold);
  animation: signPulse 4.8s ease-in-out infinite;
}

.batcolyte-front {
  fill: #a9c8ff;
  stroke: url(#batcolyteStroke);
  stroke-width: 2.4;
  filter: url(#batcolyteGlowBlue);
  animation: signBuzz 6.7s steps(1, end) infinite;
}

.character-card::after {
  content: "";
  position: absolute;
  inset: auto -12% -24% -10%;
  height: 240px;
  background: radial-gradient(circle at 50% 0%, rgba(185, 255, 68, 0.16), transparent 56%);
  pointer-events: none;
}

.skeleton-scene {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.eye-glow {
  filter: drop-shadow(0 0 10px rgba(185, 255, 68, 0.85));
  animation: blinkGlow 2.8s ease-in-out infinite;
}

.wheel-group {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 5.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.wheel-zoom-wrap {
  transform-box: fill-box;
  transform-origin: center;
  transition: filter 1.2s ease;
}

.skeleton-figure {
  transform-box: fill-box;
  transform-origin: center;
}

.reveal-area {
  width: min(1000px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 3rem;
}

.ad-strip {
  margin-top: 2rem;
}

.ad-strip-copy {
  margin-bottom: 0.85rem;
}

.ad-strip-label {
  margin: 0 0 0.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--gold);
}

.ad-strip-title {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  color: #fff3d0;
}

.ad-card {
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.ad-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px rgba(6, 3, 12, 0.32);
}

.recipe-panel {
  padding: 1.3rem;
  transform: translateY(26px);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.recipe-panel.visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none;
}

.panel-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.badge,
.step-counter {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.badge {
  background: rgba(185, 255, 68, 0.14);
  color: #dbff97;
}

.step-counter {
  background: rgba(255, 212, 110, 0.12);
  color: #ffe8ae;
}

.recipe-title {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  color: #fff8de;
}

.recipe-hint {
  margin: 0.5rem 0 1.2rem;
  color: var(--text-muted);
}

.step-card,
.final-reveal {
  border-radius: 24px;
  padding: 1.15rem 1.2rem;
}

.step-card {
  background:
    linear-gradient(160deg, rgba(255, 241, 193, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 235, 170, 0.12);
}

.step-text {
  margin: 0.4rem 0 0;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  line-height: 1.7;
  color: #fff9ee;
}

.final-reveal {
  margin-top: 1rem;
  background: linear-gradient(135deg, rgba(185, 255, 68, 0.12), rgba(255, 143, 63, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.final-name {
  margin: 0.5rem 0 0.35rem;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #eaffaf;
}

.final-description {
  margin: 0;
  color: #fff5d6;
  line-height: 1.65;
}

@keyframes blinkGlow {
  0%, 100% {
    opacity: 1;
  }
  45% {
    opacity: 0.65;
  }
  50% {
    opacity: 0.2;
  }
  55% {
    opacity: 0.9;
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(44px, -18px, 0);
  }
}

@keyframes signPulse {
  0%, 100% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
}

@keyframes signFlicker {
  0%, 18%, 22%, 52%, 54%, 100% {
    opacity: 0.92;
  }
  20% {
    opacity: 0.68;
  }
  53% {
    opacity: 0.76;
  }
}

@keyframes signBuzz {
  0%, 92%, 100% {
    opacity: 1;
  }
  93% {
    opacity: 0.74;
  }
  94% {
    opacity: 1;
  }
  95% {
    opacity: 0.82;
  }
  96% {
    opacity: 1;
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 1.4rem;
  }

  .character-card {
    min-height: auto;
  }

  .batcolyte-sign {
    width: min(86%, 620px);
  }
}

@media (max-width: 640px) {
  .hero,
  .reveal-area {
    width: min(100% - 1rem, 1000px);
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .spin-button,
  .ghost-button {
    width: 100%;
  }

  .character-card {
    padding: 0.3rem;
    border-radius: 26px;
  }

  .batcolyte-sign {
    top: 0.35rem;
    width: 92%;
  }

  .batcolyte-word {
    font-size: 48px;
    letter-spacing: 1px;
  }

  .recipe-panel {
    padding: 1rem;
  }
}
