/* Button to open popup */
.roulette-button {
  background-color: #C37CB4;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}
@keyframes bounceIn {
  0%   { transform: scale(0.8); opacity: 0; }
  50%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes flash {
  0%, 100% { background-color: #fff; }
  50%      { background-color: #ffe0f7; }
}

.joke-card {
  max-width: 500px;
  background: #fff;
  border: 2px solid #C37CB4;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  animation: bounceIn 0.6s ease, flash 1.2s ease;
}
.wheel-slice.selected {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}
.roulette-button:hover {
  transform: scale(1.05);
}

/* Popup overlay */
.roulette-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  animation: fadeIn 0.3s ease;
}

/* Popup content box */
.roulette-content {
  background: #221B3A;
  color: #FFFFFF;
  margin: 5% auto;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 20px #C37CB4;
}

/* Close button */
.close-popup {
  position: absolute;
  top: 10px; right: 20px;
  font-size: 2rem;
  cursor: pointer;
  color: #FFFFFF;
}

/* Title */
.roulette-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #FFFFFF;
}

/* Wheel container */
.wheel-container {
  position: relative;
  margin: 20px auto;
}

/* Wheel itself */
.wheel {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 8px solid #C37CB4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  animation: pulse 1s infinite alternate;
  transition: transform 2s ease-out;
}

/* Wheel slices */
.slice {
  width: 50%;
  height: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  background: #FCE9FF;
  border: 1px solid #C37CB4;
}

/* Flashing spinner light */
.spinner-light {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700;
}

/* Spin button */
.spin-button {
  background-color: #FFD700;
  color: #221B3A;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 0 10px #FFD700;
}
.spin-button:hover {
  background-color: #FFF176;
}

/* Joke result */
.joke-result {
  margin-top: 20px;
  font-size: 1rem;
  background: #FCE9FF;
  color: #221B3A;
  padding: 15px;
  border-radius: 10px;
}

/* Animations */
@keyframes pulse {
  from { box-shadow: 0 0 10px #C37CB4; }
  to { box-shadow: 0 0 20px #C37CB4; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#roulette-container {
  display: none !important;
}
