@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --purple: #667eea;
  --pink: #f093fb;
  --orange: #f5576c;
  --base: #1a1a2e;
  --base-light: #252542;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--base);
}

.bg-base {
  background: linear-gradient(135deg, var(--base) 0%, #16213e 100%);
}

.gradient-text {
  background: linear-gradient(135deg, var(--purple), var(--pink), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.1);
}

.reel-container {
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem 0.5rem;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.reel-container:hover {
  border-color: var(--pink);
  box-shadow: 0 0 15px rgba(240, 147, 251, 0.3);
  transform: translateY(-2px);
}

.reel-container.spinning {
  animation: reelPulse 0.1s ease-in-out infinite;
}

.reel-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pink);
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.reel-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: white;
  line-height: 1.3;
  padding: 0 0.25rem;
}

@media (min-width: 640px) {
  .reel-value {
    font-size: 1rem;
  }
}

.spin-button {
  background: linear-gradient(135deg, var(--purple), var(--pink), var(--orange));
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.spin-button:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(240, 147, 251, 0.5);
}

.spin-button:active:not(:disabled) {
  transform: scale(0.98);
}

.spin-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spin-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.result-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(240, 147, 251, 0.2));
  border: 1px solid rgba(240, 147, 251, 0.3);
}

.action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--pink);
  transform: translateY(-2px);
}

.action-btn.copied {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
}

.inspo-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.inspo-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.inspo-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
  color: white;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  padding: 1rem 2rem;
  border-radius: 2rem;
  font-weight: 700;
  animation: toastIn 0.3s ease;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes reelPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.sparkle-active {
  animation: sparkleAnim 0.5s ease;
}

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

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall 2s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--pink);
  border-radius: 3px;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .reel-container {
    min-height: 100px;
    padding: 0.75rem 0.25rem;
  }
  
  .reel-label {
    font-size: 0.55rem;
  }
  
  .reel-value {
    font-size: 0.75rem;
  }
  
  .action-btn {
    padding: 0.6rem 0.5rem;
    font-size: 0.75rem;
  }
}