:root {
  color-scheme: dark;
  --ink: #fff8d6;
  --muted: #b7c6d7;
  --stage: #11131f;
  --panel: rgba(7, 10, 22, 0.82);
  --pink: #ff3fb4;
  --cyan: #26f3ff;
  --gold: #ffd84a;
  --green: #6cff8d;
  --red: #ff4f4f;
  --violet: #b625ff;
  --acid: #d8ff2f;
  --line: rgba(255, 255, 255, 0.18);
  --shadow: rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    conic-gradient(from 180deg at 50% 0%, rgba(255, 63, 180, 0.34), rgba(38, 243, 255, 0.3), rgba(216, 255, 47, 0.24), rgba(255, 63, 180, 0.34)),
    radial-gradient(circle at 18% 16%, rgba(255, 63, 180, 0.42), transparent 24rem),
    radial-gradient(circle at 82% 14%, rgba(38, 243, 255, 0.36), transparent 23rem),
    linear-gradient(135deg, #22051f 0%, #041521 42%, #230737 100%);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

#confetti {
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 8;
}

.neon-noise {
  animation: staticShift 0.16s steps(2, end) infinite;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 63, 180, 0.06) 0 2px, transparent 2px 7px);
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.52;
  pointer-events: none;
  position: fixed;
  z-index: 7;
}

.stage-shell {
  min-height: 100vh;
  padding: 24px;
}

.stage {
  animation: stageGlow 3s ease-in-out infinite alternate;
  border: 2px solid rgba(38, 243, 255, 0.72);
  border-radius: 8px;
  box-shadow:
    0 0 0 6px rgba(255, 63, 180, 0.16),
    0 0 34px rgba(38, 243, 255, 0.54),
    0 30px 80px var(--shadow),
    inset 0 0 110px rgba(255, 63, 180, 0.14);
  min-height: calc(100vh - 48px);
  overflow: hidden;
  position: relative;
  background:
    repeating-radial-gradient(circle at 50% 42%, rgba(255, 216, 74, 0.1) 0 2px, transparent 2px 16px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 19, 31, 0.64), rgba(4, 6, 12, 0.88));
  background-size: auto, 58px 58px, 58px 58px, auto;
}

.stage::before {
  animation: scan 8s linear infinite;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 216, 74, 0.14) 0,
    rgba(255, 216, 74, 0.14) 10px,
    transparent 10px,
    transparent 24px
  );
  content: "";
  inset: auto 0 0;
  height: 34%;
  position: absolute;
  transform: skewY(-4deg);
}

.stage::after {
  background:
    radial-gradient(ellipse at center, rgba(255, 216, 74, 0.34), transparent 58%),
    repeating-linear-gradient(90deg, rgba(38, 243, 255, 0.26) 0 10px, rgba(255, 63, 180, 0.24) 10px 20px, transparent 20px 34px);
  bottom: -110px;
  content: "";
  height: 290px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: min(820px, 86vw);
}

.stage-chrome {
  animation: chromeSlide 13s linear infinite;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  font-size: clamp(1.8rem, 6vw, 6rem);
  font-weight: 1000;
  gap: 32px;
  inset: 32% auto auto 0;
  opacity: 0.12;
  pointer-events: none;
  position: absolute;
  text-shadow: 0 0 12px var(--cyan), 0 0 28px var(--pink);
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 1;
}

.light-rig {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, 1fr);
  left: 50%;
  max-width: 900px;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 72%;
  z-index: 1;
}

.light-rig span {
  animation: lampPop 0.9s infinite alternate;
  background: linear-gradient(180deg, #fff7c7 0 10%, #273247 12%, #070913);
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 0 30px rgba(38, 243, 255, 0.35);
  height: 28px;
}

.light-rig span:nth-child(even) {
  animation-delay: 0.32s;
  box-shadow: 0 0 30px rgba(255, 63, 180, 0.46);
}

.show-header {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 2fr) minmax(150px, 0.7fr);
  padding: 48px 40px 14px;
  position: relative;
  z-index: 2;
}

.badge,
.jackpot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px var(--shadow);
  color: var(--muted);
  justify-self: start;
  padding: 10px 14px;
  text-transform: uppercase;
}

.badge {
  animation: blink 1.3s steps(2, start) infinite;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.jackpot {
  justify-self: end;
  min-width: 158px;
  text-align: right;
}

.jackpot span,
.score-tile span {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.jackpot strong {
  color: var(--gold);
  display: block;
  font-size: 1.25rem;
  margin-top: 2px;
}

h1 {
  animation: titleFlicker 1.8s infinite;
  color: #ffffff;
  font-size: clamp(2.6rem, 5.2vw, 3.8rem);
  line-height: 0.95;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  text-shadow:
    4px 4px 0 var(--pink),
    -4px -4px 0 var(--cyan),
    0 0 10px #ffffff,
    0 0 26px rgba(255, 216, 74, 0.92),
    0 0 54px rgba(182, 37, 255, 0.88);
  text-transform: uppercase;
}

.title-stack {
  min-width: 0;
  text-align: center;
}

.overline,
.under-sign {
  display: inline-block;
  font-weight: 1000;
  text-transform: uppercase;
}

.overline {
  animation: hueParty 1.8s linear infinite;
  background: var(--acid);
  border: 2px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(216, 255, 47, 0.88), 0 0 34px rgba(255, 63, 180, 0.62);
  color: #11131f;
  font-size: 0.82rem;
  margin-bottom: 8px;
  padding: 4px 10px;
}

.under-sign {
  animation: signWobble 0.72s ease-in-out infinite alternate;
  color: var(--cyan);
  font-size: 0.86rem;
  margin-top: 8px;
  text-shadow: 0 0 10px var(--cyan), 0 0 18px var(--pink);
}

.ticker {
  animation: tickerPulse 0.8s infinite alternate;
  align-items: center;
  background: linear-gradient(90deg, var(--pink), var(--gold), var(--acid), var(--cyan), var(--violet));
  color: #080b13;
  display: flex;
  font-weight: 1000;
  gap: 28px;
  justify-content: center;
  min-height: 36px;
  overflow: hidden;
  position: relative;
  text-transform: uppercase;
  z-index: 2;
}

.ticker span {
  white-space: nowrap;
}

.score-wall {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px auto 0;
  max-width: 980px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.score-tile {
  animation: tileGlow 1.2s infinite alternate;
  background: rgba(6, 10, 22, 0.76);
  border: 1px solid rgba(38, 243, 255, 0.48);
  border-radius: 8px;
  box-shadow: inset 0 0 24px rgba(38, 243, 255, 0.2), 0 0 22px rgba(255, 63, 180, 0.22);
  min-height: 74px;
  padding: 12px;
  text-align: center;
}

.score-tile strong {
  color: var(--cyan);
  display: block;
  font-size: 1.8rem;
  line-height: 1.1;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.score-tile.is-hot strong {
  color: var(--red);
}

.score-tile.is-loud strong {
  color: var(--acid);
  text-shadow: 0 0 14px var(--acid), 0 0 28px var(--pink);
}

.podium-wrap {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(160px, 1fr) minmax(190px, 1.16fr) minmax(160px, 1fr);
  margin: 24px auto 0;
  max-width: 950px;
  min-height: 430px;
  padding: 18px 24px 0;
  position: relative;
  z-index: 2;
}

.spotlight {
  animation: spotlightDance 2.2s ease-in-out infinite alternate;
  filter: blur(1px);
  inset: -48px auto 34px;
  mix-blend-mode: screen;
  opacity: 0.82;
  pointer-events: none;
  position: absolute;
  transform-origin: top;
  width: 180px;
}

.spotlight-left {
  background: linear-gradient(180deg, rgba(38, 243, 255, 0.78), transparent);
  left: 18%;
  transform: skewX(-18deg);
}

.spotlight-right {
  background: linear-gradient(180deg, rgba(255, 63, 180, 0.72), transparent);
  right: 18%;
  transform: skewX(18deg);
}

.contestant {
  align-items: center;
  animation: contestantBounce 1.5s ease-in-out infinite alternate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.contestant:nth-of-type(2) {
  animation-delay: 0.18s;
}

.contestant:nth-of-type(3) {
  animation-delay: 0.34s;
}

.rank-tag {
  animation: tagFlash 0.64s steps(2, start) infinite;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  border: 2px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(255, 63, 180, 0.78);
  color: #070913;
  font-size: 0.74rem;
  font-weight: 1000;
  margin-bottom: 6px;
  padding: 4px 9px;
  text-transform: uppercase;
}

.first {
  order: 2;
}

.second {
  order: 1;
}

.third {
  order: 3;
}

.portrait {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 38%),
    conic-gradient(from 0deg, var(--cyan), var(--pink), var(--acid), var(--violet), var(--cyan));
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(255, 216, 74, 0.2),
    0 0 24px rgba(38, 243, 255, 0.88),
    0 0 46px rgba(255, 63, 180, 0.78);
  color: #09101a;
  display: flex;
  font-size: 1.6rem;
  font-weight: 1000;
  height: 86px;
  justify-content: center;
  margin-bottom: 10px;
  width: 86px;
}

.first .portrait {
  height: 106px;
  width: 106px;
}

.crown {
  border-bottom: 24px solid var(--gold);
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  filter: drop-shadow(0 0 15px rgba(255, 216, 74, 0.75));
  height: 0;
  margin-bottom: -4px;
  position: relative;
  width: 72px;
}

.crown::before,
.crown::after {
  border-bottom: 21px solid var(--gold);
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  content: "";
  position: absolute;
  top: 4px;
}

.crown::before {
  left: -28px;
  transform: rotate(-18deg);
}

.crown::after {
  right: -28px;
  transform: rotate(18deg);
}

.name,
.score {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name {
  background: #ffffff;
  border: 3px solid var(--acid);
  border-radius: 8px;
  color: #161423;
  font-size: 1.05rem;
  font-weight: 1000;
  line-height: 1.1;
  margin-bottom: 6px;
  max-width: 190px;
  padding: 8px 12px;
  text-transform: uppercase;
}

.score {
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 1000;
  margin-bottom: 10px;
  text-shadow: 0 0 14px rgba(255, 216, 74, 0.9), 0 0 30px rgba(255, 63, 180, 0.72);
}

.step {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.42), transparent 22%),
    linear-gradient(180deg, #ff4f4f, #d8ff2f 30%, #26f3ff 58%, #9019ff);
  background-size: 22px 22px, auto;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px 8px 0 0;
  box-shadow:
    inset 0 0 40px rgba(255, 255, 255, 0.22),
    0 0 18px rgba(38, 243, 255, 0.7),
    0 0 40px rgba(255, 63, 180, 0.54),
    0 18px 44px var(--shadow);
  display: flex;
  justify-content: center;
  position: relative;
  width: 100%;
}

.step::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  content: "";
  height: 4px;
  left: 16px;
  position: absolute;
  right: 16px;
  top: 16px;
}

.step span {
  color: rgba(255, 255, 255, 0.96);
  font-size: 6rem;
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.32),
    0 0 18px rgba(255, 255, 255, 0.95),
    0 0 34px var(--cyan);
}

.applause {
  animation: applauseFloat 1.1s ease-in-out infinite alternate;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid var(--pink);
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(255, 63, 180, 0.8), 0 0 34px rgba(38, 243, 255, 0.64);
  color: #11131f;
  font-size: 0.92rem;
  font-weight: 1000;
  padding: 8px 12px;
  pointer-events: none;
  position: absolute;
  text-transform: uppercase;
  top: 74px;
  z-index: 4;
}

.applause-left {
  left: 4%;
  transform: rotate(-8deg);
}

.applause-right {
  right: 3%;
  transform: rotate(7deg);
}

.host-card {
  animation: hostSlide 4s ease-in-out infinite;
  background: linear-gradient(90deg, rgba(6, 10, 22, 0.9), rgba(255, 63, 180, 0.34), rgba(38, 243, 255, 0.24));
  border: 2px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(255, 63, 180, 0.44);
  margin: 0 auto 10px;
  max-width: 650px;
  padding: 10px 14px;
  position: relative;
  text-align: center;
  text-transform: uppercase;
  z-index: 3;
}

.host-card span {
  color: var(--acid);
  display: block;
  font-size: 0.7rem;
  font-weight: 1000;
}

.host-card strong {
  color: #ffffff;
  display: block;
  font-size: 1rem;
  margin-top: 2px;
  text-shadow: 0 0 12px var(--cyan);
}

.first .step {
  min-height: 240px;
}

.second .step {
  min-height: 190px;
}

.third .step {
  min-height: 150px;
}

.control-desk {
  align-items: center;
  background:
    repeating-linear-gradient(90deg, rgba(255, 216, 74, 0.14) 0 10px, transparent 10px 20px),
    rgba(4, 8, 18, 0.84);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 82px;
  padding: 16px;
  position: relative;
  z-index: 3;
}

.control-desk button {
  align-items: center;
  animation: buttonGlow 0.9s ease-in-out infinite alternate;
  background: linear-gradient(180deg, #ffffff, #d8ff2f 48%, #ffd84a);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 6px 0 #8a5d00, 0 0 18px rgba(216, 255, 47, 0.72), 0 12px 26px rgba(0, 0, 0, 0.38);
  color: #14110a;
  cursor: pointer;
  display: inline-flex;
  font-weight: 1000;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  text-transform: uppercase;
}

.control-desk button span:first-child {
  align-items: center;
  background: #14110a;
  border-radius: 50%;
  color: var(--gold);
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.control-desk button:hover {
  filter: saturate(1.22);
  transform: translateY(-1px);
}

.control-desk button:active {
  box-shadow: 0 2px 0 #8a5d00, 0 8px 18px rgba(0, 0, 0, 0.34);
  transform: translateY(4px);
}

.stage.is-finale h1 {
  animation: titlePanic 0.16s infinite alternate;
}

.stage.is-finale .step {
  animation: podiumPulse 0.24s infinite alternate;
}

.stage.is-finale .ticker {
  animation: hueParty 0.42s linear infinite;
}

.stage.is-finale .stage-chrome,
.stage.is-finale .score-tile,
.stage.is-finale .host-card {
  animation-duration: 0.24s;
}

@keyframes blink {
  50% {
    opacity: 0.42;
  }
}

@keyframes scan {
  to {
    background-position-x: 240px;
  }
}

@keyframes staticShift {
  to {
    transform: translate(2px, -1px);
  }
}

@keyframes stageGlow {
  to {
    border-color: rgba(255, 63, 180, 0.9);
    box-shadow:
      0 0 0 6px rgba(38, 243, 255, 0.2),
      0 0 44px rgba(255, 63, 180, 0.68),
      0 30px 80px var(--shadow),
      inset 0 0 130px rgba(216, 255, 47, 0.12);
  }
}

@keyframes chromeSlide {
  to {
    transform: translateX(-50%);
  }
}

@keyframes lampPop {
  to {
    filter: brightness(1.75);
  }
}

@keyframes titleFlicker {
  0%,
  100% {
    filter: brightness(1);
  }

  8%,
  11%,
  46% {
    filter: brightness(1.65);
  }

  10%,
  48% {
    filter: brightness(0.78);
  }
}

@keyframes signWobble {
  to {
    transform: rotate(-1.5deg) scale(1.04);
  }
}

@keyframes tickerPulse {
  to {
    box-shadow: 0 0 24px rgba(255, 216, 74, 0.84);
    filter: saturate(1.55);
  }
}

@keyframes tileGlow {
  to {
    border-color: rgba(216, 255, 47, 0.72);
    box-shadow: inset 0 0 30px rgba(255, 63, 180, 0.24), 0 0 28px rgba(38, 243, 255, 0.32);
  }
}

@keyframes spotlightDance {
  to {
    filter: blur(1px) hue-rotate(80deg);
    transform: skewX(-8deg) scaleX(1.16);
  }
}

@keyframes contestantBounce {
  to {
    transform: translateY(-6px);
  }
}

@keyframes tagFlash {
  50% {
    background: linear-gradient(90deg, var(--acid), var(--gold));
  }
}

@keyframes applauseFloat {
  to {
    filter: hue-rotate(90deg);
    transform: translateY(-10px) rotate(5deg);
  }
}

@keyframes hostSlide {
  50% {
    transform: translateY(-4px) rotate(-0.5deg);
  }
}

@keyframes buttonGlow {
  to {
    filter: saturate(1.45) brightness(1.08);
  }
}

@keyframes titlePanic {
  to {
    text-shadow:
      4px 4px 0 var(--cyan),
      -4px -4px 0 var(--pink),
      0 0 34px rgba(255, 216, 74, 0.9);
  }
}

@keyframes podiumPulse {
  to {
    filter: brightness(1.35) saturate(1.4);
  }
}

@keyframes hueParty {
  to {
    filter: hue-rotate(360deg);
  }
}

@media (max-width: 760px) {
  .stage-shell {
    padding: 10px;
  }

  .stage {
    min-height: calc(100vh - 20px);
  }

  .show-header {
    grid-template-columns: 1fr;
    padding: 40px 16px 12px;
  }

  .badge,
  .jackpot {
    justify-self: center;
  }

  h1 {
    font-size: 2.35rem;
  }

  .ticker {
    justify-content: start;
    overflow-x: auto;
    padding: 0 12px;
  }

  .score-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 360px;
  }

  .podium-wrap {
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 360px;
    padding: 16px 10px 0;
  }

  .portrait {
    border-width: 3px;
    font-size: 1rem;
    height: 56px;
    width: 56px;
  }

  .first .portrait {
    height: 68px;
    width: 68px;
  }

  .crown {
    transform: scale(0.7);
  }

  .name {
    font-size: 0.72rem;
    padding: 6px;
  }

  .rank-tag {
    font-size: 0.62rem;
    padding: 3px 5px;
  }

  .score {
    font-size: 0.84rem;
  }

  .step span {
    font-size: 3.4rem;
  }

  .first .step {
    min-height: 170px;
  }

  .second .step {
    min-height: 136px;
  }

  .third .step {
    min-height: 112px;
  }

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

  .control-desk button {
    justify-content: center;
  }

  .applause {
    font-size: 0.68rem;
    padding: 5px 7px;
    top: 120px;
  }

  .host-card {
    margin-left: 16px;
    margin-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
