* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #111;
  color: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
}

h1, h2 {
  margin-bottom: 16px;
}

button {
  padding: 8px 16px;
  margin: 4px;
  border: none;
  border-radius: 4px;
  background: #4caf50;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

button:hover {
  background: #66bb6a;
}

.screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 100%);
  padding: 0;
  border-radius: 16px;
  text-align: center;
  z-index: 10;
  border: 2px solid #4a4a6a;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

/* Menú principal - pantalla completa con scroll */
#main-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  border: none;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
}

/* ===== MENÚ PRINCIPAL MEJORADO ===== */
.menu-container {
  padding: 30px 40px;
  min-width: 500px;
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 100%);
  border-radius: 16px;
  border: 2px solid #4a4a6a;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.menu-header {
  margin-bottom: 24px;
}

.game-logo {
  font-size: 64px;
  margin-bottom: 8px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.menu-header h1 {
  font-size: 32px;
  background: linear-gradient(90deg, #ffd54f, #ff9800, #ffd54f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 8px 0;
  text-shadow: none;
}

.game-subtitle {
  color: #888;
  font-size: 14px;
  margin: 0;
}

/* Selección de clase mejorada */
#class-select {
  margin: 20px 0;
}

#class-select h3 {
  margin-bottom: 16px;
  color: #81d4fa;
  font-size: 16px;
}

.class-options {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.class-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  border: 2px solid #4a4a6a;
  border-radius: 12px;
  width: 150px;
  min-height: 200px;
  transition: all 0.3s;
  cursor: pointer;
}

.class-btn:hover {
  border-color: #81d4fa;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(129, 212, 250, 0.2);
}

.class-btn.selected {
  border-color: #ffd54f;
  box-shadow: 0 0 20px rgba(255, 213, 79, 0.4);
  background: linear-gradient(135deg, #3d3427 0%, #2d2d44 100%);
}

.class-portrait {
  font-size: 48px;
  margin-bottom: 8px;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
}

.warrior-portrait { background: linear-gradient(135deg, rgba(198,40,40,0.3), rgba(0,0,0,0.3)); }
.archer-portrait { background: linear-gradient(135deg, rgba(46,125,50,0.3), rgba(0,0,0,0.3)); }
.mage-portrait { background: linear-gradient(135deg, rgba(21,101,192,0.3), rgba(0,0,0,0.3)); }

.class-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.class-name {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.class-resource {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 6px;
}

.class-desc {
  font-size: 11px;
  color: #888;
  margin-bottom: 8px;
}

.class-stats {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: #81d4fa;
}

/* Configuración automática */
.auto-settings {
  margin: 20px 0;
  padding: 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  border: 1px solid #4a4a6a;
}

.auto-settings h3 {
  margin: 0 0 12px 0;
  color: #81d4fa;
  font-size: 14px;
}

.toggle-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  transition: all 0.2s;
}

.toggle-item:hover {
  background: rgba(255,255,255,0.05);
}

.toggle-item input {
  display: none;
}

.toggle-slider {
  width: 40px;
  height: 22px;
  background: #333;
  border-radius: 11px;
  position: relative;
  transition: all 0.3s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #666;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all 0.3s;
}

.toggle-item input:checked + .toggle-slider {
  background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.toggle-item input:checked + .toggle-slider::after {
  left: 20px;
  background: #fff;
}

.toggle-label {
  font-size: 13px;
  color: #ccc;
}

/* Botones del menú */
.menu-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.btn-primary {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: bold;
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  border: 2px solid #66bb6a;
  border-radius: 8px;
  color: #fff;
  transition: all 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
  padding: 14px 32px;
  font-size: 16px;
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  border: 2px solid #4a4a6a;
  border-radius: 8px;
  color: #ccc;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: #81d4fa;
  color: #fff;
}

.btn-danger-small {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: bold;
  background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-small:hover {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  transform: scale(1.05);
}

.menu-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #333;
}

.menu-footer p {
  margin: 0;
  font-size: 12px;
  color: #666;
}

/* ===== CONTENEDOR DEL JUEGO ===== */
#game-container {
  position: relative;
  width: 800px;
  height: 600px;
  margin: 20px auto;
  border: 3px solid #4a4a6a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  background: #111;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #222;
}

/* ===== HUD SUPERPUESTO ===== */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

#hud > * {
  pointer-events: auto;
}

/* Esquina superior izquierda */
.hud-top-left {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== BARRAS DE RECURSOS MEJORADAS v2 ===== */
.hud-bars-improved {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.75);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.resource-bar-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.resource-bar-v2 .bar-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  filter: drop-shadow(0 0 3px currentColor);
}

.resource-bar-v2 .bar-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.resource-bar-v2 .bar-bg {
  flex: 1;
  height: 14px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.resource-bar-v2 .bar-fill-v2 {
  height: 100%;
  border-radius: 6px;
  transition: width 0.2s ease-out;
  box-shadow: 0 0 8px currentColor;
}

/* Colores por tipo de barra */
.resource-bar-v2.hp .bar-fill-v2 {
  background: linear-gradient(180deg, #ff6b6b 0%, #ee5a5a 50%, #c0392b 100%);
  box-shadow: 0 0 10px rgba(255, 100, 100, 0.5);
}

.resource-bar-v2.mana .bar-fill-v2 {
  background: linear-gradient(180deg, #74b9ff 0%, #0984e3 50%, #2d3436 100%);
  box-shadow: 0 0 10px rgba(116, 185, 255, 0.5);
}

.resource-bar-v2.stamina .bar-fill-v2 {
  background: linear-gradient(180deg, #ffeaa7 0%, #fdcb6e 50%, #e17055 100%);
  box-shadow: 0 0 10px rgba(253, 203, 110, 0.5);
}

.resource-bar-v2.xp .bar-fill-v2 {
  background: linear-gradient(180deg, #a29bfe 0%, #6c5ce7 50%, #5f27cd 100%);
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}

.resource-bar-v2 .bar-value {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  min-width: 55px;
  text-align: right;
}

/* ===== BOTONES DE BOOST EN HUD ===== */
.hud-boosts {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.boost-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  background: linear-gradient(180deg, #2d3436 0%, #1e272e 100%);
  border: 1px solid #636e72;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 50px;
}

.boost-btn:hover {
  background: linear-gradient(180deg, #3d4448 0%, #2d3436 100%);
  border-color: #74b9ff;
  transform: translateY(-2px);
}

.boost-btn.active {
  background: linear-gradient(180deg, #00b894 0%, #00a085 100%);
  border-color: #55efc4;
  box-shadow: 0 0 12px rgba(0, 184, 148, 0.5);
}

.boost-btn.cooldown {
  background: linear-gradient(180deg, #636e72 0%, #4a5568 100%);
  border-color: #4a5568;
  opacity: 0.7;
  cursor: not-allowed;
}

.boost-btn .boost-icon {
  font-size: 16px;
}

.boost-btn .boost-label {
  font-size: 9px;
  font-weight: 600;
  color: #dfe6e9;
  margin-top: 2px;
}

.boost-btn .boost-timer {
  font-size: 8px;
  color: #74b9ff;
  margin-top: 1px;
}

.boost-btn.active .boost-timer {
  color: #55efc4;
}

.boost-btn.cooldown .boost-timer {
  color: #b2bec3;
}

/* Esquina superior derecha */
.hud-top-right {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Barra de progreso VERTICAL - esquina inferior izquierda (escritorio) */
.hud-top-center {
  position: absolute;
  bottom: 20px;
  left: 10px;
  top: auto;
  transform: none;
}

.wave-display {
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.7);
  padding: 8px;
  border-radius: 8px;
}

.wave-bar {
  width: 14px !important;
  height: 150px !important;
  flex-direction: column-reverse;
}

.wave-bar-fill {
  width: 100% !important;
  background: linear-gradient(0deg, #ff5722, #ff9800) !important;
}

.wave-text {
  font-size: 11px;
  margin-bottom: 5px;
}

.wave-count {
  font-size: 10px;
  margin-top: 5px;
}

.wave-bar {
  background: #222;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.wave-bar-fill {
  background: linear-gradient(0deg, #ff5722, #ff9800);
  transition: height 0.3s;
  border-radius: 3px;
}

/* Parte inferior */
.hud-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.hud-skills {
  border-radius: 12px 12px 0 0;
}

/* Barras de recursos */
.hud-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resource-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bar-label {
  font-size: 14px;
  width: 20px;
}

.bar-container {
  position: relative;
  width: 100px;
  height: 14px;
  background: #111;
  border-radius: 7px;
  border: 1px solid #333;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 100%;
  transition: width 0.2s;
}

.bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
}

.hp-bar .bar-fill { background: linear-gradient(90deg, #c62828, #ef5350); }
.mana-bar .bar-fill { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.stamina-bar .bar-fill { background: linear-gradient(90deg, #f9a825, #ffeb3b); }
.xp-bar .bar-fill { background: linear-gradient(90deg, #7b1fa2, #ce93d8); }

/* Barra lateral derecha con stats mini */
.hud-right-sidebar {
  position: absolute;
  right: 5px;
  top: 35%;
  transform: translateY(-50%);
}

/* Stats mini (barra lateral derecha) */
.hud-stats-mini {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
}

.stat-mini {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  padding: 2px 4px;
  text-shadow: 1px 1px 2px #000, 0 0 4px #000;
}

.stat-mini.zone { color: #66bb6a; }
.stat-mini.level { color: #ce93d8; }
.stat-mini.gold { color: #ffd54f; }
.stat-mini.atk { color: #ef5350; }
.stat-mini.def { color: #64b5f6; }
.stat-mini.dps { color: #ff9800; font-weight: bold; }

/* Botón + integrado en stats */
.stat-mini-btn {
  width: 100%;
  padding: 4px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: bold;
  background: rgba(102, 187, 106, 0.2);
  border: 1px solid rgba(102, 187, 106, 0.5);
  border-radius: 4px;
  color: #66bb6a;
  cursor: pointer;
  transition: all 0.2s;
}

.stat-mini-btn:hover {
  background: rgba(102, 187, 106, 0.4);
  border-color: #66bb6a;
}

/* Stats compactos (legacy, oculto) */
.hud-stats-compact {
  display: none;
}

/* Oleada */
.wave-display {
  background: rgba(0,0,0,0.7);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid #4a4a6a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wave-text {
  font-size: 12px;
  color: #ffd54f;
  white-space: nowrap;
}

/* wave-bar estilos movidos a .hud-top-center */

/* Botones del HUD (Tienda, Config, Ayuda) */
.hud-buttons {
  display: flex;
  gap: 4px;
}

.hud-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 16px;
  background: rgba(0,0,0,0.6);
  border: 2px solid #444;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.hud-btn:hover {
  border-color: #81d4fa;
  background: rgba(0,0,0,0.8);
}

.auto-toggle.active {
  opacity: 1;
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.3);
}

.shop-toggle {
  opacity: 1;
  border-color: #ffd54f;
}

/* Habilidades */
.hud-skills {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #4a4a6a;
}

.skill-slot {
  position: relative;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  border: 2px solid #4a4a6a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.skill-slot:hover {
  border-color: #81d4fa;
  transform: scale(1.05);
}

.skill-key {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 9px;
  font-weight: bold;
  color: #ffd54f;
}

.skill-icon {
  font-size: 20px;
}

.skill-level {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 8px;
  color: #81d4fa;
}

.skill-cooldown {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: rgba(0,0,0,0.75);
  border-radius: 0 0 6px 6px;
  pointer-events: none;
}

.skill-cd-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 4px #000, 1px 1px 2px #000;
  pointer-events: none;
  z-index: 10;
  display: none;
}

/* ===== GAME OVER STATS ===== */
.game-over-stats-container {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.game-over-stats-container h3 {
  color: #ffd54f;
  margin: 0 0 12px 0;
  font-size: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ===== PANTALLA DE ESTADÍSTICAS COMPLETAS ===== */
/* Popups de pantalla completa (estadísticas, configuración, confirmación) */
#all-stats-popup,
#settings-popup,
#confirm-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  border: none;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

/* Popup de confirmación - borde especial */
#confirm-popup .stats-screen-container {
  border-color: #ffd54f;
}

#confirm-popup .stats-screen-header {
  border-bottom-color: rgba(255, 213, 79, 0.3);
}

#confirm-popup .stats-screen-header h2 {
  color: #ffd54f;
}

.stats-screen-container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 12px;
  border: 2px solid #66bb6a;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.stats-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(0, 0, 0, 0.3);
}

.stats-screen-header h2 {
  margin: 0;
  font-size: 18px;
  color: #66bb6a;
}

.stats-close-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.stats-close-btn:hover {
  background: rgba(255, 100, 100, 0.3);
  color: #ff6666;
}

.stats-screen-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* Scrollbar estilizado */
.stats-screen-body::-webkit-scrollbar {
  width: 8px;
}

.stats-screen-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.stats-screen-body::-webkit-scrollbar-thumb {
  background: rgba(102, 187, 106, 0.5);
  border-radius: 4px;
}

.stats-screen-body::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 187, 106, 0.7);
}

.stats-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* 3 columnas para pantallas anchas */
.stats-columns.three-cols {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}

.stats-screen-container.wide {
  max-width: 850px;
}

.stats-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-section {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 10px;
}

/* ===== ITEMS PREMIUM ===== */
.premium-column {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.premium-section h4 {
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.premium-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.premium-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(50, 50, 50, 0.3) 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.premium-item:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.1) 100%);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateX(3px);
}

.premium-item.featured {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.premium-item .item-icon {
  font-size: 24px;
  width: 36px;
  text-align: center;
}

.premium-item .item-info {
  flex: 1;
}

.premium-item .item-name {
  font-size: 12px;
  font-weight: bold;
  color: #ffd700;
}

.premium-item .item-desc {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}

.premium-item .item-price {
  font-size: 11px;
  font-weight: bold;
  color: #4caf50;
  background: rgba(76, 175, 80, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.stats-section h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #81d4fa;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 4px;
  cursor: help;
  transition: background 0.2s;
}

.stats-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

.stats-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.stats-row:nth-child(even):hover {
  background: rgba(255, 255, 255, 0.1);
}

.stats-row span:first-child {
  color: #aaa;
}

.stats-row span:last-child {
  color: #fff;
  font-weight: bold;
}

.stats-screen-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
}

/* Tablet: 2 columnas */
@media (max-width: 850px) {
  .stats-columns.three-cols {
    grid-template-columns: 1fr 1fr;
  }
  
  .stats-screen-container.wide {
    max-width: 95%;
  }
}

/* Móvil: una columna */
@media (max-width: 500px) {
  .stats-columns,
  .stats-columns.three-cols {
    grid-template-columns: 1fr;
  }
  
  .stats-screen-container,
  .stats-screen-container.wide {
    border-radius: 0;
    max-height: 100vh;
    height: 100%;
    max-width: 100%;
  }
  
  .premium-item {
    padding: 8px;
  }
  
  .premium-item .item-icon {
    font-size: 20px;
    width: 28px;
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.stat-label {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
}

/* Game Over y Level Complete como popups de pantalla completa */
#game-over-screen,
#level-complete-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  border: none;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

#game-over-screen {
  text-align: center;
}

#game-over-screen > *,
#level-complete-screen > * {
  max-width: 500px;
  width: 90%;
}

#game-over-screen h2 {
  color: #ef5350;
  margin-bottom: 5px;
}

#game-over-text {
  color: #aaa;
  margin-bottom: 10px;
}

/* ===== POPUP AUTO-AVANCE ===== */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.popup-content {
  position: relative;
  z-index: 101;
  animation: popIn 0.3s ease;
  background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 100%);
  border: 2px solid #4caf50;
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.popup-content h3 {
  margin: 0 0 12px 0;
  color: #ffd54f;
  font-size: 20px;
}

.popup-content p {
  margin: 0 0 16px 0;
  color: #ccc;
}

.countdown-bar {
  height: 8px;
  background: #222;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.countdown-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #66bb6a);
  transition: width 0.1s linear;
}

.level-stats {
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row span:first-child {
  color: #aaa;
}

.stat-row span:last-child {
  color: #ffd54f;
  font-weight: bold;
}

/* ===== POPUP DE CONFIGURACIÓN ===== */
.settings-content {
  min-width: 280px;
  max-height: 80vh;
  overflow-y: auto;
}

.settings-section {
  margin-bottom: 16px;
}

.settings-section h4 {
  font-size: 12px;
  color: #81d4fa;
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Todos los popups pantalla completa en móvil */
@media (max-width: 600px) {
  .popup .popup-content,
  #settings-popup .popup-content.settings-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  
  .popup .popup-content h3,
  #settings-popup .popup-content.settings-content h3 {
    padding: 15px;
    margin: 0;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: #1a1a2e;
    z-index: 10;
  }
  
  #settings-popup .settings-section {
    padding: 0 15px;
  }
  
  .popup .popup-buttons,
  #settings-popup .popup-buttons {
    margin-top: auto;
    padding: 15px;
    border-top: 1px solid #333;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: #1a1a2e;
  }
  
  .popup .popup-buttons button,
  #settings-popup .popup-buttons button {
    width: 100%;
  }
  
  /* Popup de estadísticas en móvil */
  .stats-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    z-index: 500;
  }
  
  .stats-popup-content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
  
  .stats-popup-header {
    padding: 15px;
    position: sticky;
    top: 0;
    background: rgba(15, 15, 25, 0.98);
    z-index: 10;
  }
  
  .stats-popup-header h3 {
    font-size: 14px;
  }
  
  .stats-popup-body {
    padding: 15px;
  }
  
  .stats-section h4 {
    font-size: 12px;
  }
  
  .stats-row {
    font-size: 12px;
    padding: 6px 8px;
  }
  
  /* Popups de estadísticas y configuración en móvil - pantalla completa */
  #all-stats-popup .stats-screen-container,
  #settings-popup .stats-screen-container {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
  }
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
}

.setting-label {
  font-size: 14px;
  color: #ddd;
}

.setting-toggle {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 20px;
  border: 2px solid #666;
  background: #333;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 50px;
}

.setting-toggle.active {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  border-color: #66bb6a;
  color: #fff;
}

.setting-toggle:hover {
  transform: scale(1.05);
}

.popup-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.popup-buttons button {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 8px;
}

#btn-cancel-auto {
  background: linear-gradient(135deg, #c62828 0%, #8b1a1a 100%);
  border: 2px solid #ef5350;
}

#btn-skip-auto {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  border: 2px solid #66bb6a;
}

/* ===== PANTALLA NIVEL COMPLETADO ===== */
.complete-container {
  padding: 30px 40px;
}

.complete-icon {
  font-size: 64px;
  margin-bottom: 12px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.complete-container h2 {
  color: #ffd54f;
  margin: 0 0 8px 0;
}

.complete-rewards {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 16px 0;
}

.complete-rewards span {
  padding: 8px 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
}

#complete-gold-reward { color: #ffd54f; }
#complete-xp-reward { color: #ce93d8; }

.complete-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

.visible {
  display: block;
}

/* ===== TIENDA VISUAL ===== */
#shop-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: 100vw;
  height: 100vh;
  max-width: none;
  padding: 20px;
  margin: 0;
  background: rgba(0, 0, 0, 0.9);
  border: none;
  border-radius: 0;
  overflow: hidden;
  z-index: 1000;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
}

#shop-screen:not(.hidden) {
  display: flex;
}

.shop-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 800px;
  max-height: 90vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #4a4a6a;
  border-radius: 12px;
  overflow: hidden;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(90deg, #2d2d44 0%, #1a1a2e 100%);
  border-bottom: 2px solid #4a4a6a;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.shop-header h2 {
  margin: 0;
  font-size: 22px;
  color: #ffd54f;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.shop-gold-display {
  background: linear-gradient(135deg, #5d4e37 0%, #3d3427 100%);
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid #ffd54f;
  font-size: 18px;
  font-weight: bold;
  color: #ffd54f;
}

.gold-icon {
  margin-right: 4px;
}


/* Botón X estándar para popups */
.popup-close-x {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close-x:hover {
  color: #fff;
  transform: scale(1.1);
}

/* Tabs */
.shop-tabs {
  display: flex;
  background: #0d0d1a;
  padding: 8px;
  gap: 4px;
  overflow-x: auto;
  flex-shrink: 0;
}

.shop-tab {
  flex: 1;
  padding: 10px 8px;
  background: #2d2d44;
  border: 1px solid #4a4a6a;
  border-radius: 8px;
  color: #aaa;
  font-size: 13px;
  transition: all 0.2s;
  white-space: nowrap;
}

.shop-tab:hover {
  background: #3d3d5c;
  color: #fff;
}

.shop-tab.active {
  background: linear-gradient(135deg, #4a4a6a 0%, #3d3d5c 100%);
  color: #ffd54f;
  border-color: #ffd54f;
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.3);
}

/* Pestaña Premium */
.shop-tab.premium-tab {
  background: linear-gradient(135deg, #5d4e37 0%, #3d3427 100%);
  border-color: #ffd700;
  color: #ffd700;
}

.shop-tab.premium-tab:hover {
  background: linear-gradient(135deg, #7d6e47 0%, #5d5437 100%);
}

.shop-tab.premium-tab.active {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #1a1a2e;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Content */
.shop-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

.shop-panel {
  display: none;
  height: 100%;
}

.shop-panel.active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ===== PREMIUM SHOP ===== */
.premium-shop-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  padding: 10px;
}

.premium-shop-item {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.08) 100%);
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.premium-shop-item:hover {
  transform: translateY(-5px);
  border-color: #ffd700;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 165, 0, 0.15) 100%);
}

.premium-shop-item.featured {
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.premium-shop-item .premium-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.premium-shop-item .premium-name {
  font-size: 16px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 8px;
}

.premium-shop-item .premium-desc {
  font-size: 12px;
  color: #b0b0b0;
  line-height: 1.4;
}

.premium-shop-item .premium-cta {
  margin-top: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  border-radius: 20px;
  color: #1a1a2e;
  font-weight: bold;
  font-size: 12px;
  display: inline-block;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Cards */
.shop-card {
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  border: 2px solid #4a4a6a;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.shop-card:hover {
  transform: translateY(-4px);
  border-color: #81d4fa;
  box-shadow: 0 6px 20px rgba(129, 212, 250, 0.2);
}

.shop-card.legendary {
  border-color: #ffd54f;
  background: linear-gradient(135deg, #3d3427 0%, #2d2d44 100%);
}

.shop-card.legendary:hover {
  box-shadow: 0 6px 20px rgba(255, 213, 79, 0.4);
}

.item-icon {
  font-size: 36px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.item-name {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.shop-card.legendary .item-name {
  color: #ffd54f;
}

.item-stats {
  font-size: 11px;
  color: #81d4fa;
  margin-bottom: 8px;
}

.item-price {
  font-size: 14px;
  font-weight: bold;
  color: #ffd54f;
  background: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 12px;
}

/* Footer eliminado - más espacio para contenido */

/* ===== SCROLLBAR PERSONALIZADO ===== */
.shop-content::-webkit-scrollbar,
.achievements-grid::-webkit-scrollbar {
  width: 8px;
}

.shop-content::-webkit-scrollbar-track,
.achievements-grid::-webkit-scrollbar-track {
  background: #1a1a2e;
  border-radius: 4px;
}

.shop-content::-webkit-scrollbar-thumb,
.achievements-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffd54f 0%, #ff9800 100%);
  border-radius: 4px;
}

.shop-content::-webkit-scrollbar-thumb:hover,
.achievements-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffeb3b 0%, #ffc107 100%);
}

/* ===== PANEL DE LOGROS ===== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-right: 5px;
}

.achievement-card {
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  border: 2px solid #4a4a6a;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.achievement-card.unlocked {
  border-color: #ffd54f;
  background: linear-gradient(135deg, #3d3427 0%, #2d2d44 100%);
}

.achievement-card.locked {
  opacity: 0.5;
}

.achievement-icon {
  font-size: 28px;
  min-width: 40px;
  text-align: center;
}

.achievement-card.locked .achievement-icon {
  filter: grayscale(100%);
}

.achievement-info {
  flex: 1;
}

.achievement-name {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 2px;
}

.achievement-card.unlocked .achievement-name {
  color: #ffd54f;
}

.achievement-desc {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 4px;
}

.achievement-reward {
  font-size: 11px;
  color: #66bb6a;
}

.achievement-card.unlocked .achievement-reward {
  color: #888;
  text-decoration: line-through;
}

.achievement-status {
  font-size: 18px;
}

/* ===== PANEL DE MEJORA DE HABILIDADES ===== */
.skills-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.skill-upgrade-card {
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  border: 2px solid #4a4a6a;
  border-radius: 12px;
  padding: 12px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.skill-upgrade-card:hover {
  border-color: #81d4fa;
  transform: translateY(-2px);
}

.skill-upgrade-card.cannot-afford {
  opacity: 0.6;
}

.skill-upgrade-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #4a4a6a;
}

/* Indicador de tipo de objetivo */
.skill-target-type {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
}

.skill-target-type.aoe-target {
  background: rgba(255, 100, 0, 0.3);
  color: #ff9800;
  border: 1px solid #ff9800;
}

.skill-target-type.single-target {
  background: rgba(100, 200, 255, 0.3);
  color: #64b5f6;
  border: 1px solid #64b5f6;
}

.skill-target-type.chain-target {
  background: rgba(255, 235, 59, 0.3);
  color: #ffeb3b;
  border: 1px solid #ffeb3b;
}

.skill-target-type.pierce-target {
  background: rgba(255, 50, 50, 0.3);
  color: #ff5555;
  border: 1px solid #ff5555;
}

.skill-upgrade-icon {
  font-size: 32px;
  background: rgba(0,0,0,0.3);
  padding: 8px;
  border-radius: 8px;
}

.skill-upgrade-info {
  display: flex;
  flex-direction: column;
}

.skill-upgrade-name {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
}

.skill-upgrade-level {
  font-size: 12px;
  color: #ffd54f;
}

.skill-upgrade-stats {
  margin-bottom: 10px;
  flex: 1;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #aaa;
  padding: 2px 0;
}

.stat-row b {
  color: #66bb6a;
}

.skill-upgrade-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-upgrade-btn, .skill-max-btn {
  padding: 8px 14px;
  font-size: 12px;
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  border: 2px solid #66bb6a;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  min-width: 70px;
}

.skill-max-btn {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  border-color: #ffb74d;
}

.skill-upgrade-btn:hover:not(:disabled), .skill-max-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.skill-max-btn:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.skill-upgrade-btn:disabled, .skill-max-btn:disabled {
  background: #333;
  border-color: #555;
  color: #666;
  cursor: not-allowed;
}

.skill-upgrade-cost {
  font-size: 13px;
  font-weight: bold;
  color: #ffd54f;
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

/* ===== RESPONSIVE - TABLETS ===== */
@media (max-width: 840px) {
  body {
    padding: 10px;
  }

  .menu-container {
    width: 95vw;
    max-width: 500px;
    min-width: auto;
    padding: 20px;
  }

  .class-options {
    flex-direction: column;
    gap: 10px;
  }

  .class-btn {
    width: 100%;
  }

  #game-container {
    width: 100%;
    max-width: 100vw;
    height: auto;
    aspect-ratio: 4/3;
    margin: 10px auto;
  }

  .shop-container {
    width: 95vw;
    max-width: 500px;
  }

  .shop-tabs {
    flex-wrap: wrap;
  }

  .shop-tab {
    flex: 1 1 45%;
    font-size: 12px;
    padding: 8px 4px;
  }

  .skills-upgrade-grid {
    grid-template-columns: 1fr;
  }

  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== RESPONSIVE - MÓVILES ===== */
@media (max-width: 600px) {
  body {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
  }

  /* ===== MENÚ MÓVIL ===== */
  .screen {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border: none;
  }

  #main-menu {
    padding: 10px 0;
  }

  .menu-container {
    width: 100%;
    max-width: 100%;
    min-width: auto;
    padding: 20px 15px;
    border-radius: 0;
    min-height: auto;
    border: none;
  }

  .menu-header {
    padding: 10px 0;
  }

  .menu-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
  }

  .game-logo {
    font-size: 50px;
    margin-bottom: 10px;
  }

  .game-subtitle {
    font-size: 12px;
  }

  #class-select h3 {
    font-size: 16px;
    margin: 10px 0;
  }

  .class-options {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .class-btn {
    width: calc(33% - 6px);
    min-width: 90px;
    max-width: 110px;
    min-height: auto;
    padding: 10px 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
  }

  .class-portrait {
    font-size: 28px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 6px;
    margin-bottom: 0;
  }

  .class-btn .class-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .class-btn .class-name {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .class-btn .class-resource {
    font-size: 9px;
    margin-bottom: 0;
  }

  .class-btn .class-desc {
    display: none;
  }

  .class-btn .class-stats {
    display: none;
  }

  .auto-settings {
    padding: 12px;
    margin: 10px 0;
  }

  .auto-settings h3 {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .toggle-group {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .toggle-item {
    flex: 0 0 auto;
  }

  .menu-buttons {
    gap: 10px;
    margin-top: 15px;
  }

  .menu-buttons button {
    padding: 12px 20px;
    font-size: 14px;
  }

  .menu-footer {
    padding-top: 10px;
  }

  .menu-footer p {
    font-size: 10px;
  }

  /* ===== JUEGO MÓVIL ===== */
  #game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #111;
  }

  #game-canvas {
    width: 100%;
    height: 100%;
  }

  /* ===== HUD MÓVIL ===== */
  .hud-top-left {
    top: 8px;
    left: 8px;
  }

  .hud-bars-improved {
    padding: 8px 10px;
    gap: 4px;
  }

  .resource-bar-v2 {
    min-width: 150px;
    gap: 6px;
  }

  .resource-bar-v2 .bar-icon {
    font-size: 14px;
    width: 18px;
  }

  .resource-bar-v2 .bar-bg {
    height: 12px;
  }

  .resource-bar-v2 .bar-value {
    font-size: 10px;
    min-width: 45px;
  }

  .hud-boosts {
    gap: 3px;
    margin-top: 4px;
  }

  .boost-btn {
    padding: 3px 6px;
    min-width: 38px;
  }

  .boost-btn .boost-icon {
    font-size: 14px;
  }

  .boost-btn .boost-label {
    font-size: 8px;
  }

  .boost-btn .boost-timer {
    font-size: 7px;
  }

  .hud-top-right {
    top: 8px;
    right: 8px;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  /* Barra de progreso en móvil - CENTRO IZQUIERDA */
  .hud-top-center {
    position: fixed;
    top: 50%;
    left: 8px;
    right: auto;
    transform: translateY(-50%);
  }

  .wave-bar {
    height: 120px !important;
  }

  .hud-bars {
    gap: 4px;
    background: rgba(0,0,0,0.6);
    padding: 8px 10px;
    border-radius: 10px;
  }

  .resource-bar {
    gap: 5px;
  }

  .bar-label {
    font-size: 14px;
    width: 20px;
  }

  .bar-container {
    width: 80px;
    height: 14px;
  }

  .bar-text {
    font-size: 9px;
  }

  .hud-stats-compact {
    display: none; /* Ocultar stats detallados en móvil */
  }

  /* Stats simplificados para móvil */
  .hud-mobile-stats {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 6px 12px;
    background: rgba(0,0,0,0.6);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
  }

  .hud-mobile-stats > span {
    display: flex;
    align-items: center;
    gap: 3px;
  }

  .hud-mobile-stats > span:nth-child(1) { color: #66bb6a; } /* Zona */
  .hud-mobile-stats > span:nth-child(2) { color: #ffd54f; } /* Oro */
  .hud-mobile-stats > span:nth-child(3) { color: #ef5350; } /* ATK */
  .hud-mobile-stats > span:nth-child(4) { color: #64b5f6; } /* DEF */

  .hud-auto-toggles {
    gap: 5px;
    flex-direction: row;
  }

  .auto-toggle, .shop-toggle {
    width: 36px;
    height: 36px;
    font-size: 16px;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
  }

  .skill-key {
    display: none;
  }

  .skill-level {
    font-size: 8px;
    bottom: 2px;
    right: 2px;
  }

  /* Tienda móvil */
  .shop-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  /* Header móvil */
  .shop-header {
    padding: 8px 12px;
    flex-shrink: 0;
    gap: 8px;
  }

  .shop-header h2 {
    font-size: 14px;
    flex: 1;
  }

  .shop-gold-display {
    font-size: 12px;
    padding: 4px 8px;
  }

  .popup-close-x {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  /* Tabs móvil - 7 iconos en una fila */
  .shop-tabs {
    padding: 4px;
    gap: 2px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
  }

  .shop-tab {
    padding: 8px;
    font-size: 0;
    border-radius: 6px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
  }

  /* Solo iconos en móvil */
  .shop-tab::before {
    font-size: 16px;
  }
  .shop-tab[data-tab="skills"]::before { content: "⬆️"; }
  .shop-tab[data-tab="talents"]::before { content: "🌟"; }
  .shop-tab[data-tab="weapons"]::before { content: "⚔️"; }
  .shop-tab[data-tab="armor"]::before { content: "🛡️"; }
  .shop-tab[data-tab="potions"]::before { content: "✨"; }
  .shop-tab[data-tab="achievements"]::before { content: "🏆"; }
  .shop-tab.premium-tab::before { content: "👑"; }

  .shop-content {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
  }

  /* Armas/Armadura/Elixires en 2 columnas */
  .shop-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  /* Card con flex: info a la izq, botones a la derecha */
  .shop-card {
    padding: 8px;
    min-height: auto;
    display: flex !important;
    flex-wrap: wrap !important;
    border-radius: 8px;
    position: relative;
  }

  /* Icono y nombre en la misma línea */
  .shop-card .item-icon {
    font-size: 14px !important;
    margin-right: 4px !important;
    order: 1;
  }

  .shop-card .item-name {
    font-size: 11px;
    font-weight: bold;
    order: 2;
    flex: 1;
  }

  /* Stats en nueva línea */
  .shop-card .item-stats {
    font-size: 9px;
    color: #aaa;
    line-height: 1.3;
    order: 4;
    width: 100%;
    margin-top: 4px;
  }

  /* Precio */
  .shop-card .item-price {
    font-size: 10px;
    order: 5;
    width: 100%;
    margin-top: 2px;
  }

  /* Botones a la derecha, posición absoluta */
  .shop-card .item-buttons {
    position: absolute !important;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    flex-direction: column !important;
    gap: 4px;
  }

  /* Dejar espacio para los botones */
  .shop-card .item-name,
  .shop-card .item-stats,
  .shop-card .item-price {
    padding-right: 40px;
  }

  /* Botones solo iconos en móvil */
  .shop-card .item-buttons button {
    padding: 5px;
    font-size: 0;
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .shop-card .item-buttons .buy-btn::before {
    content: "🛒";
    font-size: 13px;
  }

  .shop-card .item-buttons .buy-max-btn::before {
    content: "⬆️";
    font-size: 13px;
  }

  /* Skills en móvil - SIN CAMBIOS, mantener diseño original */

  /* Premium en móvil - lista */
  .premium-shop-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .premium-shop-item {
    padding: 8px 10px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .premium-shop-item .premium-icon {
    font-size: 28px;
  }

  .premium-shop-item .premium-name {
    font-size: 12px;
    flex: 1;
  }

  .premium-shop-item .premium-cta {
    margin: 0;
    padding: 4px 10px;
    font-size: 10px;
  }

  /* Talentos en móvil */
  .talents-header {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    font-size: 12px;
  }

  .talent-card {
    min-width: 60px;
    padding: 6px;
  }

  .talent-icon {
    font-size: 18px;
  }

  .talent-name {
    font-size: 9px;
  }

  /* Logros en móvil */
  .achievements-header {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .achievements-header h3 {
    font-size: 13px;
  }

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .achievement-card {
    padding: 6px;
    min-height: auto;
  }

  .achievement-icon {
    font-size: 22px;
  }

  .achievement-name {
    font-size: 10px;
  }

  .achievement-desc {
    font-size: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .achievement-reward {
    font-size: 9px;
  }

  .achievement-category h4 {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* Popups móvil */
  .popup-content {
    padding: 15px;
  }

  .popup-content h3 {
    font-size: 18px;
  }

  /* Pantallas de game over y level complete en móvil */
  #game-over-screen > *,
  #level-complete-screen > * {
    max-width: 350px;
  }

  .game-over-stats {
    color: #ffd54f;
    font-size: 14px;
    margin: 10px 0;
  }
}

/* ===== RESPONSIVE - MÓVILES MUY PEQUEÑOS ===== */
@media (max-width: 400px) {
  .bar-container {
    width: 60px;
  }

  .hud-stats-compact {
    flex-wrap: wrap;
    max-width: 120px;
  }

  .stat-item {
    font-size: 9px;
  }

  .skill-slot {
    width: 32px;
    height: 32px;
  }

  .skill-icon {
    font-size: 14px;
  }
}


/* ===== JOYSTICK VIRTUAL ===== */
.mobile-control {
  display: none;
}

#mobile-joystick {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 50;
}

.joystick-base {
  width: 120px;
  height: 120px;
  background: rgba(0,0,0,0.4);
  border: 3px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.joystick-stick {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.6);
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  transition: transform 0.05s;
  pointer-events: none;
}

/* ===== CONTROLES TÁCTILES ===== */
@media (hover: none) and (pointer: coarse) {
  /* Dispositivos táctiles - botones más grandes */
  button {
    min-height: 44px;
    min-width: 44px;
  }

  .auto-toggle, .shop-toggle {
    width: 36px;
    height: 36px;
  }

  .skill-slot {
    width: 48px;
    height: 48px;
    cursor: pointer;
  }

  .skill-slot:active {
    transform: scale(0.95);
    background: rgba(100, 200, 255, 0.3);
  }

  .shop-card {
    min-height: 100px;
  }

  .skill-upgrade-btn {
    min-height: 40px;
    padding: 10px 16px;
  }

  /* Mostrar joystick en móviles */
  .mobile-control {
    display: block;
  }

  #mobile-joystick {
    bottom: 30px;
    left: 20px;
  }

  .joystick-base {
    width: 100px;
    height: 100px;
  }

  .joystick-stick {
    width: 45px;
    height: 45px;
  }

  /* Mover skills a la derecha en móviles */
  .hud-bottom {
    left: auto;
    right: 20px;
    bottom: 30px;
    transform: none;
  }

  .hud-skills {
    flex-direction: column;
    gap: 6px;
    background: rgba(0,0,0,0.5);
    padding: 8px;
    border-radius: 10px;
  }

  .skill-slot {
    width: 46px;
    height: 46px;
  }

  .skill-icon {
    font-size: 18px;
  }
}

/* Ajustes específicos para landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  #game-container {
    height: 100vh;
    max-height: 100vh;
    width: auto;
    aspect-ratio: 4/3;
  }

  .joystick-base {
    width: 80px;
    height: 80px;
  }

  .joystick-stick {
    width: 40px;
    height: 40px;
  }

  #mobile-joystick {
    bottom: 10px;
    left: 10px;
  }

  .hud-bottom {
    bottom: 10px;
    right: 10px;
  }

  .skill-slot {
    width: 40px;
    height: 40px;
  }

  .hud-top-left {
    transform: scale(0.8);
    transform-origin: top left;
  }

  .hud-top-right {
    transform: scale(0.8);
    transform-origin: top right;
  }
}

/* ===== TUTORIAL ===== */
#tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  pointer-events: auto;
}

.tutorial-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.tutorial-highlight {
  position: fixed;
  border: 3px solid #ffd54f;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px #ffd54f;
  z-index: 2001;
  pointer-events: none;
  transition: all 0.3s ease;
}

.tutorial-popup {
  position: fixed;
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  border: 2px solid #ffd54f;
  border-radius: 12px;
  padding: 20px;
  max-width: 320px;
  z-index: 2002;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: popIn 0.3s ease;
}

.tutorial-step-indicator {
  position: absolute;
  top: -12px;
  right: 15px;
  background: #ffd54f;
  color: #1a1a2e;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.tutorial-popup h3 {
  margin: 0 0 10px 0;
  color: #ffd54f;
  font-size: 18px;
}

.tutorial-popup p {
  margin: 0 0 15px 0;
  color: #ddd;
  font-size: 14px;
  line-height: 1.5;
}

.tutorial-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.tutorial-buttons button {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.tutorial-buttons .btn-primary {
  background: linear-gradient(135deg, #ffd54f 0%, #ff9800 100%);
  color: #1a1a2e;
  font-weight: bold;
}

.tutorial-buttons .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #aaa;
  border: 1px solid #555;
}

.tutorial-buttons button:hover {
  transform: scale(1.05);
}

/* Tutorial responsive para móvil */
@media (max-width: 500px) {
  .tutorial-popup {
    max-width: calc(100vw - 40px);
    width: calc(100vw - 40px);
    left: 20px !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 15px;
  }
  
  .tutorial-popup h3 {
    font-size: 16px;
  }
  
  .tutorial-popup p {
    font-size: 13px;
  }
  
  .tutorial-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .tutorial-buttons button {
    width: 100%;
    padding: 12px;
  }
  
  .tutorial-highlight {
    display: none !important;
  }
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: fixed;
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  border: 1px solid #ffd54f;
  border-radius: 8px;
  padding: 8px 12px;
  max-width: 280px;
  z-index: 3000;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.15s ease;
}

.tooltip span {
  color: #eee;
  font-size: 12px;
  line-height: 1.4;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== ADVERTENCIA DE MUERTE ===== */
.game-warning {
  color: #ef5350;
  font-size: 12px;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(239, 83, 80, 0.15);
  border: 1px solid rgba(239, 83, 80, 0.3);
  border-radius: 6px;
  display: inline-block;
}

/* ===== TOGGLE DE TUTORIAL ===== */
.tutorial-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  color: #888;
  font-size: 13px;
  cursor: pointer;
}

.tutorial-toggle input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.tutorial-toggle:hover {
  color: #ffd54f;
}

/* ===== SKILL NIVEL MÁXIMO ===== */
.skill-upgrade-card.max-level {
  border-color: #66bb6a;
  background: linear-gradient(135deg, #1a3d1a 0%, #1a1a2e 100%);
}

.skill-maxed {
  color: #66bb6a;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  width: 100%;
  display: block;
  padding: 8px 0;
}

/* ===== SKILL EVOLUCIONADA ===== */
.skill-upgrade-card.evolved {
  border-color: #ffd700;
  background: linear-gradient(135deg, #3d3d1a 0%, #2a2a1e 100%);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.skill-upgrade-card.evolved .skill-upgrade-name {
  color: #ffd700;
}

.skill-upgrade-card.evolved .skill-upgrade-level {
  color: #ffeb3b;
}

.evolved-info {
  color: #ffd700 !important;
  font-weight: bold;
}

/* ===== BOTONES DE COMPRA EN TIENDA ===== */
.item-buttons {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  justify-content: center;
}

.buy-btn, .buy-max-btn {
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  max-width: 70px;
}

.buy-btn {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: white;
}

.buy-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
  transform: scale(1.05);
}

.buy-max-btn {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
}

.buy-max-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffb74d 0%, #ff9800 100%);
  transform: scale(1.05);
}

.buy-btn:disabled, .buy-max-btn:disabled {
  background: #555;
  color: #888;
  cursor: not-allowed;
  transform: none;
}

/* T68: Estilos para Talentos */
.talents-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  margin-bottom: 15px;
}

.talent-points, .talent-spent {
  font-size: 14px;
  font-weight: bold;
}

.talent-points { color: #ffd700; }
.talent-spent { color: #aaa; }

.talents-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
}

.talents-grid::-webkit-scrollbar {
  width: 6px;
}

.talents-grid::-webkit-scrollbar-track {
  background: #1a1a2e;
  border-radius: 3px;
}

.talents-grid::-webkit-scrollbar-thumb {
  background: #4a4a6a;
  border-radius: 3px;
}

.talent-tier {
  background: rgba(30,30,50,0.5);
  border-radius: 10px;
  padding: 10px;
}

.talent-tier.locked {
  opacity: 0.5;
}

.talent-tier h4 {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
}

.talent-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.talent-card {
  background: linear-gradient(135deg, #2a2a4a 0%, #1a1a2e 100%);
  border: 2px solid #3a3a5a;
  border-radius: 10px;
  padding: 10px;
  min-width: 90px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.talent-card:hover {
  transform: translateY(-2px);
  border-color: #5a5a8a;
}

.talent-card.can-buy {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.talent-card.can-buy:hover {
  box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

.talent-card.maxed {
  border-color: #4caf50;
  background: linear-gradient(135deg, #1a3a1a 0%, #0d1a0d 100%);
}

.talent-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.talent-name {
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 3px;
}

.talent-desc {
  font-size: 9px;
  color: #aaa;
  margin-bottom: 5px;
}

.talent-progress {
  font-size: 10px;
  color: #81d4fa;
  font-weight: bold;
}

.talent-cost {
  font-size: 10px;
  color: #ffd700;
  margin-top: 3px;
}

.talent-card.maxed .talent-cost {
  color: #4caf50;
}

/* T67: Estilos para Prestigio */
.btn-prestige {
  background: linear-gradient(135deg, #ffd700 0%, #ff9800 100%);
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-prestige:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.btn-prestige:disabled {
  background: #555;
  color: #888;
  cursor: not-allowed;
}

.prestige-info span:last-child {
  color: #ffd700;
  font-weight: bold;
}

/* T88: Estilos para Boosts Temporales */
.btn-boost {
  background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-boost:hover:not(:disabled) {
  background: linear-gradient(135deg, #ba68c8 0%, #9575cd 100%);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(156, 39, 176, 0.5);
}

.btn-boost:disabled {
  background: #555;
  color: #888;
  cursor: not-allowed;
}

.btn-boost.active {
  background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
  animation: boost-pulse 1.5s infinite;
}

.btn-boost.cooldown {
  background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
}

@keyframes boost-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
  50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
}

.boost-timer span:last-child {
  color: #4caf50;
  font-weight: bold;
  font-family: monospace;
}

.boost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
