/* Custom styles for 3D Ball & Interactive Components */

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spinSlow 8s linear infinite;
}

/* 3D Realistic Lottery Balls */
.ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  user-select: none;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset -3px -3px 6px rgba(0, 0, 0, 0.35), inset 3px 3px 6px rgba(255, 255, 255, 0.7);
}

@media (min-width: 640px) {
  .ball {
    width: 48px;
    height: 48px;
    font-size: 17px;
  }
}

.ball:hover {
  transform: translateY(-2px) scale(1.05);
}

/* White Ball (Main 1~69 numbers) */
.ball-white {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f1f5f9 45%, #cbd5e1 85%, #94a3b8 100%);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Red Powerball (1~26) */
.ball-red {
  background: radial-gradient(circle at 35% 35%, #ff4b4b 0%, #dc2626 50%, #991b1b 85%, #5a0909 100%);
  color: #ffffff;
  border: 1px solid rgba(254, 202, 202, 0.6);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.5), inset -3px -3px 6px rgba(0, 0, 0, 0.45), inset 3px 3px 6px rgba(255, 255, 255, 0.6);
}

/* Rolling animation state */
.ball-rolling {
  animation: ballBounce 0.15s infinite alternate ease-in-out;
}

@keyframes ballBounce {
  0% { transform: translateY(-3px) scale(0.98); }
  100% { transform: translateY(3px) scale(1.02); }
}

/* Strategy Buttons */
.strategy-btn {
  padding: 10px 12px;
  border-radius: 16px;
  background-color: #020617;
  border: 1px solid #1e293b;
  text-align: left;
  transition: all 0.2s ease;
  cursor: pointer;
}

.strategy-btn:hover {
  border-color: #334155;
  background-color: #0f172a;
}

.strategy-btn.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.1));
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.15);
}

.strategy-btn.active div:first-child {
  color: #f87171;
}

/* Count selection buttons */
.count-btn {
  padding: 8px 0;
  border-radius: 12px;
  background-color: #020617;
  border: 1px solid #1e293b;
  font-weight: 700;
  font-size: 13px;
  color: #94a3b8;
  transition: all 0.15s ease;
  cursor: pointer;
}

.count-btn:hover {
  border-color: #475569;
  color: #ffffff;
}

.count-btn.active {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Sim buttons */
.sim-btn {
  padding: 4px 12px;
  border-radius: 8px;
  background-color: #0f172a;
  border: 1px solid #334155;
  font-weight: 600;
  font-size: 11px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
}

.sim-btn:hover {
  background-color: #1e293b;
  color: #ffffff;
}

.sim-btn.active {
  background-color: #f59e0b;
  border-color: #f59e0b;
  color: #020617;
}

/* Result row enter animation */
.game-row-enter {
  animation: fadeInSlide 0.3s ease forwards;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
