@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Reset & Optimizations */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

body {
  margin: 0;
  padding: 0;
  background-color: #030712;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  touch-action: none;
}

/* 3D Canvas */
#game-canvas {
  touch-action: none;
  outline: none;
}

/* Floating Damage Numbers Animation */
@keyframes float-damage {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6) translateY(0);
  }
  30% {
    transform: translate(-50%, -50%) scale(1.3) translateY(-18px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1) translateY(-45px);
  }
}

.damage-popup {
  position: absolute;
  font-weight: 900;
  font-family: 'Cairo', sans-serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0,0,0,0.7);
  pointer-events: none;
  animation: float-damage 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  z-index: 50;
}

/* Custom Scrollbar for lobbies */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
}

/* Hotbar active states */
.weapon-slot.active {
  border-color: #facc15 !important;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.6);
  transform: translateY(-4px);
}

.build-tab-btn.active {
  border-color: #f59e0b !important;
  background-color: rgba(245, 158, 11, 0.25) !important;
  color: #fef08a !important;
}

/* Skin selection */
.skin-btn.active {
  border-color: #facc15 !important;
  background-color: rgba(234, 179, 8, 0.25) !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.4);
}

/* Kill feed entries */
.kill-item {
  animation: slide-in 0.3s ease-out forwards;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 8px;
  border-right: 3px solid #ef4444;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}