/* Custom styles for Lucky Name Spinner */

/* Wheel spinner arrow animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(-3px) translateX(-50%);
  }
  50% {
    transform: translateY(0px) translateX(-50%);
  }
}

#spinner-arrow {
  animation: bounce 1s infinite;
  transition: transform 0.3s ease;
}

/* Hide loading screen when content is loaded */
body.loaded #loading-screen {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}

/* Wheel canvas transitions */
#wheel {
  transition: transform var(--spin-duration, 5s) cubic-bezier(0.26, 0.15, 0.05, 1);
  transform-origin: center;
  will-change: transform;
}

/* Winner highlight animation */
@keyframes highlight-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.winner-highlight {
  animation: highlight-pulse 1.5s ease-in-out;
}

/* Theme button active state */
.theme-button.active {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}

/* Responsive canvas container */
.relative {
  max-width: 100%;
  margin: 0 auto;
}

#wheel {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure better touch targets on mobile */
@media (max-width: 768px) {
  button, 
  input[type="checkbox"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  .relative {
    width: 90%;
  }
}

/* Better transition for winner display */
#winner-display {
  transition: opacity 0.3s, transform 0.3s;
}

#winner-display.hidden {
  opacity: 0;
  transform: translateY(10px);
}

/* Improved text contrast */
#winner-name {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Confetti animation */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #f00;
  opacity: 0;
  z-index: 100;
}

/* Custom focus styles for accessibility */
:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* Improve text readability */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}