/* ZOMBIE KILLER - Estilos de menús y pantallas */

/* ========== CANVAS 3D DEL MENÚ ========== */
#menuCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 25;
  display: block;
}

#menuCanvas.hidden {
  display: none !important;
}

/* ========== CONTENEDOR DEL MENÚ ========== */
.menu-container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
  cursor: pointer;
}

.menu-container.active {
  pointer-events: none;
}

.menu-container.active > * {
  pointer-events: auto;
}

.menu-container.hidden {
  display: none !important;
}

/* Texto de click para entrar */
.click-to-enter {
  font-size: 18px;
  color: #666;
  margin-top: 30px;
  letter-spacing: 2px;
  animation: hintBlink 1.5s infinite;
  cursor: pointer;
}

/* Mensaje de pointer lock (cuando se pierde el cursor) */
.pointer-lock-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 18px;
  z-index: 50;
  border: 1px solid rgba(255, 100, 100, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: pulseHint 1.5s infinite;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@keyframes pulseHint {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.02); opacity: 0.9; }
}

@keyframes hintBlink {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; color: #888; }
}

.click-to-enter.hidden {
  display: none;
}

/* ========== OVERLAY OSCURO ========== */
#menuOverlay {
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
}

/* Overlay oscuro para legibilidad - lado derecho más oscuro */
.menu-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 30%,
    rgba(0, 0, 0, 0.7) 50%,
    rgba(0, 0, 0, 0.85) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Contenido principal - centrado */
.menu-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 40px;
  animation: fadeInUp 1s ease-out;
  text-align: center;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Logo */
.menu-logo {
  text-align: center;
  margin-bottom: 20px;
}

.logo-title {
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 4px;
  margin: 10px 0;
  background: linear-gradient(180deg, #ff4444 0%, #8b0000 50%, #4a0000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 
    0 0 40px rgba(255, 0, 0, 0.5),
    0 4px 0 #2a0000,
    0 8px 20px rgba(0, 0, 0, 0.8);
  animation: titleGlow 3s infinite alternate;
}

@keyframes titleGlow {
  from { filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.3)); }
  to { filter: drop-shadow(0 0 40px rgba(255, 0, 0, 0.6)); }
}

.logo-subtitle {
  font-size: 18px;
  letter-spacing: 12px;
  color: #666;
  text-transform: uppercase;
  animation: subtitleFlicker 4s infinite;
}

@keyframes subtitleFlicker {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; color: #888; }
}

/* Botón de jugar */
.play-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 20px 60px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(135deg, #8b0000 0%, #cc0000 50%, #8b0000 100%);
  border: 3px solid #ff4444;
  border-radius: 60px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 30px rgba(255, 0, 0, 0.4),
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 -4px 20px rgba(0, 0, 0, 0.3);
  animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.4), 0 10px 40px rgba(0, 0, 0, 0.5); }
  50% { box-shadow: 0 0 50px rgba(255, 0, 0, 0.6), 0 10px 40px rgba(0, 0, 0, 0.5); }
}

.play-button:hover {
  transform: scale(1.08);
  border-color: #ff6666;
  box-shadow: 
    0 0 60px rgba(255, 0, 0, 0.7),
    0 15px 50px rgba(0, 0, 0, 0.6);
}

.play-button:active {
  transform: scale(1.02);
}

.play-icon {
  font-size: 28px;
  animation: playIconBounce 1s infinite;
}

@keyframes playIconBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.play-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: glowSweep 3s infinite;
}

@keyframes glowSweep {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(200%) rotate(45deg); }
}

/* Panel de controles */
.menu-panel {
  background: rgba(20, 10, 10, 0.8);
  border: 1px solid rgba(255, 50, 50, 0.2);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 500px;
  transition: all 0.3s ease;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  cursor: pointer;
  color: #ccc;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 50, 50, 0.1);
}

.panel-header:hover {
  background: rgba(255, 50, 50, 0.1);
  color: #fff;
}

.panel-arrow {
  transition: transform 0.3s ease;
  font-size: 12px;
}

.panel-arrow.open {
  transform: rotate(180deg);
}

.panel-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.panel-content.open {
  max-height: 300px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 20px 24px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-item kbd {
  background: linear-gradient(180deg, #2a1a1a, #1a0a0a);
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-family: monospace;
  color: #ff6666;
  box-shadow: 0 2px 0 #000;
  min-width: 70px;
  text-align: center;
}

.control-item span {
  color: #888;
  font-size: 13px;
}

/* Info del juego */
.menu-info {
  display: flex;
  gap: 40px;
  margin-top: 10px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666;
  font-size: 14px;
  transition: all 0.3s ease;
}

.info-item:hover {
  color: #999;
  transform: translateY(-2px);
}

.info-icon {
  font-size: 20px;
  filter: grayscale(50%);
}

.info-item:hover .info-icon {
  filter: grayscale(0%);
}

/* Versión */
.menu-version {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: #333;
  font-size: 12px;
}

/* ========== GAME OVER ========== */
#gameOverScreen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  flex-direction: column;
  background: radial-gradient(800px 400px at 50% 20%, rgba(40, 0, 0, 0.9), rgba(10, 0, 0, 0.98));
}

#gameOverScreen h1 {
  color: #ff4444;
  margin-bottom: 20px;
  font-size: 56px;
  text-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
  animation: deathPulse 1s infinite;
}

@keyframes deathPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Botones */
button {
  cursor: pointer;
  border: 0;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #022;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 180, 255, 0.14);
  transition: all 0.3s ease;
}

#startScreen button:hover {
  box-shadow: 0 12px 40px rgba(0, 180, 255, 0.4);
  transform: scale(1.05) !important;
}

/* ========== PANTALLA DE CARGA ========== */
.loading-screen {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 34;
  flex-direction: column;
  background: #050505;
}

.loading-content {
  text-align: center;
}

.loading-title {
  font-size: 64px;
  font-weight: 900;
  color: #fff;
  text-shadow: 
    0 0 20px rgba(255, 50, 50, 0.5),
    0 0 40px rgba(255, 0, 0, 0.3),
    0 4px 0 #1a0000;
  letter-spacing: 8px;
  margin: 0 0 10px 0;
  animation: loadingTitlePulse 2s ease-in-out infinite;
}

@keyframes loadingTitlePulse {
  0%, 100% { text-shadow: 0 0 20px rgba(255, 50, 50, 0.5), 0 0 40px rgba(255, 0, 0, 0.3), 0 4px 0 #1a0000; }
  50% { text-shadow: 0 0 30px rgba(255, 50, 50, 0.8), 0 0 60px rgba(255, 0, 0, 0.5), 0 4px 0 #1a0000; }
}

.loading-subtitle {
  font-size: 16px;
  color: #666;
  letter-spacing: 6px;
  margin-bottom: 50px;
}

.loading-bar-container {
  width: 300px;
  height: 6px;
  background: #1a1a1a;
  border-radius: 3px;
  margin: 0 auto 20px;
  overflow: hidden;
  border: 1px solid #333;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff4444, #ff6666);
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.loading-percent {
  font-size: 24px;
  color: #ff4444;
  font-weight: bold;
  letter-spacing: 2px;
}

/* ========== PANTALLAS DE JUEGO (Pausa y Game Over) ========== */
.game-screen {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  flex-direction: column;
}

.game-screen .screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

#pauseMenu .screen-overlay {
  cursor: pointer;
}

.game-screen .screen-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: screenFadeIn 0.3s ease-out;
}

@keyframes screenFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Menú de pausa */
.pause-title {
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  letter-spacing: 8px;
}

.pause-hint {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.settings-panel {
  background: rgba(20, 20, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  min-width: 350px;
}

.setting-item {
  margin-bottom: 16px;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-item label {
  color: #888;
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-row input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  appearance: none;
  cursor: pointer;
}

.setting-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff4444;
  cursor: pointer;
}

.setting-row span {
  color: #fff;
  font-size: 12px;
  min-width: 50px;
  text-align: right;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-label span {
  color: #aaa;
}

.pause-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

/* Botones del menú */
.menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-button.primary {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

.menu-button.primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 0, 0, 0.5);
}

.menu-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Pantalla de Game Over */
.death-title {
  font-size: 72px;
  font-weight: 900;
  color: #ff4444;
  text-shadow: 0 0 50px rgba(255, 0, 0, 0.5);
  letter-spacing: 6px;
  animation: deathPulse 2s infinite;
}

@keyframes deathPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 50px rgba(255, 0, 0, 0.5); }
  50% { opacity: 0.8; text-shadow: 0 0 80px rgba(255, 0, 0, 0.8); }
}

.death-subtitle {
  color: #666;
  font-size: 18px;
  margin-bottom: 20px;
}

.stats-container {
  display: flex;
  gap: 40px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px 30px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-icon {
  font-size: 32px;
}

.stat-label {
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.stat-value {
  color: #fff;
  font-size: 36px;
  font-weight: 900;
}

#gameOverScreen .menu-button {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

#gameOverScreen .menu-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 0, 0, 0.5);
}

/* Menú de tienda */
#shopMenu {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 36;
  flex-direction: column;
  background: radial-gradient(1000px 500px at 50% 20%, rgba(4, 14, 24, 0.72), rgba(2, 8, 12, 0.96));
  color: #cfe8ff;
}

#shopToast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 160, 255, 0.28);
  background: rgba(0, 160, 255, 0.15);
  color: #cfe8ff;
  z-index: 37;
  pointer-events: none;
}

/* Banner de oleada - MEJORADO */
#waveBanner {
  will-change: transform, opacity, filter;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 24px 40px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(10, 25, 40, 0.95), rgba(5, 15, 25, 0.98));
  border: 2px solid rgba(100, 255, 150, 0.3);
  color: #fff;
  text-shadow: 0 0 18px rgba(0, 200, 255, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(100, 255, 150, 0.15);
  position: fixed;
  display: none;
  z-index: 40;
  text-align: center;
  backdrop-filter: blur(10px);
}

#waveBanner:before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(100, 255, 150, 0.6), rgba(0, 200, 255, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0.8;
}

#waveBanner .title {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  margin-bottom: 8px;
}

#waveBanner .wave-num {
  font-size: 56px;
  font-weight: 900;
  background: linear-gradient(180deg, #64ff96, #00d4aa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  text-shadow: none;
  filter: drop-shadow(0 4px 20px rgba(100, 255, 150, 0.4));
}

#waveBanner .subtitle {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

#waveBanner.show {
  animation: wavePopIn 700ms cubic-bezier(0.2, 0.9, 0.3, 1) forwards, 
             waveSlideOut 800ms 2300ms cubic-bezier(0.7, 0, 0.9, 0.6) forwards;
}

@keyframes wavePopIn {
  0% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    filter: blur(2px);
  }
  55% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 1;
    filter: blur(0.5px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes waveSlideOut {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: translate(120%, -40%) scale(0.96);
    opacity: 0;
    filter: blur(1px);
  }
}





/* ========== CONTROLES DE VOLUMEN ========== */
.volume-controls {
  padding: 15px 20px;
}

.volume-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.volume-item:last-child {
  margin-bottom: 0;
}

.volume-item label {
  color: #888;
  font-size: 13px;
  min-width: 100px;
}

.volume-item input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #1a1a1a;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.volume-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #ff4444;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.volume-item input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #ff4444;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.volume-item span {
  color: #ff6666;
  font-size: 12px;
  min-width: 40px;
  text-align: right;
}

.settings-panel-menu {
  margin-top: 10px;
}


/* Divisor en settings */
.setting-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #333, transparent);
  margin: 15px 0;
}


/* ========== PANEL DE CRÉDITOS ========== */
.credits-panel {
  margin-top: 10px;
}

.credits-info {
  padding: 20px;
  text-align: center;
}

.credits-text {
  color: #888;
  font-size: 14px;
  margin: 5px 0;
}

.credits-text strong {
  color: #ff6666;
}

.credits-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.credits-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  border-radius: 8px;
  color: #aaa;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.credits-btn:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: #ff4444;
  color: #ff6666;
}

.credits-btn.instagram:hover {
  background: rgba(225, 48, 108, 0.1);
  border-color: #e1306c;
  color: #e1306c;
}

/* ========== BOTÓN DE COMPARTIR ========== */
.share-button {
  margin-top: 15px;
  padding: 10px 24px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 8px;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-button:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: #ff4444;
  color: #ff6666;
}

/* Divisor en settings del menú */
.settings-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #333, transparent);
  margin: 10px 0;
}


/* ========== SELECTOR DE CALIDAD GRÁFICA ========== */
.quality-selector {
  flex: 1;
  padding: 6px 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  color: #ff6666;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff6666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.quality-selector:hover {
  border-color: #ff4444;
  background-color: #222;
}

.quality-selector:focus {
  border-color: #ff4444;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

.quality-selector option {
  background: #1a1a1a;
  color: #ff6666;
  padding: 8px;
}

.quality-current {
  color: #ff6666;
  font-size: 12px;
  min-width: 50px;
  text-align: right;
  font-weight: 600;
}

/* Estilos para checkbox en settings */
.volume-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #ff4444;
}

/* ========== SELECTOR DE MODOS DE JUEGO ========== */
.game-mode-selector {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 35;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 120%, rgba(120, 20, 20, 0.4), transparent),
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(80, 20, 40, 0.25), transparent),
    radial-gradient(ellipse 50% 30% at 80% 30%, rgba(60, 15, 30, 0.2), transparent),
    linear-gradient(180deg, rgba(5, 5, 15, 0.98), rgba(10, 5, 10, 0.99));
  backdrop-filter: blur(10px);
  animation: fadeIn 0.4s ease;
  overflow: hidden;
}

.game-mode-selector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 50, 50, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 30, 30, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.game-mode-selector::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px
    );
  pointer-events: none;
  opacity: 0.5;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mode-selector-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 50px;
  max-width: 950px;
  position: relative;
  z-index: 1;
}

/* Partículas flotantes decorativas */
.game-mode-selector .mode-selector-container::before,
.game-mode-selector .mode-selector-container::after {
  content: '';
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  animation: floatGlow 8s ease-in-out infinite;
}

.game-mode-selector .mode-selector-container::before {
  background: radial-gradient(circle, rgba(255, 50, 50, 0.3), transparent 70%);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.game-mode-selector .mode-selector-container::after {
  background: radial-gradient(circle, rgba(200, 30, 60, 0.25), transparent 70%);
  bottom: 10%;
  right: 5%;
  animation-delay: -4s;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  50% { transform: translate(30px, -20px) scale(1.1); opacity: 0.5; }
}

.mode-selector-title {
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 40px rgba(255, 50, 50, 0.4);
  letter-spacing: 6px;
  margin: 0;
  text-transform: uppercase;
  position: relative;
}

.mode-selector-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff4444, transparent);
  border-radius: 2px;
}

.game-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.game-mode-card {
  background: linear-gradient(145deg, rgba(25, 35, 55, 0.95), rgba(12, 18, 30, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 35px 28px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.game-mode-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 80, 80, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.game-mode-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 80, 80, 0.6), transparent);
  opacity: 0;
  transition: all 0.4s ease;
}

.game-mode-card:hover {
  transform: translateY(-12px) scale(1.03);
  border-color: rgba(255, 80, 80, 0.4);
  box-shadow: 
    0 20px 50px rgba(255, 50, 50, 0.25),
    0 0 40px rgba(255, 50, 50, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.game-mode-card:hover::before {
  opacity: 1;
}

.game-mode-card:hover::after {
  opacity: 1;
  width: 80%;
}

.game-mode-card:hover .mode-name {
  color: #ff6666;
  text-shadow: 0 0 20px rgba(255, 80, 80, 0.5);
}

.game-mode-card:active {
  transform: translateY(-6px) scale(1.01);
}

.mode-name {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  margin: 0;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.mode-description {
  font-size: 14px;
  color: #8899aa;
  line-height: 1.7;
  margin: 0;
  position: relative;
  z-index: 1;
  max-width: 220px;
}

.back-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #888;
  padding: 14px 36px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  text-transform: uppercase;
}

.back-button:hover {
  background: rgba(255, 80, 80, 0.1);
  border-color: rgba(255, 80, 80, 0.4);
  color: #ff6666;
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(255, 50, 50, 0.2);
}

/* Timer del modo contrarreloj */
#timedModeTimer {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 100, 100, 0.5);
  z-index: 25;
  display: none;
  background: linear-gradient(135deg, rgba(10, 20, 35, 0.9), rgba(5, 15, 25, 0.95));
  padding: 10px 30px;
  border-radius: 15px;
  border: 2px solid rgba(255, 100, 100, 0.3);
}

#timedModeTimer.warning {
  color: #ff4444;
  animation: timerWarning 0.5s infinite;
}

@keyframes timerWarning {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); }
}

/* Indicador de modo práctica */
#practiceModeIndicator {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 700;
  color: #00ff88;
  text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
  z-index: 25;
  display: none;
  background: linear-gradient(135deg, rgba(0, 40, 20, 0.9), rgba(0, 20, 10, 0.95));
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  letter-spacing: 2px;
}

/* Indicador de modo atropello */
#roadkillIndicator {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 700;
  color: #ff8800;
  text-shadow: 0 0 15px rgba(255, 136, 0, 0.5);
  z-index: 25;
  display: none;
  background: linear-gradient(135deg, rgba(40, 20, 0, 0.9), rgba(20, 10, 0, 0.95));
  padding: 10px 25px;
  border-radius: 20px;
  border: 1px solid rgba(255, 136, 0, 0.3);
  letter-spacing: 2px;
}

/* Indicador de modo francotirador */
#sniperModeIndicator {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 700;
  color: #ff4444;
  text-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
  z-index: 25;
  display: none;
  background: linear-gradient(135deg, rgba(40, 10, 10, 0.9), rgba(20, 5, 5, 0.95));
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 68, 68, 0.3);
  letter-spacing: 2px;
}

/* Indicador de modo melee */
#meleeModeIndicator {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 700;
  color: #ff6633;
  text-shadow: 0 0 15px rgba(255, 102, 51, 0.5);
  z-index: 25;
  display: none;
  background: linear-gradient(135deg, rgba(50, 20, 10, 0.9), rgba(30, 10, 5, 0.95));
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 102, 51, 0.3);
  letter-spacing: 2px;
}

/* Indicador de modo mundo abierto */
#openworldModeIndicator {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 700;
  color: #44bb66;
  text-shadow: 0 0 15px rgba(68, 187, 102, 0.5);
  z-index: 25;
  display: none;
  background: linear-gradient(135deg, rgba(20, 50, 30, 0.9), rgba(10, 30, 15, 0.95));
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(68, 187, 102, 0.3);
  letter-spacing: 2px;
}

#roadkillIndicator #roadkillKills {
  font-size: 22px;
  color: #ffaa00;
}

/* ========== SELECTOR DE HORA DEL DÍA ========== */
.time-selector {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 35;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 120%, rgba(120, 20, 20, 0.4), transparent),
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(80, 20, 40, 0.25), transparent),
    radial-gradient(ellipse 50% 30% at 80% 30%, rgba(60, 15, 30, 0.2), transparent),
    linear-gradient(180deg, rgba(5, 5, 15, 0.98), rgba(10, 5, 10, 0.99));
  backdrop-filter: blur(10px);
  animation: fadeIn 0.4s ease;
  overflow: hidden;
}

.time-selector::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 50, 50, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 30, 30, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.time-selector-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 50px;
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.time-selector-title {
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 40px rgba(255, 50, 50, 0.4);
  letter-spacing: 6px;
  margin: 0;
  text-transform: uppercase;
  position: relative;
}

.time-selector-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff4444, transparent);
  border-radius: 2px;
}

.time-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  width: 100%;
}

.time-option-card {
  background: linear-gradient(145deg, rgba(25, 35, 55, 0.95), rgba(12, 18, 30, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 25px 20px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.time-option-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.time-option-card:hover .time-name {
  text-shadow: 0 0 20px currentColor;
}

.time-visual {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: relative;
  transition: all 0.4s ease;
}

.time-option-card:hover .time-visual {
  transform: scale(1.1);
}

/* Visual de día */
.day-visual {
  background: linear-gradient(180deg, #87ceeb 0%, #4a90c2 100%);
  box-shadow: 
    0 0 30px rgba(255, 220, 100, 0.5),
    inset 0 -20px 30px rgba(255, 255, 255, 0.3);
}

.day-visual::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, #ffee88, #ffcc00);
  border-radius: 50%;
  box-shadow: 0 0 20px #ffcc00, 0 0 40px rgba(255, 200, 0, 0.5);
}

.time-option-card:hover .day-visual {
  border-color: rgba(135, 206, 235, 0.6);
  box-shadow: 
    0 0 40px rgba(255, 220, 100, 0.7),
    inset 0 -20px 30px rgba(255, 255, 255, 0.4);
}

/* Visual de atardecer */
.sunset-visual {
  background: linear-gradient(180deg, #ff7744 0%, #cc4422 50%, #442211 100%);
  box-shadow: 
    0 0 30px rgba(255, 100, 50, 0.4),
    inset 0 -15px 25px rgba(0, 0, 0, 0.3);
}

.sunset-visual::before {
  content: '';
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 20px;
  background: radial-gradient(ellipse, #ff6633, #cc3300);
  border-radius: 50% 50% 0 0;
  box-shadow: 0 0 15px #ff4400;
}

.time-option-card:hover .sunset-visual {
  border-color: rgba(255, 100, 50, 0.6);
  box-shadow: 
    0 0 40px rgba(255, 100, 50, 0.6),
    inset 0 -15px 25px rgba(0, 0, 0, 0.4);
}

/* Visual de noche */
.night-visual {
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a15 100%);
  box-shadow: 
    0 0 30px rgba(100, 100, 150, 0.3),
    inset 0 -15px 25px rgba(50, 50, 100, 0.2);
}

.night-visual::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 15px;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #eeeeff, #ccccdd);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(200, 200, 255, 0.5);
}

.night-visual::after {
  content: '✦ ✧ ✦';
  position: absolute;
  top: 20px;
  left: 10px;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 3px;
}

.time-option-card:hover .night-visual {
  border-color: rgba(100, 100, 200, 0.5);
  box-shadow: 
    0 0 40px rgba(100, 100, 200, 0.4),
    inset 0 -15px 25px rgba(50, 50, 100, 0.3);
}

.time-name {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 3px;
  margin: 0;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

/* Colores específicos por hora */
.time-option-card:nth-child(1):hover {
  border-color: rgba(135, 206, 235, 0.5);
}
.time-option-card:nth-child(1):hover .time-name {
  color: #87ceeb;
}

.time-option-card:nth-child(2):hover {
  border-color: rgba(255, 119, 68, 0.5);
}
.time-option-card:nth-child(2):hover .time-name {
  color: #ff7744;
}

.time-option-card:nth-child(3):hover {
  border-color: rgba(100, 100, 200, 0.5);
}
.time-option-card:nth-child(3):hover .time-name {
  color: #8888cc;
}

.time-description {
  font-size: 13px;
  color: #8899aa;
  line-height: 1.5;
  margin: 0;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 900px) {
  .game-modes-grid,
  .time-options-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
  }
  
  .mode-selector-title,
  .time-selector-title {
    font-size: 28px;
  }
}


/* ========== SISTEMA DE INVENTARIO (MUNDO ABIERTO) ========== */

/* Hotbar inferior */
.inventory-hotbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(100, 200, 255, 0.3);
  border-radius: 8px;
  z-index: 35;
  backdrop-filter: blur(4px);
}

.hotbar-slot {
  width: 50px;
  height: 50px;
  background: rgba(20, 40, 60, 0.8);
  border: 2px solid rgba(100, 150, 200, 0.4);
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.hotbar-slot.selected {
  border-color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.5), inset 0 0 20px rgba(0, 255, 136, 0.1);
}

.hotbar-slot:hover {
  border-color: rgba(150, 200, 255, 0.7);
}

.hotbar-slot .slot-key {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 10px;
  color: rgba(150, 200, 255, 0.6);
  font-weight: bold;
}

.hotbar-slot .item-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.hotbar-slot .item-count {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 12px;
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
}

/* Pantalla de inventario completo */
.inventory-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 40;
  backdrop-filter: blur(8px);
}

.inventory-container {
  background: linear-gradient(180deg, rgba(15, 30, 50, 0.95), rgba(10, 20, 35, 0.98));
  border: 2px solid rgba(100, 200, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  min-width: 520px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 150, 255, 0.1);
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(100, 200, 255, 0.2);
}

.inventory-header h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  letter-spacing: 1px;
}

.inventory-hint {
  color: rgba(150, 200, 255, 0.5);
  font-size: 12px;
}

.inventory-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inventory-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.inventory-slot {
  width: 52px;
  height: 52px;
  background: rgba(20, 40, 60, 0.9);
  border: 2px solid rgba(80, 120, 160, 0.4);
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inventory-slot:hover {
  border-color: rgba(100, 200, 255, 0.7);
  background: rgba(30, 60, 90, 0.9);
}

.inventory-slot.selected {
  border-color: #00ff88;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.inventory-slot.dragging {
  opacity: 0.5;
  border-color: #ffaa00;
}

.inventory-slot .item-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  pointer-events: none;
}

.inventory-slot .item-count {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 11px;
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
  pointer-events: none;
}

.inventory-slot .slot-key {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  color: rgba(150, 200, 255, 0.5);
  font-weight: bold;
}

.inventory-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 200, 255, 0.3), transparent);
  margin: 16px 0;
}

.inventory-hotbar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hotbar-label {
  font-size: 11px;
  color: rgba(150, 200, 255, 0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Tooltip de item */
.item-tooltip {
  position: fixed;
  background: rgba(10, 20, 35, 0.95);
  border: 1px solid rgba(100, 200, 255, 0.4);
  border-radius: 8px;
  padding: 10px 14px;
  z-index: 50;
  pointer-events: none;
  max-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.item-tooltip .tooltip-name {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}

.item-tooltip .tooltip-desc {
  color: rgba(180, 200, 220, 0.8);
  font-size: 11px;
  line-height: 1.4;
}

.item-tooltip .tooltip-rarity {
  font-size: 10px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(100, 200, 255, 0.2);
}

.item-tooltip .tooltip-rarity.common { color: #aaa; }
.item-tooltip .tooltip-rarity.uncommon { color: #5f5; }
.item-tooltip .tooltip-rarity.rare { color: #55f; }
.item-tooltip .tooltip-rarity.epic { color: #a5f; }
.item-tooltip .tooltip-rarity.legendary { color: #fa5; }


/* Item flotante (siguiendo el cursor) */
.floating-item {
  position: fixed;
  width: 48px;
  height: 48px;
  background: rgba(20, 40, 60, 0.95);
  border: 2px solid #00ff88;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4), 0 0 30px rgba(0, 255, 136, 0.2);
  animation: floatPulse 0.5s ease-in-out infinite alternate;
}

.floating-item .item-icon {
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.floating-item .item-count {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 11px;
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
}

@keyframes floatPulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}


/* ========== MESA DE CRAFTEO ========== */
.crafting-section {
  margin-top: 15px;
}

.crafting-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 200, 100, 0.8);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.crafting-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.craft-recipe {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.3), rgba(101, 67, 33, 0.2));
  border: 2px solid rgba(139, 69, 19, 0.4);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.craft-recipe:hover {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.5), rgba(101, 67, 33, 0.4));
  border-color: rgba(255, 200, 100, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.craft-recipe:active {
  transform: translateY(0);
}

.craft-input, .craft-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.craft-item {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.craft-amount {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.craft-arrow {
  font-size: 20px;
  color: rgba(255, 200, 100, 0.8);
  font-weight: bold;
}

.craft-name {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* Efecto de crafteo exitoso */
.craft-recipe.crafted {
  animation: craftSuccess 0.4s ease-out;
}

@keyframes craftSuccess {
  0% { box-shadow: 0 0 0 0 rgba(100, 255, 100, 0.6); }
  50% { box-shadow: 0 0 20px 10px rgba(100, 255, 100, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(100, 255, 100, 0); }
}

/* Efecto de crafteo fallido */
.craft-recipe.craft-failed {
  animation: craftFail 0.3s ease-out;
}

@keyframes craftFail {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}


.crafting-hint {
  margin-top: 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}


/* ========== ICONOS DE ITEMS CON IMAGEN ========== */
.item-icon-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  image-rendering: pixelated;
}

.hotbar-slot .item-icon-img {
  width: 36px;
  height: 36px;
}

.inventory-slot .item-icon-img {
  width: 36px;
  height: 36px;
}

.floating-item .item-icon-img {
  width: 32px;
  height: 32px;
}

.craft-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}


/* ========== RESPONSIVE COMPLETO PARA MENÚS ========== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
  .logo-title {
    font-size: 56px;
  }
  
  .logo-subtitle {
    font-size: 14px;
    letter-spacing: 8px;
  }
  
  .play-button {
    padding: 16px 45px;
    font-size: 20px;
  }
  
  .menu-panel {
    max-width: 420px;
  }
  
  .controls-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 15px 18px;
  }
  
  .mode-selector-container,
  .time-selector-container {
    padding: 30px;
    max-width: 800px;
  }
  
  .game-modes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .game-mode-card {
    padding: 25px 20px;
  }
  
  .mode-name {
    font-size: 18px;
    letter-spacing: 2px;
  }
  
  .mode-description {
    font-size: 12px;
    max-width: 180px;
  }
}

/* Móviles y pantallas pequeñas */
@media (max-width: 768px) {
  .menu-content {
    padding: 20px;
    gap: 15px;
  }
  
  .logo-title {
    font-size: 42px;
    letter-spacing: 2px;
  }
  
  .logo-subtitle {
    font-size: 11px;
    letter-spacing: 6px;
  }
  
  .play-button {
    padding: 14px 35px;
    font-size: 18px;
    gap: 10px;
  }
  
  .play-icon {
    font-size: 22px;
  }
  
  .menu-panel {
    max-width: 100%;
    margin: 0 10px;
  }
  
  .panel-header {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .controls-grid {
    padding: 12px 14px;
  }
  
  .control-item kbd {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 60px;
  }
  
  .control-item span {
    font-size: 11px;
  }
  
  .volume-controls {
    padding: 12px 14px;
  }
  
  .volume-item {
    gap: 8px;
    margin-bottom: 10px;
  }
  
  .volume-item label {
    font-size: 11px;
    min-width: 80px;
  }
  
  .volume-item span {
    font-size: 10px;
    min-width: 35px;
  }
  
  .credits-info {
    padding: 15px;
  }
  
  .credits-text {
    font-size: 12px;
  }
  
  .credits-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .credits-btn {
    padding: 10px 20px;
    font-size: 12px;
    justify-content: center;
  }
  
  .share-button {
    padding: 10px 20px;
    font-size: 12px;
  }
  
  /* Selector de modos */
  .mode-selector-container,
  .time-selector-container {
    padding: 20px;
    max-width: 100%;
  }
  
  .mode-selector-title,
  .time-selector-title {
    font-size: 24px;
    letter-spacing: 3px;
  }
  
  .game-modes-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 320px;
  }
  
  .game-mode-card {
    padding: 20px 16px;
    gap: 12px;
  }
  
  .mode-name {
    font-size: 16px;
    letter-spacing: 2px;
  }
  
  .mode-description {
    font-size: 11px;
    max-width: 100%;
    line-height: 1.5;
  }
  
  .time-options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 280px;
  }
  
  .time-option-card {
    padding: 18px 16px;
    gap: 10px;
  }
  
  .time-visual {
    width: 60px;
    height: 60px;
  }
  
  .time-name {
    font-size: 16px;
    letter-spacing: 2px;
  }
  
  .time-description {
    font-size: 11px;
  }
  
  .back-button {
    padding: 12px 28px;
    font-size: 12px;
  }
  
  /* Pantalla de carga */
  .loading-title {
    font-size: 42px;
    letter-spacing: 4px;
  }
  
  .loading-subtitle {
    font-size: 12px;
    letter-spacing: 4px;
    margin-bottom: 30px;
  }
  
  .loading-bar-container {
    width: 250px;
  }
  
  .loading-percent {
    font-size: 18px;
  }
  
  /* Game Over */
  .death-title {
    font-size: 48px;
    letter-spacing: 4px;
  }
  
  .death-subtitle {
    font-size: 14px;
  }
  
  .stats-container {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stat-item {
    padding: 15px 20px;
  }
  
  .stat-icon {
    font-size: 24px;
  }
  
  .stat-value {
    font-size: 28px;
  }
  
  /* Pausa */
  .pause-title {
    font-size: 42px;
    letter-spacing: 5px;
  }
  
  .pause-hint {
    font-size: 12px;
  }
  
  .pause-settings {
    max-width: 100%;
    margin: 0 15px;
  }
  
  .pause-buttons {
    gap: 10px;
  }
  
  .menu-button {
    padding: 12px 30px;
    font-size: 14px;
  }
  
  /* Inventario */
  .inventory-container {
    min-width: auto;
    width: 95%;
    max-width: 400px;
    padding: 16px;
  }
  
  .inventory-header h2 {
    font-size: 18px;
  }
  
  .inventory-slot,
  .hotbar-slot {
    width: 44px;
    height: 44px;
  }
  
  .inventory-slot .item-icon,
  .hotbar-slot .item-icon {
    font-size: 24px;
  }
  
  .inventory-hotbar {
    padding: 6px;
    gap: 3px;
  }
  
  .hotbar-slot {
    width: 42px;
    height: 42px;
  }
  
  .crafting-grid {
    flex-direction: column;
    align-items: center;
  }
  
  .craft-recipe {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  /* Indicadores de modo */
  #timedModeTimer,
  #practiceModeIndicator,
  #roadkillIndicator,
  #sniperModeIndicator,
  #meleeModeIndicator,
  #openworldModeIndicator {
    top: 60px;
    font-size: 14px;
    padding: 6px 14px;
  }
  
  #timedModeTimer {
    font-size: 36px;
    padding: 8px 20px;
  }
  
  /* Wave banner */
  #waveBanner {
    padding: 18px 30px;
    border-radius: 16px;
  }
  
  #waveBanner .title {
    font-size: 12px;
    letter-spacing: 3px;
  }
  
  #waveBanner .wave-num {
    font-size: 42px;
  }
  
  #waveBanner .subtitle {
    font-size: 12px;
    margin-top: 8px;
  }
}

/* Móviles muy pequeños */
@media (max-width: 480px) {
  .logo-title {
    font-size: 32px;
  }
  
  .logo-subtitle {
    font-size: 9px;
    letter-spacing: 4px;
  }
  
  .play-button {
    padding: 12px 28px;
    font-size: 16px;
  }
  
  .mode-selector-title,
  .time-selector-title {
    font-size: 20px;
    letter-spacing: 2px;
  }
  
  .game-mode-card {
    padding: 16px 14px;
  }
  
  .mode-name {
    font-size: 14px;
  }
  
  .mode-description {
    font-size: 10px;
  }
  
  .loading-title {
    font-size: 32px;
    letter-spacing: 3px;
  }
  
  .death-title {
    font-size: 36px;
  }
  
  .pause-title {
    font-size: 32px;
  }
  
  .inventory-slot,
  .hotbar-slot {
    width: 38px;
    height: 38px;
  }
  
  .inventory-slot .item-icon,
  .hotbar-slot .item-icon {
    font-size: 20px;
  }
  
  #waveBanner .wave-num {
    font-size: 32px;
  }
}

/* Orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  .menu-content {
    padding: 10px;
    gap: 10px;
  }
  
  .logo-title {
    font-size: 28px;
    margin-bottom: 5px;
  }
  
  .logo-subtitle {
    font-size: 8px;
    margin-bottom: 10px;
  }
  
  .play-button {
    padding: 10px 25px;
    font-size: 14px;
  }
  
  .menu-panel {
    max-height: 150px;
    overflow-y: auto;
  }
  
  .panel-content.open {
    max-height: 120px;
    overflow-y: auto;
  }
  
  .mode-selector-container,
  .time-selector-container {
    padding: 15px;
    gap: 15px;
  }
  
  .game-modes-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 100%;
  }
  
  .game-mode-card {
    padding: 12px 10px;
    gap: 6px;
  }
  
  .mode-name {
    font-size: 12px;
  }
  
  .mode-description {
    font-size: 9px;
    display: none;
  }
  
  .time-options-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }
  
  .time-visual {
    width: 40px;
    height: 40px;
  }
  
  .time-name {
    font-size: 12px;
  }
  
  .time-description {
    display: none;
  }
  
  .inventory-container {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Optimización de rendimiento para animaciones */
@media (prefers-reduced-motion: reduce) {
  .play-button,
  .game-mode-card,
  .time-option-card,
  .menu-button,
  #waveBanner {
    animation: none !important;
    transition: none !important;
  }
  
  .play-glow {
    display: none;
  }
}

/* GPU acceleration para elementos del menú */
.menu-container,
.game-mode-selector,
.time-selector,
.loading-screen,
.game-screen,
#waveBanner {
  will-change: opacity, transform;
  transform: translateZ(0);
}
