/* Wheel of Fortune - Professional Minimal Design */

/* Trigger Button */
.lg-wheel-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #bfdbfe 0%, #a5b4fc 100%);
  color: #0b1021;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(165, 180, 252, 0.35);
}

.lg-wheel-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.lg-wheel-trigger:active {
  transform: translateY(0);
}

.lg-wheel-trigger__icon svg {
  display: block;
  animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Modal */
.lg-wheel-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lg-wheel-modal[aria-hidden="false"] {
  display: flex;
}

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

.lg-wheel-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(3px);
}

.lg-wheel-modal__dialog {
  position: relative;
  width: 90%;
  max-width: 520px;
  background: transparent;
  border-radius: 16px;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Wheel container centered */
.lg-wheel-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 14px 0 18px;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
}

.lg-wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

.lg-wheel-circle {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(15,23,42,0.12);
  background: radial-gradient(circle at 30% 30%, #f8fafc 20%, #e0f2fe 70%);
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.lg-wheel-circle canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background: transparent;
}

.lg-wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.3), 0 6px 18px rgba(15,23,42,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}



/* Wheel Stage */
.lg-wheel-stage {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 32px;
  aspect-ratio: 1;
}

.lg-wheel-pointer {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.35));
}

.lg-wheel-pointer svg {
  display: block;
}

.lg-wheel-circle {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Center logo container */
.lg-wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 
    0 0 0 4px #f8f9fa,
    0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lg-wheel-logo {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 50%;
}

.lg-wheel-circle.spinning {
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Wheel Labels */
.lg-wheel-labels {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.lg-wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 50%;
  transform-origin: 0% 0%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 30px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.lg-wheel-label span {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: rotate(-22.5deg);
  white-space: nowrap;
}

/* Actions */
.lg-wheel-actions {
  text-align: center;
}

.lg-wheel-spin {
  position: relative;
  width: 100%;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

.lg-wheel-spin::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.lg-wheel-spin:hover:not(:disabled)::before {
  left: 100%;
}

.lg-wheel-spin__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lg-wheel-spin:not(:disabled) .lg-wheel-spin__icon svg {
  animation: spin-icon 2s linear infinite;
}

@keyframes spin-icon {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.lg-wheel-spin:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.lg-wheel-spin:active:not(:disabled) {
  transform: translateY(0);
}

.lg-wheel-spin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lg-wheel-status,
.lg-wheel-next {
  margin-top: 16px;
  font-size: 14px;
  color: #666;
  min-height: 20px;
  text-align: center;
}

.lg-wheel-next {
  color: #667eea;
  font-weight: 500;
  margin-top: 12px;
}

.lg-wheel-next strong {
  color: #764ba2;
  font-weight: 600;
}

.lg-wheel-status.success {
  color: #10b981;
  font-weight: 600;
  font-size: 16px;
}

.lg-wheel-status.error {
  color: #ef4444;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 640px) {
  .lg-wheel-modal__dialog {
    width: 95%;
    margin: 16px;
  }

  .lg-wheel-card {
    padding: 24px;
  }

  .lg-wheel-header h3 {
    font-size: 20px;
  }

  .lg-wheel-stage {
    max-width: 280px;
  }

  .lg-wheel-label {
    font-size: 12px;
    padding: 16px 8px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {

  .lg-wheel-header h3 {
    color: #f9fafb;
  }

  .lg-wheel-sub,
  .lg-wheel-status,
  .lg-wheel-next {
    color: #9ca3af;
  }

  .lg-wheel-modal__close {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
  }

  .lg-wheel-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #f9fafb;
  }
}
.lg-wheel-center {
    display: flex !important;
    justify-content: center;
}