@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: #0f172a;
  color: #f8fafc;
  line-height: 1.6;
}

.App {
  min-height: 100vh;
}

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

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* Liquid Ether Animation Container */
.liquid-ether-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%);
}

.liquid-ether-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.auth-content {
  position: relative;
  z-index: 10;
  display: flex;
  items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

/* Game Canvas Styles */
.game-canvas {
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background: #1e293b;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Custom Button Animations */
.btn-cyber {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-cyber::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-cyber:hover::before {
  left: 100%;
}

.btn-cyber:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* Card Animations */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Pulse Animation */
.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), 0 0 40px rgba(59, 130, 246, 0.3); }
}

/* Loading Animation */
.cyber-loader {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Glass Morphism */
.glass {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

/* Navbar Blur */
.navbar-blur {
  backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

/* Badge Styles */
.badge-glow {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Score Animation */
.score-popup {
  animation: scoreFloat 1s ease-out forwards;
}

@keyframes scoreFloat {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-10px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(1);
  }
}

/* Game UI Elements */
.game-hud {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin: 0.5rem;
}

/* Progress Bar */
.progress-bar {
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
  border-radius: 10px;
  height: 8px;
  transition: width 0.3s ease;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

/* Leaderboard Animations */
.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #92400e;
}

.rank-2 {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  color: #374151;
}

.rank-3 {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #92400e;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-content {
    padding: 1rem;
  }
  
  .game-canvas {
    max-width: 100%;
    height: auto;
  }
  
  .navbar-blur {
    padding: 0.5rem 1rem;
  }
}

/* Dark Mode Enhancements */
.dark-glow {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
}

/* Interactive Elements */
.interactive-hover {
  transition: all 0.2s ease;
}

.interactive-hover:hover {
  transform: scale(1.02);
}

.interactive-hover:active {
  transform: scale(0.98);
}