/* ====================================
   VÒNG QUAY MAY MẮN - Wheel Styles
   ==================================== */

/* ====== Wheel Container ====== */
.wheel-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  margin: 0 auto;
}

/* ====== Outer Glow Ring ====== */
.wheel-outer-glow {
  position: absolute;
  width: 105%;
  height: 105%;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, transparent 45%, rgba(212, 168, 67, 0.15) 50%, transparent 55%);
  animation: outerGlow 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes outerGlow {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }

  100% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* ====== LED Border Ring ====== */
.wheel-led-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  pointer-events: none;
  z-index: 5;
}

.led-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--color-gold-light);
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px var(--color-gold-light), 0 0 12px rgba(245, 213, 118, 0.5);
  animation: ledBlink 1.5s ease-in-out infinite alternate;
}

.led-dot:nth-child(odd) {
  animation-delay: 0.75s;
}

@keyframes ledBlink {
  0% {
    opacity: 0.4;
    box-shadow: 0 0 4px var(--color-gold-light);
  }

  100% {
    opacity: 1;
    box-shadow: 0 0 8px var(--color-gold-light), 0 0 16px rgba(245, 213, 118, 0.6);
  }
}

/* Fast blink when spinning */
.wheel-section.spinning .led-dot {
  animation: ledBlinkFast 0.3s ease-in-out infinite alternate;
}

@keyframes ledBlinkFast {
  0% {
    opacity: 0.3;
  }

  100% {
    opacity: 1;
  }
}

/* ====== Gold Border ====== */
/* Hidden - using box-shadow on canvas instead */
.wheel-gold-border {
  display: none;
}

/* ====== Canvas Wheel ====== */
.wheel-canvas-container {
  position: relative;
  width: 88%;
  height: 88%;
  border-radius: var(--radius-full);
  overflow: hidden;
  z-index: 2;
  box-shadow:
    0 0 0 5px #d4a843,
    0 0 0 8px #f5d576,
    0 0 0 10px #a07830,
    0 0 20px rgba(212, 168, 67, 0.4),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
}

#wheelCanvas {
  width: 100%;
  height: 100%;
  transition: none;
}

/* ====== Center Hub ====== */
.wheel-center {
  position: absolute;
  width: 22%;
  height: 22%;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, #f5d576, #d4a843, #a07830);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  box-shadow:
    0 0 20px rgba(212, 168, 67, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.wheel-center::before {
  content: '';
  position: absolute;
  width: 85%;
  height: 85%;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.wheel-center-text {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  color: #1a1f3d;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 1px;
}

.wheel-center-text .big {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
}

/* ====== Pointer / Arrow ====== */
.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 50px;
  z-index: 10;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.wheel-pointer svg {
  width: 100%;
  height: 100%;
}

/* Pointer bounce when result */
.wheel-section.result .wheel-pointer {
  animation: pointerBounce 0.5s ease-in-out 3;
}

@keyframes pointerBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(5px);
  }
}

/* ====== Idle Rotation ====== */
.wheel-canvas-container.idle {
  animation: idleRotate 30s linear infinite;
}

@keyframes idleRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ====== Platform / Base ====== */
.wheel-platform {
  position: absolute;
  bottom: -20px;
  width: 110%;
  height: 40px;
  background: linear-gradient(180deg, #d4a843, #a07830);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.wheel-platform::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

/* ====== Responsive ====== */
@media (max-width: 420px) {
  .wheel-section {
    max-width: 320px;
  }

  .wheel-center-text {
    font-size: 0.55rem;
  }

  .wheel-center-text .big {
    font-size: 1.1rem;
  }

  .led-dot {
    width: 6px;
    height: 6px;
  }
}

@media (min-width: 421px) and (max-width: 768px) {
  .wheel-section {
    max-width: 360px;
  }
}