/* === FORTUNE WHEEL — Styles === */

/* Wheel Section */
.wheel-section {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, #060b16 0%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}

.wheel-section::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(245,197,24,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.wheel-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.wheel-text {
  max-width: 440px;
  text-align: left;
}

.wheel-text .label {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(245,197,24,0.12);
  color: var(--accent-gold);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.wheel-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.wheel-text h2 .gold {
  color: var(--accent-gold);
}

.wheel-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.wheel-prizes-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.wheel-prizes-list li {
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.wheel-prizes-list li i {
  color: var(--accent-gold);
  margin-right: 4px;
}

.wheel-attempts {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.wheel-attempts strong {
  color: var(--accent-green);
}

/* Wheel Container */
.wheel-container {
  position: relative;
  flex-shrink: 0;
}

.wheel-wrapper {
  position: relative;
  width: 380px;
  height: 380px;
}

.wheel-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 36px solid var(--accent-gold);
  filter: drop-shadow(0 4px 12px rgba(245,197,24,0.5));
}

.wheel-canvas {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(245,197,24,0.3),
    0 0 0 12px rgba(245,197,24,0.1),
    0 0 60px rgba(245,197,24,0.15),
    inset 0 0 30px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: filter 0.3s;
}

.wheel-canvas:hover {
  filter: brightness(1.05);
}

.wheel-canvas.spinning {
  cursor: not-allowed;
}

.wheel-spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-gold);
  border: 4px solid rgba(255,255,255,0.3);
  color: #000;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(245,197,24,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.wheel-spin-btn i {
  font-size: 1.2rem;
}

.wheel-spin-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 30px rgba(245,197,24,0.6);
}

.wheel-spin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: translate(-50%, -50%);
}

/* Win Modal */
.wheel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.wheel-modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wheel-modal {
  background: linear-gradient(145deg, #1a2236, #111827);
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(245,197,24,0.1);
}

@keyframes popIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.wheel-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s;
}

.wheel-modal-close:hover {
  color: var(--text-primary);
}

.wheel-modal .confetti-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.wheel-modal h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.wheel-modal .prize-value {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 16px 0;
  text-shadow: 0 2px 20px rgba(245,197,24,0.3);
}

.wheel-modal .prize-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.wheel-modal .claim-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background: var(--gradient-gold);
  color: #000;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(245,197,24,0.3); }
  50% { box-shadow: 0 8px 40px rgba(245,197,24,0.6); }
}

.wheel-modal .claim-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(245,197,24,0.5);
  color: #000;
}

.wheel-modal .timer-text {
  display: block;
  margin-top: 16px;
  color: #e53e3e;
  font-size: 0.85rem;
  font-weight: 600;
}

.wheel-modal .timer-text i {
  margin-right: 4px;
}

/* Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10001;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Sound toggle */
.sound-toggle {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sound-toggle:hover {
  color: var(--accent-gold);
  border-color: rgba(245,197,24,0.3);
}

/* === RESPONSIVE — Wheel === */

/* Tablet portrait */
@media (max-width: 900px) {
  .wheel-layout {
    flex-direction: column-reverse;
    gap: 32px;
  }

  .wheel-text {
    text-align: center;
    max-width: 100%;
  }

  .wheel-text h2 {
    font-size: 1.6rem;
  }

  .wheel-text p {
    font-size: 0.95rem;
  }

  .wheel-prizes-list {
    justify-content: center;
  }

  .wheel-wrapper {
    width: 320px;
    height: 320px;
  }

  .wheel-canvas {
    width: 320px;
    height: 320px;
  }

  .wheel-spin-btn {
    width: 70px;
    height: 70px;
    font-size: 0.7rem;
  }
}

/* Large phones */
@media (max-width: 768px) {
  .wheel-section {
    padding: 60px 0 40px;
  }

  .wheel-text .label {
    font-size: 0.75rem;
    padding: 5px 14px;
  }

  .wheel-text h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }

  .wheel-text p {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }

  .wheel-prizes-list {
    gap: 6px;
    margin-bottom: 16px;
  }

  .wheel-prizes-list li {
    font-size: 0.8rem;
    padding: 5px 10px;
  }

  .wheel-wrapper {
    width: 300px;
    height: 300px;
  }

  .wheel-canvas {
    width: 300px;
    height: 300px;
  }

  .wheel-spin-btn {
    width: 66px;
    height: 66px;
    font-size: 0.68rem;
  }

  .wheel-pointer {
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--accent-gold);
    top: -15px;
  }

  /* Modal */
  .wheel-modal {
    padding: 36px 24px;
    margin: 16px;
    max-width: calc(100vw - 32px);
  }

  .wheel-modal h3 {
    font-size: 1.3rem;
  }

  .wheel-modal .prize-value {
    font-size: 2.2rem;
  }

  .wheel-modal .prize-desc {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }

  .wheel-modal .claim-btn {
    padding: 14px 28px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .wheel-modal .timer-text {
    font-size: 0.8rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .wheel-section {
    padding: 48px 0 32px;
  }

  .wheel-layout {
    gap: 24px;
  }

  .wheel-text h2 {
    font-size: 1.25rem;
  }

  .wheel-prizes-list {
    flex-direction: column;
    align-items: center;
  }

  .wheel-prizes-list li {
    width: 100%;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .wheel-wrapper {
    width: 260px;
    height: 260px;
  }

  .wheel-canvas {
    width: 260px;
    height: 260px;
  }

  .wheel-spin-btn {
    width: 58px;
    height: 58px;
    font-size: 0.62rem;
  }

  .wheel-spin-btn i {
    font-size: 0.95rem;
  }

  .wheel-pointer {
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 26px solid var(--accent-gold);
    top: -13px;
  }

  .wheel-modal {
    padding: 28px 18px;
    border-radius: 16px;
  }

  .wheel-modal .confetti-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
  }

  .wheel-modal h3 {
    font-size: 1.15rem;
  }

  .wheel-modal .prize-value {
    font-size: 1.8rem;
    margin: 12px 0;
  }

  .wheel-modal .prize-desc {
    font-size: 0.85rem;
    margin-bottom: 20px;
  }

  .wheel-modal .claim-btn {
    padding: 14px 20px;
    font-size: 0.9rem;
  }
}

/* Very small phones (iPhone SE, etc.) */
@media (max-width: 360px) {
  .wheel-wrapper {
    width: 230px;
    height: 230px;
  }

  .wheel-canvas {
    width: 230px;
    height: 230px;
  }

  .wheel-spin-btn {
    width: 52px;
    height: 52px;
    font-size: 0.58rem;
  }

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