* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #06060e;
  --bg-card: #0d0d1a;
  --bg-surface: #141428;
  --purple-deep: #1a0a2e;
  --purple-mid: #2d1b4e;
  --gold: #FFD700;
  --gold-dark: #b8960f;
  --gold-light: #ffe44d;
  --neon-green: #00ff88;
  --neon-red: #ff3355;
  --neon-blue: #00aaff;
  --neon-purple: #aa44ff;
  --text: #e8e0f0;
  --text-dim: #8878a0;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.3), 0 0 20px rgba(255,215,0,0.1); }
  50% { box-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.3); }
}

@keyframes bounce-in {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes spin-slot {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}

@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 10px rgba(255,215,0,0.5), 0 0 30px rgba(255,215,0,0.2); }
  50% { text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 0 50px rgba(255,215,0,0.4), 0 0 80px rgba(255,215,0,0.2); }
}

@keyframes flash-win {
  0% { background-color: rgba(0,255,136,0.3); }
  100% { background-color: transparent; }
}

@keyframes flash-lose {
  0% { background-color: rgba(255,51,85,0.3); }
  100% { background-color: transparent; }
}

@keyframes dice-tumble {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  25% { transform: rotateX(90deg) rotateY(45deg); }
  50% { transform: rotateX(180deg) rotateY(90deg); }
  75% { transform: rotateX(270deg) rotateY(135deg); }
  100% { transform: rotateX(360deg) rotateY(180deg); }
}

@keyframes card-flip {
  0% { transform: rotateY(180deg) scale(0.8); }
  100% { transform: rotateY(0deg) scale(1); }
}

@keyframes wheel-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(var(--spin-degrees, 1800deg)); }
}

@keyframes balance-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes particle-float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-20px) rotate(360deg); opacity: 0; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-bounce-in { animation: bounce-in 0.5s ease-out; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-gold { animation: pulse-gold 2s ease-in-out infinite; }
.animate-glow { animation: glow-pulse 2s ease-in-out infinite; }
.animate-balance-pop { animation: balance-pop 0.4s ease-out; }
.animate-flash-win { animation: flash-win 0.6s ease-out; }
.animate-flash-lose { animation: flash-lose 0.6s ease-out; }
.animate-card-flip { animation: card-flip 0.5s ease-out; }

.glass {
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.glass-purple {
  background: rgba(45, 27, 78, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(170, 68, 255, 0.2);
}

.gold-text {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

.btn-action {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #000;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-action:active {
  transform: translateY(0);
}

.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-chip {
  background: var(--bg-surface);
  border: 2px solid var(--gold-dark);
  color: var(--gold);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Space Mono', monospace;
}

.btn-chip:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--gold);
}

.btn-chip.active {
  background: rgba(255, 215, 0, 0.25);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  cursor: pointer;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tab-btn:hover {
  color: var(--gold);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 700;
}

.slot-reel {
  overflow: hidden;
  position: relative;
}

.slot-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  height: 70px;
  width: 70px;
}

.roulette-wheel {
  border-radius: 50%;
  position: relative;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.card-game {
  perspective: 1000px;
}

.playing-card {
  background: white;
  color: #1a1a1a;
  border-radius: 8px;
  font-family: 'Oswald', sans-serif;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.5);
  position: relative;
}

.playing-card.red { color: #cc0000; }
.playing-card.black { color: #1a1a1a; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--purple-mid); border-radius: 3px; }

/* Particles background */
.particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -20px;
  animation: particle-float linear infinite;
  opacity: 0.3;
  font-size: 16px;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  animation: bounce-in 0.4s ease-out;
  max-width: 320px;
  border: 1px solid;
}

.toast-win {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.4);
  color: var(--neon-green);
}

.toast-lose {
  background: rgba(255, 51, 85, 0.15);
  border-color: rgba(255, 51, 85, 0.4);
  color: var(--neon-red);
}

.toast-info {
  background: rgba(170, 68, 255, 0.15);
  border-color: rgba(170, 68, 255, 0.4);
  color: var(--neon-purple);
}

.toast-gold {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.4);
  color: var(--gold);
}

@media (max-width: 640px) {
  .slot-symbol {
    font-size: 2rem;
    height: 56px;
    width: 56px;
  }
}