*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0014;
  --pink: #ff2d95;
  --purple: #b24bff;
  --cyan: #00f5ff;
  --gold: #ffd700;
  --text: #fff5ff;
  --glow: 0 0 30px rgba(255, 45, 149, 0.8), 0 0 60px rgba(178, 75, 255, 0.5);
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: "Montserrat", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.server-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(180, 0, 60, 0.95);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.server-banner a {
  color: #7fffff;
}

.server-banner[hidden] {
  display: none !important;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: -50%;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255, 45, 149, 0.35), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(178, 75, 255, 0.35), transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 245, 255, 0.15), transparent 60%);
  animation: auroraShift 12s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes auroraShift {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(8deg) scale(1.15); }
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  opacity: 0.4;
}

.app {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92) translateY(20px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.6s;
}

.scene--active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.scene--exit {
  opacity: 0;
  transform: scale(1.05) translateY(-30px);
}

.scene__glow {
  position: absolute;
  width: min(90vw, 500px);
  height: min(90vw, 500px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 149, 0.25), transparent 70%);
  filter: blur(40px);
  animation: glowPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

.question {
  position: relative;
  z-index: 2;
  text-align: center;
  font-weight: 900;
  font-size: clamp(1.5rem, 6vw, 3rem);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: var(--glow);
  max-width: 95vw;
}

.question--pulse {
  animation: textZoom 2.2s ease-in-out infinite;
}

.question--shake {
  animation: textShake 0.5s ease-in-out infinite alternate;
}

.question--cinematic {
  animation: textZoom 2s ease-in-out infinite;
}

.question--zoom-in {
  animation: textZoomIn 3s ease-in-out forwards;
}

.question--face-id {
  font-size: clamp(1.2rem, 5vw, 2.5rem);
  letter-spacing: 0.2em;
}

@keyframes textZoom {
  0%, 100% { transform: scale(0.88); filter: brightness(0.9); }
  50% { transform: scale(1.12); filter: brightness(1.2); }
}

@keyframes textZoomIn {
  0% { transform: scale(0.5); opacity: 0.5; }
  40% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(2.5); opacity: 1; }
}

@keyframes textShake {
  0% { transform: translateX(-4px) rotate(-0.5deg); }
  100% { transform: translateX(4px) rotate(0.5deg); }
}

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  overflow: hidden;
}

.glitch::before {
  color: var(--cyan);
  animation: glitchTop 2.5s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
  color: var(--pink);
  animation: glitchBottom 2s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitchTop {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0); }
}

@keyframes glitchBottom {
  0% { transform: translate(0); }
  25% { transform: translate(2px, -2px); }
  50% { transform: translate(-3px, 1px); }
  75% { transform: translate(1px, 2px); }
  100% { transform: translate(0); }
}

.media-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(85vw, 420px);
  max-height: 45vh;
}

.media-wrap--dance {
  filter: drop-shadow(0 0 25px rgba(255, 45, 149, 0.6));
}

.media-wrap--video,
.media-wrap--seq {
  max-width: min(92vw, 560px);
  max-height: 55vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(255, 45, 149, 0.5),
    0 0 40px rgba(178, 75, 255, 0.4),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

.media {
  display: block;
  max-width: 100%;
  max-height: 45vh;
  object-fit: contain;
}

.media--dance {
  animation: imageDance 1.4s ease-in-out infinite;
  transform-origin: center center;
  min-height: 100px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

@keyframes imageDance {
  0% { transform: scaleX(1) scaleY(1) rotate(0deg); }
  15% { transform: scaleX(1.25) scaleY(0.85) rotate(-3deg); }
  30% { transform: scaleX(0.8) scaleY(1.2) rotate(3deg); }
  45% { transform: scaleX(1.15) scaleY(0.9) rotate(-2deg); }
  60% { transform: scaleX(0.9) scaleY(1.15) rotate(2deg); }
  75% { transform: scaleX(1.2) scaleY(0.88) rotate(-4deg); }
  100% { transform: scaleX(1) scaleY(1) rotate(0deg); }
}

.media--video,
video {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-timeline,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display,
video::-webkit-media-controls-mute-button,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-fullscreen-button,
video::-webkit-media-controls-toggle-closed-captions-button {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.video-lock-wrap {
  pointer-events: none;
  overflow: hidden;
}

.media--video {
  width: 100%;
  max-height: 55vh;
  object-fit: cover;
  border-radius: 16px;
}

.media--face-zoom {
  animation: faceZoom 3s ease-in forwards;
  max-height: 70vh;
  width: auto;
  border-radius: 50%;
  border: 4px solid var(--cyan);
  box-shadow: 0 0 60px var(--cyan);
  transform-origin: center center;
  will-change: transform;
}

.scene--cinematic.scene--face .media-wrap--seq {
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes faceZoom {
  0% {
    transform: scale(0.25);
    opacity: 0.5;
    filter: blur(6px);
  }
  25% {
    transform: scale(0.7);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: scale(4.2);
    opacity: 1;
    filter: brightness(1.35);
  }
}

.scene--cinematic .media-wrap--seq {
  position: fixed;
  inset: 0;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  z-index: 1;
}

.scene--cinematic .media-wrap--seq .media--video {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  object-fit: cover;
  border-radius: 0;
}

.scene--cinematic .question {
  z-index: 3;
  background: rgba(10, 0, 20, 0.55);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.scene--cinematic.scene--face .question {
  mix-blend-mode: difference;
}

.seq-hint {
  position: relative;
  z-index: 4;
  font-family: "Pacifico", cursive;
  font-size: clamp(1rem, 4.5vw, 1.6rem);
  color: var(--gold);
  text-shadow:
    0 0 12px rgba(255, 215, 0, 0.9),
    0 0 30px rgba(255, 45, 149, 0.6);
  letter-spacing: 0.12em;
  animation: hintWiggle 0.8s ease-in-out infinite alternate;
  margin-top: -0.5rem;
}

@keyframes hintWiggle {
  0% { transform: scale(1) rotate(-2deg); }
  100% { transform: scale(1.08) rotate(2deg); }
}

.scene--video-bg {
  overflow: hidden;
}

.scene-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(1.2) contrast(1.05);
}

.scene-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10, 0, 20, 0.75) 0%,
    rgba(10, 0, 20, 0.35) 40%,
    rgba(10, 0, 20, 0.85) 100%
  );
}

.scene--video-bg .question,
.scene--video-bg .actions {
  position: relative;
  z-index: 2;
}

.actions--choices {
  gap: 1rem;
}

.actions--stack {
  flex-direction: column;
  align-items: stretch;
  width: min(92vw, 420px);
}

.btn--choice {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #0a0014;
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.5);
  min-width: 5rem;
}

.btn--choice-alt {
  background: linear-gradient(135deg, var(--pink), #ff6b9d);
  color: white;
  box-shadow: 0 0 25px rgba(255, 45, 149, 0.6);
}

.actions {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: clamp(1rem, 4vw, 1.35rem);
  padding: 0.9rem 2.2rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.5s;
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn--yes {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  box-shadow: 0 0 25px rgba(255, 45, 149, 0.7);
}

.btn--no {
  background: linear-gradient(135deg, #333, #111);
  color: #ff6b9d;
  border: 2px solid var(--pink);
  box-shadow: 0 0 15px rgba(255, 45, 149, 0.3);
}

.btn:hover {
  transform: scale(1.08) translateY(-2px);
}

.btn:active {
  transform: scale(0.96);
}

.subtitle {
  font-family: "Pacifico", cursive;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  animation: subtitleFloat 3s ease-in-out infinite;
}

@keyframes subtitleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.flash--on {
  opacity: 0.85;
  animation: flashOut 0.4s ease-out forwards;
}

@keyframes flashOut {
  to { opacity: 0; }
}

#confetti-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0.2;
  }
}

/* Hack / glitch overlay */
.hack-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hack-overlay[hidden] {
  display: none !important;
}

.body--hack {
  overflow: hidden;
}

.hack-screen {
  position: relative;
  width: 100%;
  height: 100%;
  animation: hackShake 0.08s steps(2) infinite;
  background:
    repeating-linear-gradient(0deg, #0f0 0, #0f0 2px, #000 2px, #000 4px),
    #111;
  mix-blend-mode: hard-light;
}

.hack-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.35;
  animation: noiseMove 0.2s steps(4) infinite;
}

.hack-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(0, 255, 100, 0.8);
  box-shadow: 0 0 20px #0f0;
  animation: scanLine 1.2s linear infinite;
}

.hack-msg {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translateX(-50%);
  font-family: "Courier New", monospace;
  font-size: clamp(1.2rem, 5vw, 2rem);
  color: #0f0;
  text-shadow: 0 0 10px #0f0;
  animation: hackBlink 0.3s steps(1) infinite;
  white-space: nowrap;
}

.hack-msg--2 {
  top: 52%;
  color: #f0f;
  text-shadow: 0 0 10px #f0f;
  animation-delay: 0.15s;
}

.hack-scare {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 600;
}

.hack-scare[hidden] {
  display: none !important;
}

@keyframes hackShake {
  0% { transform: translate(3px, -2px) skewX(2deg); filter: hue-rotate(0deg); }
  50% { transform: translate(-4px, 3px) skewX(-3deg); filter: hue-rotate(90deg); }
  100% { transform: translate(2px, -3px) skewX(1deg); filter: hue-rotate(180deg); }
}

@keyframes noiseMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-5%, 3%); }
}

@keyframes scanLine {
  0% { top: -10%; }
  100% { top: 110%; }
}

@keyframes hackBlink {
  50% { opacity: 0; }
}

/* Fullscreen screamer */
.fullscreen-scare {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 700;
}

.fullscreen-scare[hidden] {
  display: none !important;
}

.body--scare {
  overflow: hidden;
}

/* Celebrate finale */
.scene--celebrate {
  overflow: hidden;
  padding: 1rem;
}

.celebrate-videos {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.celebrate-vid {
  position: absolute;
  width: clamp(100px, 22vw, 180px);
  height: auto;
  max-height: 28vh;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 25px rgba(255, 45, 149, 0.6);
  animation: vidFloat 4s ease-in-out infinite alternate;
}

.cv1 { top: 5%; left: 3%; animation-delay: 0s; transform: rotate(-8deg); }
.cv2 { top: 8%; right: 4%; animation-delay: 0.4s; transform: rotate(6deg); }
.cv3 { top: 38%; left: 2%; animation-delay: 0.8s; transform: rotate(4deg); }
.cv4 { top: 42%; right: 2%; animation-delay: 1.2s; transform: rotate(-5deg); }
.cv5 { bottom: 12%; left: 6%; animation-delay: 0.6s; transform: rotate(7deg); }
.cv6 { bottom: 10%; right: 5%; animation-delay: 1s; transform: rotate(-4deg); }

@keyframes vidFloat {
  0% { transform: translateY(0) scale(1) rotate(var(--r, 0deg)); }
  100% { transform: translateY(-12px) scale(1.06) rotate(calc(var(--r, 0deg) + 4deg)); }
}

.celebrate-card {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 560px);
  margin: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: linear-gradient(
    145deg,
    rgba(255, 45, 149, 0.25),
    rgba(178, 75, 255, 0.2)
  );
  border: 2px solid rgba(255, 215, 0, 0.6);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 50px rgba(255, 45, 149, 0.5),
    0 0 80px rgba(255, 215, 0, 0.25);
  animation: cardPop 1s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    cardGlow 2.5s ease-in-out infinite alternate;
}

@keyframes cardPop {
  0% { transform: scale(0.5) rotate(-3deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes cardGlow {
  0% { box-shadow: 0 0 40px rgba(255, 45, 149, 0.4); }
  100% { box-shadow: 0 0 70px rgba(255, 215, 0, 0.6); }
}

.celebrate-title {
  font-family: "Pacifico", cursive;
  font-size: clamp(1.6rem, 6vw, 2.8rem);
  text-align: center;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  margin-bottom: 1rem;
  animation: titleShine 2s ease-in-out infinite alternate;
}

@keyframes titleShine {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.3); }
}

.celebrate-text {
  font-size: clamp(0.95rem, 3.5vw, 1.15rem);
  line-height: 1.65;
  text-align: center;
  color: var(--text);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.celebrate-footer {
  position: relative;
  z-index: 3;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.btn--prize-footer {
  background: linear-gradient(135deg, var(--gold), #ff9f43);
  color: #1a0a20;
  font-size: clamp(0.95rem, 3.5vw, 1.15rem);
  padding: 0.85rem 2rem;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.55);
}

.btn--prize-footer-alt {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
}

.prize-video-card,
.roblox-card {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 480px);
  padding: clamp(1.25rem, 4vw, 2rem);
  text-align: center;
  background: linear-gradient(
    145deg,
    rgba(255, 45, 149, 0.2),
    rgba(178, 75, 255, 0.18)
  );
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 40px rgba(255, 45, 149, 0.35);
}

.prize-video-hint {
  margin: 1rem 0 0.75rem;
  font-size: clamp(0.9rem, 3.2vw, 1.05rem);
  opacity: 0.9;
}

.prize-video-player {
  position: relative;
  width: min(92vw, 420px);
  aspect-ratio: 9 / 16;
  max-height: 55vh;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid var(--pink);
  box-shadow: 0 0 40px rgba(255, 45, 149, 0.5);
  background: linear-gradient(160deg, #1a0a28, #0a0014);
}

.prize-video-tap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(10, 0, 20, 0.75);
  z-index: 2;
}

.prize-video-tap[hidden] {
  display: none !important;
}

.prize-video-play-icon {
  font-size: 3rem;
  color: var(--pink);
  text-shadow: 0 0 25px var(--pink);
  animation: prizePlayPulse 1.2s ease-in-out infinite alternate;
}

@keyframes prizePlayPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

.prize-video-tap-text {
  font-weight: 900;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.prize-video-el {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.prize-video-el[hidden] {
  display: none !important;
}

.prize-video-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prize-video-fullscreen[hidden] {
  display: none !important;
}

.prize-video-fullscreen .prize-video-warning {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
  font-weight: 900;
  font-size: clamp(1.6rem, 7vw, 3rem);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  color: #ff1a1a;
  text-shadow:
    0 0 20px rgba(255, 0, 0, 0.9),
    0 0 40px rgba(255, 0, 0, 0.6),
    2px 2px 0 #000;
  background: rgba(0, 0, 0, 0.92);
  animation: prizeWarningPulse 0.5s ease-in-out infinite alternate;
}

.prize-video-fullscreen .prize-video-warning[hidden] {
  display: none !important;
}

@keyframes prizeWarningPulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.06); filter: brightness(1.3); }
}

.prize-video-fullscreen .prize-video-el {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.prize-video-player {
  display: inline-block;
  font-weight: 900;
  font-size: clamp(1rem, 4vw, 1.25rem);
  color: var(--cyan);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.prize-link:hover {
  transform: scale(1.06);
  box-shadow: 0 0 35px rgba(0, 245, 255, 0.7);
}

.prize-link-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--gold);
  font-family: "Pacifico", cursive;
}

.roblox-sub {
  margin: 0.75rem 0 1.25rem;
  font-size: clamp(0.9rem, 3.2vw, 1.05rem);
  line-height: 1.5;
}

.roblox-card--overlay {
  margin: auto;
}

.roblox-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.roblox-input {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  border: 2px solid var(--pink);
  background: rgba(10, 0, 20, 0.7);
  color: var(--text);
  outline: none;
  box-shadow: 0 0 20px rgba(255, 45, 149, 0.25);
}

.roblox-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.4);
}

.roblox-status {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.roblox-status--ok {
  color: #7fff7f;
}

.roblox-status--err {
  color: #ff6b9d;
}

/* Roblox success — зелёный праздничный экран */
.scene--roblox-success {
  overflow: hidden;
}

.roblox-success-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(127, 255, 127, 0.35), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(0, 255, 136, 0.3), transparent 50%),
    linear-gradient(160deg, #0a2e14 0%, #1a5c2e 40%, #0d3d1f 100%);
  animation: successBgPulse 3s ease-in-out infinite alternate;
}

@keyframes successBgPulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.15); }
}

.roblox-success-card {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 440px);
  margin: auto;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  text-align: center;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.15),
    rgba(127, 255, 127, 0.12)
  );
  border: 3px solid #7fff7f;
  border-radius: 28px;
  box-shadow:
    0 0 50px rgba(127, 255, 127, 0.55),
    0 0 100px rgba(0, 255, 136, 0.25),
    inset 0 0 30px rgba(127, 255, 127, 0.15);
  animation: successCardPop 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    successCardBounce 2s ease-in-out 0.7s infinite;
}

@keyframes successCardPop {
  0% { transform: scale(0.4) rotate(-5deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes successCardBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}

.roblox-success-icon {
  font-size: clamp(3rem, 12vw, 5rem);
  line-height: 1;
  animation: successIconSpin 1.2s ease-in-out infinite alternate;
}

@keyframes successIconSpin {
  0% { transform: scale(1) rotate(-8deg); }
  100% { transform: scale(1.15) rotate(8deg); }
}

.roblox-success-title {
  font-family: "Pacifico", cursive;
  font-size: clamp(2rem, 8vw, 3.2rem);
  color: #b8ff9e;
  text-shadow:
    0 0 20px rgba(127, 255, 127, 0.9),
    0 0 40px rgba(0, 255, 136, 0.5);
  margin: 0.5rem 0 0.25rem;
}

.roblox-success-amount {
  font-weight: 900;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(127, 255, 127, 0.8);
}

.roblox-success-text {
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  line-height: 1.6;
  color: #e8ffe0;
  margin-bottom: 0.75rem;
}

.roblox-success-text strong {
  color: #7fff7f;
  font-weight: 900;
}

.roblox-success-note {
  font-family: "Pacifico", cursive;
  font-size: clamp(1rem, 4vw, 1.25rem);
  color: #a8ff88;
  animation: successNoteWiggle 1s ease-in-out infinite alternate;
}

@keyframes successNoteWiggle {
  0% { transform: rotate(-1deg); }
  100% { transform: rotate(1deg); }
}

.roblox-success-card .btn--prize-footer {
  margin-top: 1.25rem;
  width: 100%;
  max-width: 320px;
}

/* АРИ-МАРКЕТ */
.scene--market {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 0.75rem 2rem;
  justify-content: flex-start;
  gap: 1rem;
}

.market-header {
  position: relative;
  z-index: 2;
  text-align: center;
  width: min(96vw, 520px);
}

.market-title {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.market-gift {
  font-family: "Pacifico", cursive;
  font-size: clamp(1rem, 4vw, 1.35rem);
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  margin-bottom: 0.5rem;
  animation: marketGiftPop 0.8s ease-out;
}

.market-important {
  font-weight: 900;
  font-size: clamp(1rem, 4vw, 1.2rem);
  color: #7fff7f;
  text-shadow: 0 0 20px rgba(127, 255, 127, 0.7);
  margin-bottom: 0.75rem;
  animation: marketImportantPulse 1.2s ease-in-out infinite alternate;
}

@keyframes marketImportantPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

@keyframes marketGiftPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.market-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 45, 149, 0.2));
  border: 2px solid var(--gold);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.market-wallet-value {
  font-weight: 900;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  color: var(--gold);
  min-width: 3ch;
  text-align: right;
}

.market-wallet-coin {
  font-weight: 900;
  color: var(--pink);
  font-size: 0.95rem;
}

.market-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  width: min(96vw, 800px);
  max-height: none;
}

.market-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(178, 75, 255, 0.2), rgba(10, 0, 20, 0.6));
  border: 2px solid rgba(255, 45, 149, 0.45);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.market-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 45, 149, 0.35);
}

.market-item--bought {
  opacity: 0.65;
  border-color: rgba(127, 255, 127, 0.6);
  background: linear-gradient(160deg, rgba(0, 80, 40, 0.35), rgba(10, 0, 20, 0.5));
}

.market-item--shake {
  animation: marketShake 0.45s ease-in-out;
}

@keyframes marketShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.market-item-img {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  filter: drop-shadow(0 0 12px rgba(255, 45, 149, 0.4));
}

.market-item-emoji {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.market-item-name {
  font-size: 0.9rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.market-item-desc {
  font-size: 0.72rem;
  opacity: 0.85;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  flex: 1;
}

.market-item-price {
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.btn--market-buy {
  font-size: 0.75rem;
  padding: 0.55rem 1rem;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  width: 100%;
}

.market-item--bought .btn--market-buy {
  background: linear-gradient(135deg, #2d8a4e, #1a5c2e);
}

.market-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  background: rgba(10, 0, 20, 0.92);
  border: 2px solid var(--gold);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.35);
  max-width: 92vw;
  text-align: center;
}

.market-toast--err {
  border-color: var(--pink);
  color: #ff9fbd;
}

.market-toast[hidden] {
  display: none !important;
}

/* ——— Preload screen ——— */
body.app-loading .app {
  opacity: 0;
  pointer-events: none;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.site-loader__glow {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(255, 45, 149, 0.45), transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(178, 75, 255, 0.4), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 245, 255, 0.12), transparent 60%);
  animation: auroraShift 10s ease-in-out infinite alternate;
  pointer-events: none;
}

.site-loader__inner {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  padding: 2rem 1.5rem;
  text-align: center;
}

.site-loader__emoji {
  font-size: clamp(3rem, 12vw, 4.5rem);
  margin-bottom: 0.5rem;
  animation: loaderBounce 1.2s ease-in-out infinite;
}

@keyframes loaderBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.06); }
}

.site-loader__title {
  font-family: "Pacifico", cursive;
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 400;
  color: var(--gold);
  text-shadow: var(--glow);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.site-loader__status {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 245, 255, 0.85);
  margin-bottom: 1rem;
  min-height: 1.4em;
}

.site-loader__bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 45, 149, 0.25);
}

.site-loader__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--cyan));
  box-shadow: 0 0 18px rgba(255, 45, 149, 0.7);
  transition: width 0.25s ease-out;
}

.site-loader__pct {
  margin-top: 0.65rem;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.site-loader--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 768px) {
  .celebrate-vid.cv4,
  .celebrate-vid.cv5,
  .celebrate-vid.cv6 {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .actions {
    width: 100%;
    padding: 0 0.5rem;
  }

  .btn {
    flex: 1;
    min-width: 120px;
  }

  .celebrate-vid {
    width: clamp(72px, 28vw, 120px);
    max-height: 22vh;
  }

  .celebrate-card {
    margin-top: 18vh;
  }
}
