* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'JetBrains Mono', monospace; image-rendering: pixelated; }

.font-pixel { font-family: 'Press Start 2P', cursive; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

@keyframes enchant-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(139, 92, 246, 0.4), 0 0 30px rgba(34, 211, 238, 0.2); }
  50% { box-shadow: 0 0 25px rgba(139, 92, 246, 0.7), 0 0 50px rgba(34, 211, 238, 0.4); }
}

@keyframes pulse-fight {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
  50% { transform: scale(1.03); box-shadow: 0 0 40px rgba(239, 68, 68, 0.8); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sparkle {
  0% { opacity: 1; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
  100% { opacity: 0; transform: scale(0) rotate(360deg); }
}

@keyframes critFlash {
  0% { background-color: rgba(234, 179, 8, 0.3); }
  100% { background-color: transparent; }
}

@keyframes damageFlash {
  0% { background-color: rgba(239, 68, 68, 0.3); }
  100% { background-color: transparent; }
}

@keyframes winnerBanner {
  0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
  60% { transform: scale(1.1) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px); }
}

.enchant-glow { animation: enchant-glow 3s ease-in-out infinite; }
.pulse-fight { animation: pulse-fight 1.5s ease-in-out infinite; }
.shake { animation: shake 0.3s ease-in-out; }
.fade-slide-in { animation: fadeSlideIn 0.3s ease-out forwards; }
.crit-flash { animation: critFlash 0.4s ease-out; }
.damage-flash { animation: damageFlash 0.4s ease-out; }
.winner-banner { animation: winnerBanner 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

.slider-red::-webkit-slider-thumb { background: #ef4444; }
.slider-blue::-webkit-slider-thumb { background: #3b82f6; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 0;
  outline: none;
  background: #2a2a4a;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 20px;
  border-radius: 0;
  cursor: pointer;
  border: 2px solid #0f0f1a;
}

.combat-log-entry { animation: fadeSlideIn 0.2s ease-out forwards; }

.heart-icon { display: inline-block; width: 12px; height: 12px; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f0f1a; }
::-webkit-scrollbar-thumb { background: #2a2a4a; border: 1px solid #3a3a5a; }
::-webkit-scrollbar-thumb:hover { background: #3a3a5a; }

.tooltip-container { position: relative; }
.tooltip-container .tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  border: 1px solid #8b5cf6;
  color: #d1d5db;
  padding: 6px 10px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  z-index: 50;
  transition: opacity 0.2s;
  margin-bottom: 4px;
}
.tooltip-container:hover .tooltip-text { visibility: visible; opacity: 1; }

.preset-panel {
  transition: max-width 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}