/* SnakeOn.Pi - Game Styles */

/* Smooth Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes glow {

  0%,
  100% {
    filter: drop-shadow(0 0 5px currentColor);
  }

  50% {
    filter: drop-shadow(0 0 20px currentColor);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Performance optimizations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

canvas {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Utility Classes */
.animate-in {
  animation: fadeIn 0.5s ease-out;
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.slide-in {
  animation: slideIn 0.4s ease-out;
}

.pulse-animate {
  animation: pulse 2s ease-in-out infinite;
}

.glow-animate {
  animation: glow 2s ease-in-out infinite;
}

.spin-animate {
  animation: spin 1s linear infinite;
}

/* Glass Morphism */
.glass-morphism {
  background: rgba(10, 10, 30, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel {
  background: rgba(10, 10, 30, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Neon Effects */
.text-shadow-neon {
  text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
}

.text-shadow-strong {
  text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
}

.border-neon {
  box-shadow: 0 0 10px currentColor, inset 0 0 10px currentColor;
}

/* Button Enhancements */
button {
  transform-origin: center;
  transition: all 0.2s ease;
}

button:active {
  transform: scale(0.95);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Loading Spinner */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Performance Stats */
.perf-stats {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: #0f0;
  z-index: 9999;
  pointer-events: none;
}

/* Minimap */
.minimap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 200px;
  height: 200px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

/* Zone Indicators */
.zone-boost {
  fill: rgba(0, 255, 0, 0.2);
  stroke: rgba(0, 255, 0, 0.6);
  stroke-width: 2;
}

.zone-hazard {
  fill: rgba(255, 0, 0, 0.2);
  stroke: rgba(255, 0, 0, 0.6);
  stroke-width: 2;
}

/* Kill Feed */
.kill-feed {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 250px;
  max-height: 200px;
  overflow: hidden;
  pointer-events: none;
}

.kill-feed-item {
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 4px;
  border-left: 3px solid #ff0000;
  animation: slideIn 0.3s ease-out;
  font-size: 14px;
}

/* Achievement Notification */
.achievement-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.5s ease-out;
  z-index: 10000;
}

/* Power-up Icons */
.powerup-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  animation: pulse 1s ease-in-out infinite;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(90deg, #00f3ff, #ff00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsive */
@media (max-width: 768px) {
  .minimap {
    width: 120px;
    height: 120px;
    bottom: 10px;
    right: 10px;
  }

  .kill-feed {
    width: 200px;
    top: 60px;
    right: 10px;
  }

  .perf-stats {
    top: 5px;
    right: 5px;
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* Touch Feedback */
@media (hover: none) {
  button:active {
    background-color: rgba(255, 255, 255, 0.1);
  }
}