:root {
  --fn-purple: #7B2FBE;
  --fn-blue: #2196F3;
  --fn-gold: #FFD700;
  --fn-storm: #9C27B0;
  --fn-victory: #FFC107;
  --fn-dark: #0d0d1a;
  --fn-darker: #08081a;
  --rarity-common: #8a8a8a;
  --rarity-uncommon: #2ecc40;
  --rarity-rare: #0074D9;
  --rarity-epic: #B10DC9;
  --rarity-legendary: #FF851B;
}

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

body {
  background: var(--fn-darker);
  color: #e0e0ff;
  font-family: 'Russo One', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

@keyframes busFloat {
  0% { transform: translateX(-120px) translateY(0) rotate(-2deg); }
  50% { transform: translateX(50vw) translateY(-15px) rotate(2deg); }
  100% { transform: translateX(110vw) translateY(0) rotate(-2deg); }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(123,47,190,0.4), 0 0 60px rgba(123,47,190,0.1); }
  50% { box-shadow: 0 0 30px rgba(123,47,190,0.7), 0 0 80px rgba(123,47,190,0.3); }
}

@keyframes particle-burst {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: scale(3) rotate(180deg); opacity: 0; }
}

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

@keyframes storm-pulse {
  0%, 100% { border-color: rgba(156,39,176,0.3); box-shadow: inset 0 0 30px rgba(156,39,176,0.1); }
  50% { border-color: rgba(156,39,176,0.8); box-shadow: inset 0 0 60px rgba(156,39,176,0.3); }
}

@keyframes chest-bounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3) rotate(-5deg); }
  50% { transform: scale(1.1) rotate(5deg); }
  75% { transform: scale(1.2) rotate(-3deg); }
}

@keyframes float-up {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-80px) scale(1.5); opacity: 0; }
}

@keyframes skew-in {
  0% { transform: skewX(-10deg) translateX(-30px); opacity: 0; }
  100% { transform: skewX(0deg) translateX(0); opacity: 1; }
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { text-shadow: 0 0 10px var(--fn-gold), 0 0 20px var(--fn-gold), 0 0 40px var(--fn-gold); }
  20%, 24%, 55% { text-shadow: none; }
}

.bus-container {
  position: absolute;
  top: 10px;
  left: 0;
  font-size: 2rem;
  animation: busFloat 12s linear infinite;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.wheel-container {
  position: relative;
  display: inline-block;
}

.wheel-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 30px solid var(--fn-gold);
  z-index: 20;
  filter: drop-shadow(0 2px 8px rgba(255,215,0,0.6));
}

.drop-btn {
  font-family: 'Bungee', cursive;
  font-size: 1.8rem;
  padding: 16px 60px;
  background: linear-gradient(135deg, var(--fn-gold), #ff9800);
  color: #1a1a2e;
  border: none;
  cursor: pointer;
  clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
  transition: all 0.2s ease;
  letter-spacing: 2px;
}

.drop-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.2);
}

.drop-btn:active {
  transform: scale(0.96);
}

.drop-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.card {
  background: linear-gradient(135deg, rgba(13,13,26,0.95), rgba(20,20,40,0.95));
  border: 1px solid rgba(123,47,190,0.3);
  border-radius: 4px;
  clip-path: polygon(0% 0%, 97% 0%, 100% 3%, 100% 100%, 3% 100%, 0% 97%);
  animation: pulse-glow 3s ease-in-out infinite;
}

.rarity-common { color: var(--rarity-common); border-color: var(--rarity-common); }
.rarity-uncommon { color: var(--rarity-uncommon); border-color: var(--rarity-uncommon); }
.rarity-rare { color: var(--rarity-rare); border-color: var(--rarity-rare); }
.rarity-epic { color: var(--rarity-epic); border-color: var(--rarity-epic); }
.rarity-legendary { color: var(--rarity-legendary); border-color: var(--rarity-legendary); }

.rarity-bg-common { background: linear-gradient(135deg, rgba(138,138,138,0.2), rgba(138,138,138,0.05)); }
.rarity-bg-uncommon { background: linear-gradient(135deg, rgba(46,204,64,0.2), rgba(46,204,64,0.05)); }
.rarity-bg-rare { background: linear-gradient(135deg, rgba(0,116,217,0.2), rgba(0,116,217,0.05)); }
.rarity-bg-epic { background: linear-gradient(135deg, rgba(177,13,201,0.2), rgba(177,13,201,0.05)); }
.rarity-bg-legendary { background: linear-gradient(135deg, rgba(255,133,27,0.2), rgba(255,133,27,0.05)); }

.result-reveal {
  animation: reveal-bounce 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.storm-active {
  animation: storm-pulse 1.5s ease-in-out infinite;
  border: 3px solid rgba(156,39,176,0.5);
}

.chest-anim {
  animation: chest-bounce 0.5s ease;
}

.stat-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(123,47,190,0.2);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--fn-purple), var(--fn-blue));
  transition: width 0.5s ease;
}

.milestone-popup {
  animation: float-up 2s ease-out forwards;
  position: absolute;
  font-family: 'Bungee', cursive;
  color: var(--fn-gold);
  pointer-events: none;
}

.skew-enter {
  animation: skew-in 0.3s ease-out forwards;
}

.squad-tag {
  clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
  padding: 4px 16px;
  display: inline-block;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(13,13,26,0.5); }
::-webkit-scrollbar-thumb { background: var(--fn-purple); border-radius: 3px; }

@media (max-width: 768px) {
  .drop-btn {
    font-size: 1.3rem;
    padding: 12px 40px;
  }
}