/* ============================================================
   Chaos Created — Prize Draw
   Fonts self-hosted so the installed PWA still looks right offline.
   ============================================================ */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin.woff2?v=9") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-ext.woff2?v=9") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/outfit-latin.woff2?v=9") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/outfit-latin-ext.woff2?v=9") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand palette */
  --orange: #f17022;
  --orange-lt: #f68b1f;
  --cyan: #62c2cc;
  --ice: #e4f6f8;
  --lime: #eef66c;

  /* Surfaces */
  --ink: #080c18;
  --ink-2: #101a30;
  --ink-3: #16223d;
  --card-bg: rgba(16, 26, 48, 0.72);
  --border: rgba(228, 246, 248, 0.14);

  --text: var(--ice);
  --text-muted: rgba(228, 246, 248, 0.58);
  --success: #7ee0a8;
  --error: #ff8a6b;

  --radius: 20px;
  --radius-sm: 12px;

  --display: "Fredoka", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;

  --glow-orange: 0 12px 34px -10px rgba(241, 112, 34, 0.65);
  --ease-out-back: cubic-bezier(0.34, 1.4, 0.5, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 16px;
  color: var(--text);
  background: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Animated aurora backdrop ---------- */

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(38% 34% at 18% 12%, rgba(241, 112, 34, 0.5), transparent 65%),
    radial-gradient(42% 38% at 84% 18%, rgba(98, 194, 204, 0.38), transparent 66%),
    radial-gradient(36% 32% at 72% 88%, rgba(238, 246, 108, 0.2), transparent 68%),
    radial-gradient(46% 42% at 8% 82%, rgba(246, 139, 31, 0.28), transparent 70%);
  filter: blur(10px);
  animation: aurora 26s ease-in-out infinite alternate;
}

/* Fine grain so the big gradients don't band on wide screens */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
  background-image: radial-gradient(rgba(228, 246, 248, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
}

@keyframes aurora {
  0% {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }
  50% {
    transform: translate3d(3%, 2%, 0) scale(1.08);
  }
  100% {
    transform: translate3d(-2%, 3%, 0) scale(1.03);
  }
}

/* ---------- Floating rings (nicked from the logo) ---------- */

.bubbles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  border: 3px solid currentColor;
  opacity: 0.16;
  animation: float-ring 18s ease-in-out infinite;
}

.bubble::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: currentColor;
}

.bubble-1 { color: var(--orange); width: 84px; height: 84px; top: 12%; left: 6%; animation-duration: 21s; }
.bubble-2 { color: var(--cyan); width: 46px; height: 46px; top: 26%; right: 9%; animation-duration: 16s; animation-delay: -4s; }
.bubble-3 { color: var(--lime); width: 30px; height: 30px; top: 62%; left: 12%; animation-duration: 19s; animation-delay: -9s; }
.bubble-4 { color: var(--orange-lt); width: 62px; height: 62px; bottom: 12%; right: 14%; animation-duration: 24s; animation-delay: -2s; }
.bubble-5 { color: var(--cyan); width: 22px; height: 22px; top: 44%; right: 4%; animation-duration: 14s; animation-delay: -7s; }
.bubble-6 { color: var(--orange); width: 36px; height: 36px; bottom: 28%; left: 4%; animation-duration: 17s; animation-delay: -11s; }

@keyframes float-ring {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  33% {
    transform: translate3d(14px, -26px, 0) rotate(60deg);
  }
  66% {
    transform: translate3d(-18px, 16px, 0) rotate(-40deg);
  }
}

@media (max-width: 640px) {
  .bubble-1, .bubble-4 { display: none; }
}

/* ---------- Layout ---------- */

.app {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---------- Header ---------- */

.app-header {
  text-align: center;
}

.brand-logo {
  max-width: 200px;
  width: 54%;
  height: auto;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 8px 22px rgba(241, 112, 34, 0.45));
  animation: logo-in 0.9s var(--ease-out-back) backwards;
}

@keyframes logo-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.86) rotate(-4deg);
  }
}

.app-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--orange) 0%, var(--lime) 20%, var(--orange-lt) 40%, var(--cyan) 62%, var(--orange-lt) 82%, var(--orange) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-sheen 9s linear infinite;
}

@keyframes title-sheen {
  to {
    background-position: 260% 0;
  }
}

.subtitle {
  margin: 0 auto;
  max-width: 34ch;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.install-btn {
  margin-top: 16px;
  border: 2px solid rgba(241, 112, 34, 0.75);
  background: rgba(241, 112, 34, 0.08);
  color: var(--orange-lt);
  border-radius: 999px;
  padding: 9px 20px;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.install-btn:hover {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--glow-orange);
}

.install-btn:active {
  transform: scale(0.96);
}

/* ---------- Stepper ---------- */

.stepper {
  position: relative;
  padding: 0 6px;
}

.stepper-rail {
  position: absolute;
  top: 17px;
  left: calc(6px + 12.5%);
  right: calc(6px + 12.5%);
  height: 3px;
  border-radius: 3px;
  background: rgba(228, 246, 248, 0.13);
  overflow: hidden;
}

.stepper-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-lt), var(--cyan));
  transition: width 0.5s var(--ease-out-back);
}

.stepper-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.stepper-bubble {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(228, 246, 248, 0.18);
  background: var(--ink-2);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: transform 0.35s var(--ease-out-back), background 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

.stepper-label {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.stepper-item.is-done .stepper-bubble {
  background: linear-gradient(140deg, var(--orange), var(--orange-lt));
  border-color: transparent;
  color: #fff;
}

.stepper-item.is-active .stepper-bubble {
  background: linear-gradient(140deg, var(--orange), var(--orange-lt));
  border-color: transparent;
  color: #fff;
  transform: scale(1.16);
  box-shadow: 0 0 0 5px rgba(241, 112, 34, 0.16), var(--glow-orange);
}

.stepper-item.is-active .stepper-label,
.stepper-item.is-done .stepper-label {
  color: var(--text);
}

/* ---------- Wizard ---------- */

.wizard {
  position: relative;
  overflow: hidden;
  transition: height 0.45s var(--ease-out-back);
}

.wizard-track {
  display: flex;
  width: 400%;
  align-items: flex-start;
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.25, 1);
}

.step-panel {
  flex: 0 0 25%;
  width: 25%;
  padding: 6px 8px 20px;
  opacity: 0.35;
  transition: opacity 0.4s ease;
}

.step-panel.is-active {
  opacity: 1;
}

.step-panel.is-active .card {
  animation: card-in 0.55s var(--ease-out-back) backwards;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Gradient hairline border */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(145deg, rgba(241, 112, 34, 0.85), rgba(98, 194, 204, 0.5) 48%, rgba(238, 246, 108, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.card h2 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--orange), var(--orange-lt));
  box-shadow: var(--glow-orange);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.hidden {
  display: none !important;
}

/* ---------- Dropzone ---------- */

.dropzone {
  position: relative;
  border: 2px dashed rgba(228, 246, 248, 0.22);
  border-radius: var(--radius-sm);
  padding: 34px 18px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-out-back);
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  border-color: var(--orange);
  background: rgba(241, 112, 34, 0.09);
  transform: translateY(-2px);
  outline: none;
}

.dropzone.dragover {
  border-style: solid;
  box-shadow: inset 0 0 40px rgba(241, 112, 34, 0.18);
}

.dropzone-icon {
  display: block;
  font-size: 2.1rem;
  margin-bottom: 10px;
  transition: transform 0.35s var(--ease-out-back);
}

.dropzone:hover .dropzone-icon,
.dropzone.dragover .dropzone-icon {
  transform: translateY(-4px) rotate(-6deg) scale(1.1);
}

.dropzone.is-loaded {
  border-color: rgba(126, 224, 168, 0.6);
  background: rgba(126, 224, 168, 0.07);
}

.dropzone-text {
  margin: 0 0 6px;
}

.dropzone-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.file-info {
  margin: 14px 0 0;
  color: var(--success);
  font-size: 0.9rem;
}

.file-info:not(:empty) {
  animation: pop-in 0.4s var(--ease-out-back);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.error-message {
  margin: 14px 0 0;
  color: var(--error);
  font-size: 0.9rem;
}

.error-message:empty {
  display: none;
}

.error-message:not(:empty) {
  animation: nudge 0.4s ease;
}

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* ---------- Form controls ---------- */

.field-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.field-row label {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.field-row label em {
  font-style: normal;
  opacity: 0.75;
}

select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background-color: var(--ink-2);
  background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 2px), calc(100% - 13px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--body);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 40px 12px 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:hover {
  border-color: rgba(98, 194, 204, 0.5);
}

select:focus-visible {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(98, 194, 204, 0.18);
}

select option {
  background: var(--ink-2);
  color: var(--text);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  cursor: pointer;
  line-height: 1.45;
}

.checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--border);
  border-radius: 7px;
  background: var(--ink-2);
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s var(--ease-out-back);
}

.checkbox-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s var(--ease-out-back);
}

.checkbox-row input[type="checkbox"]:checked {
  background: linear-gradient(140deg, var(--orange), var(--orange-lt));
  border-color: transparent;
}

.checkbox-row input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-row input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(241, 112, 34, 0.22);
}

.row-count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--cyan);
  font-weight: 500;
}

/* ---------- Buttons ---------- */

.primary-btn,
.secondary-btn {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.14s var(--ease-out-back), box-shadow 0.22s ease, opacity 0.18s ease,
    background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(120deg, var(--orange) 0%, var(--orange-lt) 55%, var(--orange) 100%);
  background-size: 200% 100%;
  color: #fff;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-orange);
}

.primary-btn:hover:not(:disabled) {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -12px rgba(241, 112, 34, 0.8);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

.primary-btn:disabled {
  background: rgba(228, 246, 248, 0.1);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* The big one gets a permanent shimmer + heartbeat */
.primary-btn-hero {
  animation: hero-pulse 2.6s ease-in-out infinite;
}

.primary-btn-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: skewX(-20deg);
  animation: sweep 3.4s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 12px 34px -10px rgba(241, 112, 34, 0.65); }
  50% { box-shadow: 0 16px 44px -8px rgba(241, 112, 34, 0.95); }
}

@keyframes sweep {
  0%, 62% { left: -60%; }
  100% { left: 130%; }
}

.secondary-btn {
  background: rgba(228, 246, 248, 0.06);
  color: var(--text);
  border: 1.5px solid var(--border);
  flex: 1;
}

.secondary-btn:hover:not(:disabled) {
  border-color: rgba(98, 194, 204, 0.65);
  background: rgba(98, 194, 204, 0.13);
  transform: translateY(-2px);
}

.secondary-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.install-btn:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

/* Click ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: ripple-out 0.6s ease-out forwards;
  pointer-events: none;
}

.secondary-btn .ripple {
  background: rgba(98, 194, 204, 0.35);
}

@keyframes ripple-out {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.step-actions-end {
  justify-content: flex-end;
}

.step-actions .primary-btn,
.step-actions .secondary-btn {
  width: auto;
  flex: 0 0 auto;
  min-width: 120px;
}

/* ---------- Winners ---------- */

.card-winners {
  background: linear-gradient(165deg, rgba(241, 112, 34, 0.16), var(--card-bg) 42%);
}

.winners-heading {
  justify-content: center;
  gap: 14px;
  font-size: 1.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.winners-word {
  background: linear-gradient(100deg, var(--lime) 0%, var(--orange-lt) 45%, var(--cyan) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-sheen 6s linear infinite;
}

.trophy {
  display: inline-block;
  animation: trophy-bob 2.2s ease-in-out infinite;
}

@keyframes trophy-bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-5px) rotate(6deg); }
}

.winners-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.winners-list li {
  position: relative;
  overflow: hidden;
  background: rgba(8, 12, 24, 0.55);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: winner-in 0.6s var(--ease-out-back) backwards;
}

.winners-list li:first-child {
  border-color: rgba(241, 112, 34, 0.65);
  background: linear-gradient(110deg, rgba(241, 112, 34, 0.2), rgba(8, 12, 24, 0.55) 60%);
  box-shadow: 0 10px 30px -14px rgba(241, 112, 34, 0.9);
}

/* Shimmer sweep across the top winner */
.winners-list li:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(238, 246, 108, 0.28), transparent);
  transform: skewX(-20deg);
  animation: sweep 4s ease-in-out 1s infinite;
}

@keyframes winner-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.9) rotate(-1.5deg);
  }
}

.winner-rank {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--cyan), rgba(98, 194, 204, 0.35));
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.winners-list li:first-child .winner-rank {
  background: linear-gradient(140deg, var(--lime), var(--orange-lt));
  box-shadow: 0 0 0 4px rgba(238, 246, 108, 0.14);
}

.winner-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.winner-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.25;
  word-break: break-word;
}

.winner-email {
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
}

.results-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.results-actions .secondary-btn {
  font-size: 0.92rem;
  padding: 12px 14px;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .results-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Draw overlay (the suspense bit) ---------- */

.draw-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 12, 24, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade-in 0.25s ease;
}

.draw-overlay[hidden] {
  display: none;
}

.draw-overlay.is-closing {
  animation: fade-out 0.3s ease forwards;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes fade-out {
  to { opacity: 0; }
}

.draw-overlay-inner {
  width: min(460px, 100%);
  text-align: center;
}

.draw-overlay-label {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.reel {
  position: relative;
  height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid rgba(241, 112, 34, 0.4);
  background: linear-gradient(180deg, rgba(241, 112, 34, 0.14), rgba(98, 194, 204, 0.08));
  box-shadow: inset 0 18px 26px -18px #000, inset 0 -18px 26px -18px #000, var(--glow-orange);
}

.reel-name {
  display: block;
  padding: 0 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  line-height: 1.1;
  color: var(--ice);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  animation: reel-tick 0.001s;
}

.reel.is-spinning .reel-name {
  animation: reel-tick 0.12s ease-out;
}

@keyframes reel-tick {
  from {
    opacity: 0.2;
    transform: translateY(24px) scale(0.94);
    filter: blur(3px);
  }
}

.reel.is-landed {
  border-color: var(--lime);
  animation: reel-land 0.6s var(--ease-out-back);
}

.reel.is-landed .reel-name {
  color: var(--lime);
  animation: none;
  text-shadow: 0 0 26px rgba(238, 246, 108, 0.55);
}

@keyframes reel-land {
  0% { transform: scale(1); }
  40% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

.reel-bar {
  height: 5px;
  margin-top: 16px;
  border-radius: 5px;
  background: rgba(228, 246, 248, 0.12);
  overflow: hidden;
}

.reel-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--orange), var(--lime), var(--cyan));
  transition: width 0.18s linear;
}

/* ---------- Confetti ---------- */

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 70;
  pointer-events: none;
}

/* ---------- Footer ---------- */

.app-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.app-footer p {
  margin: 5px 0;
}

.footer-brand {
  font-family: var(--display);
  font-weight: 600;
  color: var(--orange-lt);
}

.footer-brand a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s ease;
}

.footer-brand a:hover,
.footer-brand a:focus-visible {
  border-bottom-color: currentColor;
}

/* ---------- Small screens ---------- */

@media (max-width: 420px) {
  .card {
    padding: 20px 16px;
  }

  .stepper-label {
    font-size: 0.66rem;
  }

  .step-actions .primary-btn,
  .step-actions .secondary-btn {
    min-width: 0;
    flex: 1 1 0;
    padding: 13px 12px;
    font-size: 0.94rem;
  }
}

/* ---------- Reduced motion ---------- */

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

  .wizard-track {
    transition: none;
  }

  .bubbles,
  .primary-btn-hero::after,
  .winners-list li:first-child::after {
    display: none;
  }
}
