:root {
  --midnight: #08142b;
  --night-blue: #102a56;
  --storybook-blue: #184886;
  --pixie: #79d3ff;
  --cream: #fff6df;
  --gold: #f8c95a;
  --rose: #ff6f91;
  --mint: #7cf0c8;
  --shadow: rgba(3, 10, 24, 0.36);
  --panel: rgba(11, 26, 54, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top, rgba(121, 211, 255, 0.25), transparent 35%),
    linear-gradient(180deg, #11356f 0%, #0a1b39 42%, #07101f 100%);
  overflow-x: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.sky__glow {
  position: absolute;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.26;
}

.sky__glow--left {
  top: -10rem;
  left: -8rem;
  background: #7cf0c8;
}

.sky__glow--right {
  right: -7rem;
  bottom: -12rem;
  background: #ff6f91;
}

.sky__stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 64% 60%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 10% 70%, rgba(255, 255, 255, 0.75) 0 1.5px, transparent 2.4px),
    radial-gradient(circle at 50% 14%, rgba(248, 201, 90, 0.9) 0 1.4px, transparent 2.6px),
    radial-gradient(circle at 86% 74%, rgba(121, 211, 255, 0.9) 0 1.4px, transparent 2.6px);
  animation: twinkle 6s linear infinite alternate;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 2rem;
  align-items: center;
}

.hero,
.wheel-panel {
  position: relative;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.8rem;
  color: var(--gold);
}

h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.96;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.intro {
  max-width: 34rem;
  margin: 1rem 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 246, 223, 0.88);
}

.status-card,
.legend-card {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px var(--shadow);
}

.status-card {
  max-width: 32rem;
  padding: 1.3rem 1.4rem 1.5rem;
  border-radius: 1.6rem;
}

.status-card__label,
.legend-card__title {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pixie);
}

.status-card h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.status-card__park {
  margin: 0.4rem 0 0;
  font-size: 1rem;
  color: var(--gold);
  font-weight: 700;
}

.status-card__description {
  margin: 0.8rem 0 0;
  line-height: 1.6;
  color: rgba(255, 246, 223, 0.84);
}

.controls {
  margin-top: 1.4rem;
}

.filter-control {
  display: grid;
  gap: 0.45rem;
  max-width: 19rem;
  margin-bottom: 1rem;
}

.filter-control__label {
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pixie);
}

.filter-control__select {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 246, 223, 0.96);
  color: #10213e;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.spin-button,
.wheel-center {
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.spin-button {
  padding: 1rem 1.6rem;
  border-radius: 999px;
  color: #09203d;
  background: linear-gradient(135deg, #ffe29a, #f8c95a 55%, #ffb347);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 18px 32px rgba(248, 201, 90, 0.26);
}

.spin-button:hover,
.wheel-center:hover {
  transform: translateY(-2px) scale(1.01);
}

.spin-button:disabled,
.wheel-center:disabled {
  cursor: progress;
  opacity: 0.7;
}

.spin-message {
  margin: 0.9rem 0 0;
  min-height: 1.4rem;
  color: rgba(255, 246, 223, 0.8);
}

.wheel-panel {
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.wheel-panel--hero {
  margin: 1.1rem 0 1rem;
  justify-items: start;
}

.wheel-panel--hero .wheel-frame {
  width: min(100%, 29rem);
}

.wheel-frame {
  position: relative;
  width: min(100%, 38rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.wheel-frame::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 68%, transparent 72%);
  filter: blur(10px);
}

.wheel-pointer {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 38px solid var(--cream);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
  z-index: 3;
}

.wheel-canvas {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.4));
}

.wheel-center {
  position: absolute;
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  z-index: 3;
  font-size: 1.35rem;
  font-weight: 900;
  color: #0d2342;
  background:
    radial-gradient(circle at 30% 30%, #fff5d1, #f8c95a 55%, #e39b25 100%);
  box-shadow:
    inset 0 4px 8px rgba(255, 255, 255, 0.36),
    0 18px 24px rgba(0, 0, 0, 0.22);
}

.legend-card {
  width: min(100%, 26rem);
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 1.25rem;
}

.boarding-popup {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.boarding-popup.is-visible {
  opacity: 1;
  visibility: visible;
}

.boarding-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 24, 0.7);
  backdrop-filter: blur(8px);
}

.boarding-popup__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 32rem);
  padding: 1.6rem 1.5rem 1.5rem;
  border-radius: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at top, rgba(121, 211, 255, 0.2), transparent 45%),
    rgba(11, 26, 54, 0.94);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
  text-align: center;
  transform: translateY(16px) scale(0.96);
  transition: transform 220ms ease;
}

.boarding-popup.is-visible .boarding-popup__panel {
  transform: translateY(0) scale(1);
}

.boarding-popup__panel h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1;
}

.boarding-popup__panel--compact {
  width: min(100%, 34rem);
}

.park-picker-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.park-picker-button {
  padding: 1rem 1.1rem;
  border: 0;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.12);
  color: var(--cream);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.park-picker-button:hover {
  transform: translateY(-2px);
  background: rgba(121, 211, 255, 0.2);
}

.park-picker-button--secondary {
  grid-column: 1 / -1;
  background: rgba(248, 201, 90, 0.18);
}

.popup-close {
  padding: 0.95rem 1.4rem;
  border: 0;
  border-radius: 999px;
  color: #09203d;
  background: linear-gradient(135deg, #ffe29a, #f8c95a 55%, #ffb347);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(248, 201, 90, 0.24);
}

.popup-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.popup-share {
  padding: 0.95rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(121, 211, 255, 0.18);
  color: var(--cream);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.popup-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  font-weight: 800;
  text-decoration: none;
}

.park-list {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.park-list li {
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 246, 223, 0.92);
}

.park-list strong {
  display: block;
  color: var(--gold);
  margin-bottom: 0.2rem;
}

@keyframes twinkle {
  from {
    opacity: 0.7;
    transform: scale(1);
  }

  to {
    opacity: 1;
    transform: scale(1.015);
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
  }

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

  .filter-control {
    margin-left: auto;
    margin-right: auto;
  }

  h1 {
    max-width: 12ch;
  }

  .wheel-panel--hero {
    justify-items: center;
  }

}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top, rgba(121, 211, 255, 0.24), transparent 28%),
      linear-gradient(180deg, #123870 0%, #09162f 48%, #050d1a 100%);
  }

  .app-shell {
    width: min(100vw - 1rem, 1200px);
    gap: 1.25rem;
  }

  .status-card,
  .legend-card {
    border-radius: 1.25rem;
  }

  .park-list {
    grid-template-columns: 1fr;
  }

  .park-picker-buttons {
    grid-template-columns: 1fr;
  }

  .wheel-center {
    width: 5.4rem;
    height: 5.4rem;
    font-size: 1.1rem;
  }
}
