:root {
  color-scheme: dark;
  --ink: #fff8ff;
  --panel: rgba(28, 9, 58, 0.78);
  --line: rgba(255, 255, 255, 0.18);
  --purple: #7c3cff;
  --purple-bright: #b45cff;
  --pink: #ff4fd8;
  --gold: #ffd166;
  --cyan: #70f7ff;
  --shadow: 0 34px 90px rgba(8, 0, 26, 0.52);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 79, 216, 0.36), transparent 28%),
    radial-gradient(circle at 18% 84%, rgba(112, 247, 255, 0.2), transparent 25%),
    linear-gradient(145deg, #16052e 0%, #331072 48%, #140327 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}

body::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 209, 102, 0.9) 0 1px, transparent 1.5px);
  background-position:
    22px 26px,
    70px 82px;
  background-size:
    96px 96px,
    132px 132px;
  opacity: 0.45;
}

body::after {
  animation: shimmer 6s linear infinite;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent) 0 0 / 240px 100%;
  opacity: 0.55;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  font: inherit;
}

.page-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  padding: clamp(18px, 5vw, 54px);
  position: relative;
}

.intro-panel {
  align-content: center;
  background:
    linear-gradient(180deg, rgba(70, 22, 136, 0.88), rgba(25, 7, 57, 0.9)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  display: grid;
  gap: clamp(24px, 5vw, 42px);
  justify-items: center;
  max-width: 760px;
  min-height: min(760px, calc(100dvh - 36px));
  overflow: hidden;
  padding: clamp(28px, 6vw, 56px);
  position: relative;
  width: min(100%, 760px);
}

.intro-panel::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent),
    linear-gradient(90deg, var(--pink), var(--purple-bright), var(--cyan));
  content: "";
  height: 6px;
  inset: 0 0 auto;
  position: absolute;
}

.intro-panel::after {
  aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 62%),
    conic-gradient(from 24deg, rgba(255, 79, 216, 0.28), rgba(112, 247, 255, 0.12), rgba(255, 209, 102, 0.2), rgba(255, 79, 216, 0.28));
  border-radius: 50%;
  content: "";
  opacity: 0.48;
  position: absolute;
  right: -150px;
  top: -170px;
  width: 360px;
}

.hero-copy {
  display: grid;
  justify-items: center;
  margin-top: clamp(10px, 3vw, 28px);
  position: relative;
  text-align: center;
  z-index: 1;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #ffffff;
  font-size: clamp(2.75rem, 9vw, 5.8rem);
  letter-spacing: 0;
  line-height: 0.9;
  max-width: 650px;
  text-shadow:
    0 4px 0 rgba(255, 79, 216, 0.36),
    0 18px 36px rgba(4, 0, 18, 0.44);
}

h2 {
  color: #ffffff;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 10px 28px rgba(4, 0, 18, 0.46);
}

.stage {
  align-items: center;
  display: grid;
  gap: 22px;
  justify-items: center;
  min-height: 230px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.stage::before {
  background:
    radial-gradient(ellipse, rgba(255, 79, 216, 0.38), transparent 68%),
    radial-gradient(ellipse, rgba(112, 247, 255, 0.18), transparent 72%);
  content: "";
  filter: blur(12px);
  height: 180px;
  left: 50%;
  position: absolute;
  top: 28px;
  transform: translateX(-50%);
  width: min(86%, 460px);
  z-index: -1;
}

.gift-button {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  height: 176px;
  justify-content: center;
  padding: 0;
  width: 220px;
}

.gift-button:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible,
.drag-thumb:focus-visible {
  outline: 3px solid rgba(112, 247, 255, 0.56);
  outline-offset: 4px;
}

.gift-visual {
  display: block;
  height: 162px;
  position: relative;
  transform: translateY(2px);
  transform-origin: center bottom;
  transition: transform 180ms ease;
  width: 190px;
}

.gift-button:hover .gift-visual,
.gift-button.is-open .gift-visual {
  transform: translateY(-4px) rotate(-1deg) scale(1.02);
}

.gift-box,
.gift-lid,
.gift-ribbon,
.gift-bow {
  position: absolute;
}

.gift-box {
  background: linear-gradient(145deg, #ff4fd8, #7c3cff);
  border: 4px solid rgba(255, 248, 255, 0.76);
  border-radius: 10px;
  bottom: 0;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.32),
    inset 0 0 28px rgba(255, 255, 255, 0.16);
  height: 96px;
  left: 22px;
  width: 146px;
}

.gift-lid {
  background: linear-gradient(145deg, #ff7be6, #9b5cff);
  border: 4px solid rgba(255, 248, 255, 0.76);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  height: 34px;
  left: 12px;
  top: 42px;
  transform-origin: 34px 42px;
  transition: transform 260ms ease;
  width: 166px;
  z-index: 3;
}

.gift-button.is-open .gift-lid {
  transform: rotate(-14deg) translate(-8px, -13px);
}

.gift-ribbon {
  background: linear-gradient(180deg, #ffe7a1, var(--gold));
  bottom: 0;
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.56);
  height: 132px;
  left: 82px;
  width: 26px;
  z-index: 4;
}

.gift-bow {
  background: linear-gradient(145deg, #ffe7a1, var(--gold));
  border: 4px solid rgba(255, 248, 255, 0.72);
  height: 44px;
  top: 6px;
  width: 62px;
  z-index: 2;
}

.gift-bow-left {
  border-radius: 64% 44% 44% 64%;
  left: 38px;
  transform: rotate(24deg);
}

.gift-bow-right {
  border-radius: 44% 64% 64% 44%;
  right: 38px;
  transform: rotate(-24deg);
}

.primary-action,
.secondary-action {
  align-items: center;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0;
  min-height: 58px;
  padding: 0 28px;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary-action {
  background: linear-gradient(135deg, var(--pink), var(--purple-bright));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 16px 34px rgba(255, 79, 216, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: #ffffff;
  min-width: min(100%, 286px);
}

.primary-action:hover:not(:disabled) {
  box-shadow:
    0 20px 38px rgba(255, 79, 216, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  color: #ffffff;
}

.verify-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

.form-message {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 800;
  min-height: 1.35em;
  text-align: center;
}

.turnstile-wrap {
  min-height: 65px;
}

.drag-challenge {
  width: min(100%, 470px);
}

.drag-track {
  align-items: center;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 48px rgba(4, 0, 18, 0.3);
  display: flex;
  height: 72px;
  overflow: hidden;
  padding: 7px;
  position: relative;
  touch-action: none;
  user-select: none;
}

.drag-progress {
  background: linear-gradient(90deg, rgba(255, 79, 216, 0.72), rgba(112, 247, 255, 0.55));
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(255, 79, 216, 0.34);
  inset: 7px auto 7px 7px;
  position: absolute;
  transition: width 90ms linear;
  width: 0;
}

.drag-text {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  left: 82px;
  line-height: 1;
  padding-right: 14px;
  position: absolute;
  right: 8px;
  text-align: center;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.34);
  z-index: 1;
}

.drag-thumb {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #eadbff);
  border: 0;
  border-radius: 14px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.24);
  color: var(--purple);
  cursor: grab;
  display: inline-flex;
  font-size: 2.4rem;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  left: 7px;
  line-height: 1;
  padding: 0 0 4px;
  position: absolute;
  top: 7px;
  transition:
    left 90ms linear,
    transform 160ms ease;
  width: 64px;
  z-index: 2;
}

.drag-thumb:active {
  cursor: grabbing;
  transform: scale(0.98);
}

.drag-track.is-complete .drag-progress {
  background: linear-gradient(90deg, var(--gold), var(--cyan));
}

.drag-track.is-complete .drag-thumb {
  color: #3b166f;
}

.unlocked {
  gap: 24px;
  justify-items: center;
  text-align: center;
}

.unlock-badge {
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 42%, #ffffff 0 7%, transparent 8%),
    conic-gradient(from 0deg, var(--gold), var(--pink), var(--cyan), var(--gold));
  border-radius: 999px;
  box-shadow:
    0 0 42px rgba(255, 79, 216, 0.46),
    0 0 80px rgba(112, 247, 255, 0.24);
  width: 88px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
  width: 100%;
}

.link-action {
  min-width: min(100%, 280px);
}

[hidden] {
  display: none !important;
}

@keyframes shimmer {
  from {
    background-position: -260px 0;
  }

  to {
    background-position: calc(100vw + 260px) 0;
  }
}

@media (max-width: 560px) {
  .page-shell {
    align-items: stretch;
    padding: 12px;
  }

  .intro-panel {
    border-radius: 14px;
    gap: 26px;
    min-height: calc(100dvh - 24px);
    padding: 44px 18px 28px;
  }

  .intro-panel::after {
    right: -190px;
    top: -190px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.3rem);
  }

  .stage {
    gap: 18px;
    min-height: 250px;
  }

  .gift-button {
    height: 160px;
    width: 208px;
  }

  .gift-visual {
    transform: scale(0.92) translateY(2px);
  }

  .gift-button:hover .gift-visual,
  .gift-button.is-open .gift-visual {
    transform: scale(0.92) translateY(-4px) rotate(-1deg);
  }

  .drag-track {
    height: 68px;
  }

  .drag-thumb {
    height: 54px;
    width: 58px;
  }

  .drag-text {
    left: 74px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
