* {
  margin: 0;
  padding: 0;
  font-family: 'Georgia', serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

root {
  --clr-1: #00c2ff;
  --clr-2: #33ff8c;
  --clr-3: #ffc640;
  --clr-4: #e54cff;

  --blur: 1rem;
  --fs: clamp(3rem, 8vw, 7rem);
  --ls: clamp(-1.75px, -0.25vw, -3.5px);
}

html, body {
  height: 100%;
}

body {
  background: linear-gradient(135deg, #085a29 0%, #048613 100%);
  display: flex;
  flex-direction: column;
  touch-action: none;
  overscroll-behavior-y: contain;
  
  width: 100%;
}

.header {
  
  color: white;
  padding: 25px 20px;
  text-align: center;
  
}
.neon-text {
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 0 5px #ff005e, 0 0 10px #ff005e, 0 0 20px #ff005e, 0 0 40px #ff005e, 0 0 80px #ff005e;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px #ff005e, 0 0 10px #ff005e, 0 0 20px #ff005e, 0 0 40px #ff005e, 0 0 80px #ff005e;
    }
    100% {
        text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff, 0 0 40px #00d4ff, 0 0 80px #00d4ff, 0 0 160px #00d4ff;
    }
}

.title {
  font-size: var(--fs);
  font-weight: 800;
  letter-spacing: var(--ls);
  position: relative;
  overflow: hidden;
  background: var(--bg);
  margin: 0;
}


.aurora {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  mix-blend-mode: darken;
  pointer-events: none;
}

.aurora__item {
  overflow: hidden;
  position: absolute;
  width: 60vw;
  height: 60vw;
  background-color: var(--clr-1);
  border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
  filter: blur(var(--blur));
  mix-blend-mode: overlay;
}

.aurora__item:nth-of-type(1) {
  top: -50%;
  animation: aurora-border 6s ease-in-out infinite,
    aurora-1 12s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(2) {
  background-color: var(--clr-3);
  right: 0;
  top: 0;
  animation: aurora-border 6s ease-in-out infinite,
    aurora-2 12s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(3) {
  background-color: var(--clr-2);
  left: 0;
  bottom: 0;
  animation: aurora-border 6s ease-in-out infinite,
    aurora-3 8s ease-in-out infinite alternate;
}

.aurora__item:nth-of-type(4) {
  background-color: var(--clr-4);
  right: 0;
  bottom: -50%;
  animation: aurora-border 6s ease-in-out infinite,
    aurora-4 24s ease-in-out infinite alternate;
}

@keyframes aurora-1 {
  0% {
    top: 0;
    right: 0;
  }

  50% {
    top: 100%;
    right: 75%;
  }

  75% {
    top: 100%;
    right: 25%;
  }

  100% {
    top: 0;
    right: 0;
  }
}

@keyframes aurora-2 {
  0% {
    top: -50%;
    left: 0%;
  }

  60% {
    top: 100%;
    left: 75%;
  }

  85% {
    top: 100%;
    left: 25%;
  }

  100% {
    top: -50%;
    left: 0%;
  }
}

@keyframes aurora-3 {
  0% {
    bottom: 0;
    left: 0;
  }

  40% {
    bottom: 100%;
    left: 75%;
  }

  65% {
    bottom: 40%;
    left: 50%;
  }

  100% {
    bottom: 0;
    left: 0;
  }
}

@keyframes aurora-4 {
  0% {
    bottom: -50%;
    right: 0;
  }

  50% {
    bottom: 0%;
    right: 40%;
  }

  90% {
    bottom: 50%;
    right: 25%;
  }

  100% {
    bottom: -50%;
    right: 0;
  }
}

@keyframes aurora-border {
  0% {
    border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
  }

  25% {
    border-radius: 47% 29% 39% 49% / 61% 19% 66% 26%;
  }

  50% {
    border-radius: 57% 23% 47% 72% / 63% 17% 66% 33%;
  }

  75% {
    border-radius: 28% 49% 29% 100% / 93% 20% 64% 25%;
  }

  100% {
    border-radius: 37% 29% 27% 27% / 28% 25% 41% 37%;
  }
}

.header h1 {
  font-size: 28px;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.header p {
  font-size: 14px;
  opacity: 0.95;
  margin: 3px 0;
}

.header .subtitle {
  font-size: 16px;
  font-style: italic;
  margin-top: 8px;
}


.wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.wheel-wrapper {
  visibility: hidden;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  max-width: 500px;
}

.wheel-wrapper canvas {
  filter: brightness(0.95) contrast(1.05) drop-shadow(0px 0px 0px rgba(0,0,0,0));
}

.spin-button {
  padding: 15px 40px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spin-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(196, 30, 58, 0.6);
  background: linear-gradient(135deg, #e63946 0%, #a4161a 100%);
}

.spin-button:active {
  transform: translateY(-1px);
}

.footer {
  background: rgba(0, 0, 0, 0.3);
  color: #999;
  text-align: center;
  padding: 15px;
  border-top: 1px solid rgba(196, 30, 58, 0.3);
  font-size: 14px;
}

/* Result Popup */
.result-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.result-content {
  background: white;
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
  max-width: 85%;
  animation: slideIn 0.3s ease;
  border-top: 5px solid #c41e3a;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.result-icon {
  font-size: 38px;
  margin-bottom: 15px;
}

#resultText {
  font-size: 26px;
  margin-bottom: 20px;
  color: #333;
  font-weight: bold;
  line-height: 1.4;
}

.close-button {
  background: linear-gradient(135deg, #228b22 0%, #0b4f0b 100%);
  color: white;
  padding: 12px 30px;
  margin-top: 15px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.close-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(34, 139, 34, 0.4);
}

/* Result Display Box */
.result-display {
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(34, 139, 34, 0.1) 100%);
  border: 2px solid #c41e3a;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#resultDisplayText {
  font-size: 22px;
  color: #c41e3a;
  font-weight: bold;
  margin: 0;
}

/* Snowfall Effect */
.snowflake {
  position: fixed;
  top: -10px;
  color: white;
  font-size: 1.5em;
  z-index: 100;
  pointer-events: none;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes snowfall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes snowfall2 {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(-50px) rotate(-360deg);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .header h1 {
    font-size: 22px;
  }

  .spin-button {
    padding: 12px 30px;
    font-size: 16px;
  }

  #resultText {
    font-size: 20px;
  }

  .result-icon {
    font-size: 40px;
  }
}
