/* Ruleta de Repaso — estilos */

.ruleta-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 28, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
  transition: opacity 0.5s ease;
}

.ruleta-countdown {
  font-size: 7rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #ff4757;
  animation: ruleta-pulse 1s infinite;
  text-shadow: 0 0 40px rgba(255, 71, 87, 0.5);
}

@keyframes ruleta-pulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scale(1.1); opacity: 0; }
}

.ruleta-container {
  position: relative;
  width: 480px;
  height: 480px;
  margin: 0 auto 30px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.ruleta-pointer {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-top: 50px solid #ffffff;
  z-index: 5;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

#ruleta-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 0 3px #333,
    0 20px 50px rgba(0, 0, 0, 0.6),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
  background: #1a1a2e;
}

.ruleta-controles {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ruleta-btn {
  padding: 16px 48px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2ed573 0%, #1e90ff 100%);
  border: 0;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(46, 213, 115, 0.4);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ruleta-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(46, 213, 115, 0.6);
}

.ruleta-btn:active:not(:disabled) {
  transform: translateY(-1px);
}

.ruleta-btn:disabled {
  background: #555;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.ruleta-resultado {
  min-height: 50px;
  font-size: 1.8rem;
  font-weight: 800;
  color: #2ed573;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 10px rgba(46, 213, 115, 0.5);
  animation: ruleta-glow 0.5s ease;
}

@keyframes ruleta-glow {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* Tema oscuro */
body.dark .ruleta-container {
  filter: brightness(0.9);
}

/* Responsive */
@media (max-width: 600px) {
  .ruleta-container {
    width: 300px;
    height: 300px;
  }

  .ruleta-pointer {
    top: -20px;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 35px solid #ffffff;
  }

  .ruleta-countdown {
    font-size: 4rem;
  }

  .ruleta-btn {
    padding: 12px 32px;
    font-size: 1rem;
  }

  .ruleta-resultado {
    font-size: 1.3rem;
  }
}
