/* ==========================================================================
   NORDETH - SISTEMA DE DISEÑO & ESTILOS VISUALES
   Estética: Fantasía Oscura Épica, Glassmorphism, Neón Místico y Acabado Premium
   Facciones: Humano (Zafiro), Terraki (Esmeralda/Tierra), Maleki (Carmesí/Sombra)
   Recurso Sagrado: Kräm
   ========================================================================== */

:root {
  /* Paleta de Colores Principal */
  --bg-dark: #0a0e17;
  --bg-card: rgba(16, 23, 38, 0.85);
  --bg-glass: rgba(18, 26, 44, 0.72);
  --bg-glass-hover: rgba(28, 41, 68, 0.85);
  
  /* Acentos de Color */
  --gold-primary: #d4af37;
  --gold-light: #f5d77f;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --cyan-arcane: #00e5ff;
  --cyan-glow: rgba(0, 229, 255, 0.4);
  --kram-glow: rgba(168, 85, 247, 0.4);
  --kram-purple: #c084fc;

  /* Colores de Facciones */
  --color-humano: #3b82f6;
  --color-terraki: #10b981;
  --color-maleki: #ef4444;
  --color-neutral: #64748b;

  /* Bordes & Sombras */
  --border-gold: 1px solid rgba(212, 175, 55, 0.3);
  --border-glass: 1px solid rgba(255, 255, 255, 0.12);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);

  /* Tipografías */
  --font-epic: 'Cinzel', serif;
  --font-ui: 'Outfit', sans-serif;
}

/* Reset Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-dark);
  color: #e2e8f0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. BARRA SUPERIOR (HEADER & RECURSOS)
   ========================================================================== */
.top-nav {
  height: 64px;
  flex-shrink: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-gem {
  font-size: 24px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, rgba(10, 14, 23, 0.8) 100%);
  border: 1px solid var(--gold-light);
  border-radius: 10px;
  box-shadow: 0 0 12px var(--gold-glow);
}

.game-title {
  font-family: var(--font-epic);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2.5px;
  background: linear-gradient(135deg, #fff 0%, var(--gold-light) 60%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-subtitle {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Indicadores de Turno y Recursos */
.turn-status-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.faction-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.faction-pill.player-humano {
  background: rgba(30, 58, 138, 0.85);
  border: 1px solid rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.35);
}

.faction-pill.player-terraki {
  background: rgba(6, 78, 59, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.faction-pill.player-maleki {
  background: rgba(127, 29, 29, 0.85);
  border: 1px solid rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.35);
}

.faction-pill.player-catenista {
  background: rgba(113, 63, 18, 0.85);
  border: 1px solid rgba(250, 204, 21, 0.7);
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.35);
}

.resource-badge.res-resonance {
  border-color: rgba(234, 179, 8, 0.6);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(113, 63, 18, 0.45) 100%);
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.3);
  animation: resonancePulse 3s infinite ease-in-out;
}

@keyframes resonancePulse {
  0%, 100% { box-shadow: 0 0 12px rgba(234, 179, 8, 0.25); border-color: rgba(234, 179, 8, 0.5); }
  50% { box-shadow: 0 0 24px rgba(234, 179, 8, 0.6); border-color: rgba(250, 204, 21, 0.9); }
}

.faction-pill:hover {
  transform: scale(1.03);
}

.faction-pill .faction-icon {
  font-size: 18px;
}

.faction-pill .faction-info {
  display: flex;
  flex-direction: column;
}

.faction-pill .faction-label {
  font-size: 9px;
  text-transform: uppercase;
  color: #cbd5e1;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.faction-pill .faction-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.resource-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: var(--border-glass);
  padding: 6px 12px;
  border-radius: 8px;
}

.resource-badge.res-kram {
  border-color: rgba(192, 132, 252, 0.4);
  box-shadow: 0 0 12px var(--kram-glow);
}

.resource-badge .res-icon {
  font-size: 16px;
}

.resource-badge .res-val {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.resource-badge.res-kram .res-val {
  color: #e9d5ff;
}

.resource-badge .res-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
}

/* Botón de Fin de Turno */
.btn-fantasy {
  font-family: var(--font-epic);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(96, 165, 250, 0.6);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-fantasy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

/* Herramientas Rápidas */
.map-controls-quick {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  background: rgba(30, 41, 59, 0.6);
  border: var(--border-glass);
  color: #cbd5e1;
  padding: 7px 12px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.tool-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-light);
  color: var(--gold-light);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* ==========================================================================
   2. VIEWPORT & CANVAS DEL JUEGO
   ========================================================================== */
.game-viewport {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#gameCanvas:active {
  cursor: grabbing;
}

/* Controles de Zoom Flotantes */
.hud-zoom-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 30;
}

.zoom-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: var(--border-glass);
  color: #f8fafc;
  font-size: 20px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--cyan-arcane);
  color: var(--cyan-arcane);
}

.zoom-level {
  background: var(--bg-glass);
  border: var(--border-glass);
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  padding: 4px;
  border-radius: 6px;
}

/* Mensajes Toast Flotantes */
.game-toast {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--gold-light);
  box-shadow: 0 0 25px var(--gold-glow);
  padding: 10px 24px;
  border-radius: 30px;
  font-family: var(--font-epic);
  font-size: 14px;
  font-weight: 700;
  color: #fef08a;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.game-toast.hidden {
  opacity: 0;
  transform: translate(-50%, -15px);
}

/* ==========================================================================
   3. PANEL LATERAL: INSPECTOR DE TERRITORIO
   ========================================================================== */
.hex-inspector {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 335px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border-gold);
  border-radius: 16px;
  box-shadow: var(--shadow-lg), 0 0 25px rgba(0, 0, 0, 0.5);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  overflow: hidden;
}

.hex-inspector.hidden {
  transform: translateX(360px);
  opacity: 0;
  pointer-events: none;
}

.inspector-header {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inspector-tag {
  font-family: var(--font-epic);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #fff;
}

.inspector-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hex-title {
  font-family: var(--font-epic);
  font-size: 17px;
  color: #f8fafc;
  font-weight: 700;
}

.terrain-pill {
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.7);
  padding: 5px 10px;
  border-radius: 8px;
  border: var(--border-glass);
}

.hex-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-label {
  font-size: 9.5px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.stat-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.stat-val.highlight {
  color: var(--gold-light);
}

/* Modificador de Tropas */
.troop-editor {
  display: flex;
  align-items: center;
  gap: 8px;
}

.troop-btn {
  width: 22px;
  height: 22px;
  background: rgba(51, 65, 85, 0.8);
  border: var(--border-glass);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.troop-btn:hover {
  background: #2563eb;
}

/* Grupo de Asignación Rápida de Facción */
.faction-assign-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(15, 23, 42, 0.4);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.faction-btn-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.btn-assign-faction {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-assign-faction.humano {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}
.btn-assign-faction.humano:hover {
  background: rgba(59, 130, 246, 0.4);
  color: #fff;
}

.btn-assign-faction.terraki {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}
.btn-assign-faction.terraki:hover {
  background: rgba(16, 185, 129, 0.4);
  color: #fff;
}

.btn-assign-faction.maleki {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-assign-faction.maleki:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

.btn-assign-faction.catenista {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.4);
}
.btn-assign-faction.catenista:hover {
  background: rgba(234, 179, 8, 0.5);
  color: #fff;
}

/* Botones de Acción del Inspector */
.inspector-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
}

.action-btn {
  font-family: var(--font-epic);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.action-btn.claim {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.action-btn.claim:hover {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  transform: translateY(-1px);
}

.action-btn.attack {
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.35);
}

.action-btn.attack:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  transform: translateY(-1px);
}

.action-btn.move {
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
  border: var(--border-glass);
}

.action-btn.move:hover {
  background: rgba(51, 65, 85, 1);
  color: #fff;
}

.inspector-hint {
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.25);
  padding: 7px 9px;
  border-radius: 6px;
  border-left: 2px solid var(--cyan-arcane);
}

/* ==========================================================================
   4. CALIBRADOR DE GRILLA
   ========================================================================== */
.calibration-panel {
  position: absolute;
  bottom: 190px;
  left: 20px;
  width: 270px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px;
  z-index: 35;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calibration-panel.collapsed .calib-controls {
  display: none;
}

.calib-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan-arcane);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calib-toggle-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 10px;
  cursor: pointer;
  text-decoration: underline;
}

.calib-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calib-controls label {
  font-size: 11px;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calib-controls input[type="range"] {
  width: 100%;
  accent-color: var(--cyan-arcane);
  cursor: pointer;
}

.calib-buttons {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-subtle {
  flex: 1;
  font-size: 10px;
  padding: 6px 4px;
  background: rgba(30, 41, 59, 0.8);
  border: var(--border-glass);
  color: #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
}

.btn-subtle.success {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

/* ==========================================================================
   5. BANDEJA DE CARTAS (ESTILO MAGIC)
   ========================================================================== */
.cards-dock {
  height: 185px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(10, 14, 23, 0.7) 0%, rgba(6, 9, 15, 0.96) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: var(--border-gold);
  z-index: 45;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
  padding: 8px 24px 12px;
}

.dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.dock-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-epic);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-light);
}

.deck-count {
  font-size: 11px;
  color: #64748b;
}

.btn-draw-card {
  background: rgba(30, 41, 59, 0.8);
  border: var(--border-glass);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-draw-card:hover {
  background: rgba(51, 65, 85, 1);
  color: #fff;
  border-color: var(--cyan-arcane);
}

.cost-kram {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

/* Carrusel de Cartas Magic */
.cards-carousel {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 10px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.cards-carousel::-webkit-scrollbar {
  height: 4px;
}

.cards-carousel::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

/* Tarjeta Magic Individual */
.magic-card {
  flex: 0 0 162px;
  height: 124px;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease, border-color 0.25s ease;
}

.magic-card.humano-card {
  border-color: rgba(96, 165, 250, 0.5);
}
.magic-card.terraki-card {
  border-color: rgba(52, 211, 153, 0.5);
}
.magic-card.maleki-card {
  border-color: rgba(248, 113, 113, 0.5);
}
.magic-card.catenista-card {
  border-color: rgba(250, 204, 21, 0.6);
  background: radial-gradient(circle at top, #292524 0%, #1c1917 100%);
}

.magic-card:hover {
  transform: translateY(-8px) scale(1.04);
  border-color: var(--gold-light);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 20px var(--gold-glow);
}

.magic-card.selected-card {
  border-color: var(--cyan-arcane);
  box-shadow: 0 0 25px var(--cyan-glow);
  transform: translateY(-10px) scale(1.06);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
}

.card-name {
  font-family: var(--font-epic);
  font-size: 10.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
}

.card-cost {
  font-size: 9.5px;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #f5d0fe;
  padding: 2px 6px;
  border-radius: 8px;
}

.card-illustration {
  font-size: 26px;
  text-align: center;
  margin: 4px 0 2px;
}

.card-type {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
}

.card-desc {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.2;
  text-align: center;
  margin-top: 2px;
}

/* ==========================================================================
   6. MODAL DE COMBATE (BATALLA NAVAL / ASEDIO)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

.combat-card, .help-card {
  width: 90%;
  max-width: 720px;
  background: var(--bg-card);
  border: 1px solid var(--gold-light);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px var(--gold-glow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  0% { transform: scale(0.9) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.combat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.combat-tag {
  font-size: 10px;
  text-transform: uppercase;
  color: #f87171;
  letter-spacing: 1px;
  font-weight: 700;
}

.combat-title {
  font-family: var(--font-epic);
  font-size: 20px;
  color: #fff;
  font-weight: 700;
}

.combat-briefing p {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}

.combat-arena {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ==========================================================================
   6. ARENA TÁCTICA 6x5 DE EDRENOR (MICRO-ESCALA • GDD V2.0)
   ========================================================================== */
.tactical-combat-card {
  width: 95%;
  max-width: 1040px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(8, 12, 20, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.7);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(212, 175, 55, 0.25);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: modalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tactical-header-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tactical-pill {
  font-family: var(--font-epic);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #f8fafc;
}

.tactical-pill.kram-pill {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(96, 165, 250, 0.7);
  color: #93c5fd;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Sub-barra: Tensión & Control de Tierra de Nadie */
.tactical-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 16px;
}

.tension-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.tension-badge.neutral {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

.tension-badge.short-circuit {
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  animation: flashAlert 1.2s infinite ease-in-out;
}

.tension-badge.harmony {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

@keyframes flashAlert {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.98); }
}

.nomans-status {
  font-size: 12px;
  color: #cbd5e1;
}

/* Layout de Combate */
.tactical-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: stretch;
}

/* Tablero 6x5 */
.tactical-board-wrapper {
  background: rgba(10, 14, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.8);
}

.tactical-grid-zones {
  display: grid;
  grid-template-columns: 2fr 2fr 2fr;
  gap: 4px;
  text-align: center;
}

.zone-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 6px;
  border-radius: 6px;
}

.zone-tag.def {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.zone-tag.mid {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.zone-tag.atk {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tactical-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tactical-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.tactical-cell {
  aspect-ratio: 1 / 1;
  min-height: 64px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
}

.tactical-cell.zone-defender {
  background: radial-gradient(circle, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.tactical-cell.zone-nomansland {
  background: radial-gradient(circle, rgba(180, 83, 9, 0.35) 0%, rgba(20, 15, 5, 0.7) 100%);
  border: 1px dashed rgba(245, 158, 11, 0.45);
}

.tactical-cell.zone-attacker {
  background: radial-gradient(circle, rgba(6, 78, 59, 0.4) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tactical-cell:hover {
  filter: brightness(1.25);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.tactical-cell.has-rock-wall {
  background: rgba(71, 85, 105, 0.7) !important;
  border: 2px solid #94a3b8 !important;
}

.cell-wall-icon {
  font-size: 26px;
}

/* Fichas de Unidad */
.tactical-unit {
  width: 90%;
  height: 90%;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.tactical-unit.attacker {
  border: 2px solid #60a5fa;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.tactical-unit.defender {
  border: 2px solid #f87171;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.9) 0%, rgba(20, 10, 10, 0.95) 100%);
}

.tactical-unit.selected {
  transform: scale(1.08);
  border-color: #38bdf8 !important;
  box-shadow: 0 0 20px #0284c7 !important;
  animation: unitPulse 1.2s infinite alternate ease-in-out;
}

@keyframes unitPulse {
  0% { box-shadow: 0 0 10px #0284c7; }
  100% { box-shadow: 0 0 22px #38bdf8; }
}

.unit-icon {
  font-size: 20px;
  line-height: 1;
}

.unit-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.unit-name {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.unit-hp {
  font-size: 8.5px;
  color: #cbd5e1;
  font-weight: 600;
}

.unit-fog {
  font-size: 22px;
  color: #94a3b8;
}

.unit-stealth-label {
  font-size: 9px;
  color: #64748b;
  text-transform: uppercase;
}

/* Panel Lateral */
.tactical-side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tactical-dice-box {
  background: rgba(15, 23, 42, 0.7);
  border: var(--border-glass);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dice-label {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
}

.tactical-dice-display {
  font-family: var(--font-epic);
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-light);
  background: rgba(10, 14, 23, 0.9);
  border: 1px solid var(--gold-light);
  border-radius: 8px;
  padding: 4px 12px;
  min-width: 65px;
  text-align: center;
}

.tactical-dice-display.rolling {
  animation: diceRollAnim 0.6s infinite ease;
  color: #38bdf8;
  border-color: #38bdf8;
}

@keyframes diceRollAnim {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Magia del Kräm (Las 7 Cuerdas) */
.tactical-spells-box {
  background: rgba(15, 23, 42, 0.7);
  border: var(--border-glass);
  border-radius: 10px;
  padding: 10px;
}

.spells-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.spells-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.spell-btn {
  font-size: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.spell-btn:hover {
  filter: brightness(1.3);
  transform: translateY(-1px);
}

.spell-btn .note {
  font-weight: 900;
  font-size: 11px;
}

.spell-btn .cost {
  font-size: 9px;
  color: #93c5fd;
}

.spell-btn.do { border-color: #a87d4f; }
.spell-btn.re { border-color: #38bdf8; }
.spell-btn.mi { border-color: #34d399; }
.spell-btn.fa { border-color: #60a5fa; }
.spell-btn.sol { border-color: #f87171; }
.spell-btn.la { border-color: #f1f5f9; }
.spell-btn.si { border-color: #c084fc; }

/* Log de Combate */
.tactical-log {
  background: rgba(10, 14, 23, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tactical-log-entry {
  font-size: 11px;
  line-height: 1.3;
}

.tactical-log-entry.system { color: #93c5fd; font-weight: 600; }
.tactical-log-entry.info { color: #cbd5e1; }
.tactical-log-entry.move { color: #6ee7b7; }
.tactical-log-entry.hit { color: #f87171; font-weight: 700; }
.tactical-log-entry.miss { color: #94a3b8; }
.tactical-log-entry.kill { color: #ef4444; font-weight: 900; }
.tactical-log-entry.magic { color: #c084fc; font-weight: 600; }
.tactical-log-entry.warn { color: #fbbf24; }

.tactical-controls {
  margin-top: 4px;
}

.btn-tactical-round {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Resumen de Batalla */
.battle-summary {
  background: rgba(10, 14, 23, 0.95);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.battle-summary.victory {
  border: 2px solid var(--gold-light);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.battle-summary.victory h3 {
  font-family: var(--font-epic);
  color: var(--gold-light);
  font-size: 18px;
}

.battle-summary.defeat {
  border: 2px solid #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

.battle-summary.defeat h3 {
  font-family: var(--font-epic);
  color: #f87171;
  font-size: 18px;
}

/* Modal de Ayuda */
.help-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #cbd5e1;
  line-height: 1.5;
}

.help-content h3 {
  font-family: var(--font-epic);
  font-size: 15px;
  color: var(--gold-light);
}

/* ==========================================================================
   SISTEMA DE USUARIOS, RANGOS LOL/VALORANT, TIENDA & MONETIZACIÓN
   ========================================================================== */

/* Barra de Usuario en el Header */
.user-profile-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn-auth-trigger {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(245, 158, 11, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fef3c7;
  padding: 7px 14px;
  border-radius: 20px;
  font-family: var(--font-epic);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.btn-auth-trigger:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.45) 0%, rgba(245, 158, 11, 0.45) 100%);
  border-color: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
  transform: translateY(-1px);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 12px 5px 6px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--gold-light);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.3);
}

.user-avatar {
  font-size: 20px;
  background: rgba(255, 255, 255, 0.1);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-family: var(--font-epic);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge-vip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.user-rank {
  font-size: 10.5px;
  font-weight: 600;
}

.user-currencies {
  display: flex;
  align-items: center;
  gap: 6px;
}

.curr-badge {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 9px;
  border-radius: 12px;
  font-size: 11.5px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-subnav {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-modern);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-subnav:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-subnav.is-vip {
  border-color: #f59e0b;
  color: #ffd700;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

/* Modales Base */
.modal-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96) 0%, rgba(10, 15, 29, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px rgba(14, 165, 233, 0.15);
  backdrop-filter: blur(16px);
  color: #fff;
  position: relative;
  max-width: 900px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.modal-header h2 {
  font-family: var(--font-epic);
  font-size: 20px;
  color: var(--gold-light);
  margin: 0;
}

.modal-desc {
  color: #94a3b8;
  font-size: 13px;
  margin-top: -10px;
  margin-bottom: 18px;
}

/* Tabs de Autenticación y Tienda */
.auth-tabs, .shop-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-epic);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.form-group input, .form-select {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-modern);
  font-size: 13.5px;
  transition: border-color 0.2s;
}

.form-group input:focus, .form-select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.btn-auth-submit {
  margin-top: 10px;
  padding: 12px;
  font-size: 14px;
}

.auth-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 10px;
}

/* Modal de Perfil & Rangos LoL */
.profile-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-user-summary {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar-big {
  font-size: 54px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.profile-name {
  font-family: var(--font-epic);
  font-size: 18px;
  margin: 0 0 4px 0;
  color: #fff;
}

.profile-title-tag {
  font-size: 11px;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.profile-xp-box {
  width: 100%;
}

.xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 5px;
}

.xp-bar-bg {
  background: rgba(255, 255, 255, 0.1);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.xp-bar-fill {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  height: 100%;
  transition: width 0.4s ease;
}

.profile-rank-badge-card {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rank-emblem-large {
  font-size: 48px;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.rank-tier-name {
  font-family: var(--font-epic);
  font-size: 24px;
  letter-spacing: 1px;
  margin: 4px 0;
}

.rank-lp-counter {
  font-size: 14px;
  font-weight: 700;
  color: #cbd5e1;
}

.lp-bar-container {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.1);
  height: 10px;
  border-radius: 5px;
  margin: 14px 0 18px 0;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lp-bar-fill {
  height: 100%;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px currentColor;
}

.rank-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 500px;
}

.r-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.r-stat.full {
  grid-column: span 4;
}

.stat-lbl {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
}

.stat-num {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.color-win { color: #34d399 !important; }
.color-loss { color: #f87171 !important; }

.rank-testing-panel {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.test-label {
  font-size: 11px;
  color: #cbd5e1;
}

.test-btn-group {
  display: flex;
  gap: 10px;
}

.btn-test-win {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #10b981;
  color: #6ee7b7;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-test-win:hover {
  background: #10b981;
  color: #000;
}

.btn-test-loss {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-test-loss:hover {
  background: #ef4444;
  color: #fff;
}

/* Historial de Partidas */
.profile-history-section h3 {
  font-family: var(--font-epic);
  font-size: 16px;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
}

.match-item.victory {
  border-left: 4px solid #10b981;
}

.match-item.defeat {
  border-left: 4px solid #ef4444;
}

.match-result-badge {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.match-item.victory .match-result-badge { color: #34d399; }
.match-item.defeat .match-result-badge { color: #f87171; }

.match-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.match-opponent {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.match-meta {
  font-size: 11px;
  color: #94a3b8;
}

.match-rewards {
  display: flex;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
}

.match-lp.plus { color: #34d399; }
.match-lp.minus { color: #f87171; }
.match-xp { color: #38bdf8; }
.match-gold { color: #f59e0b; }

/* Tabla de Leaderboard */
.table-container {
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.leaderboard-table th {
  background: rgba(0, 0, 0, 0.4);
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.current-player-row {
  background: rgba(212, 175, 55, 0.15);
  border-left: 4px solid var(--gold-light);
}

.col-rank {
  font-weight: 900;
  color: var(--gold-light);
}

.col-player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-avatar {
  font-size: 20px;
}

.p-data {
  display: flex;
  flex-direction: column;
}

.p-name {
  font-weight: 700;
  color: #fff;
}

.p-title {
  font-size: 11px;
  color: #94a3b8;
}

/* Tienda & Catálogo */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.shop-item-card {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.25s ease;
}

.shop-item-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-light);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.2);
}

.item-badge-rarity {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.rarity-legendario .item-badge-rarity { background: rgba(245, 158, 11, 0.3); color: #fef08a; border: 1px solid #f59e0b; }
.rarity-epico .item-badge-rarity { background: rgba(168, 85, 247, 0.3); color: #e9d5ff; border: 1px solid #a855f7; }
.rarity-mitico .item-badge-rarity { background: rgba(239, 68, 68, 0.3); color: #fecaca; border: 1px solid #ef4444; }

.item-icon-huge {
  font-size: 42px;
  margin: 14px 0 10px 0;
}

.item-name {
  font-family: var(--font-epic);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.item-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 12px;
  flex-grow: 1;
}

.item-nft-tag {
  font-size: 9.5px;
  font-family: monospace;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 12px;
}

.item-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-prices {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  font-size: 12.5px;
}

.price-gold { color: #f59e0b; }
.price-kram { color: #c084fc; }

.btn-buy-item {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: #fff;
  padding: 8px;
  border-radius: 8px;
  font-family: var(--font-epic);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-buy-item:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

/* Inventario */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  max-height: 50vh;
  overflow-y: auto;
}

.inventory-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.inventory-item-card.is-equipped {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.inv-icon {
  font-size: 28px;
}

.inv-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex-grow: 1;
}

.inv-info strong {
  font-size: 13px;
  color: #fff;
}

.inv-info span {
  font-size: 10.5px;
  color: #94a3b8;
}

.btn-equip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.btn-equip.active {
  background: #10b981;
  color: #000;
  border-color: #10b981;
}

/* Planes de Suscripción / VIP */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.plan-card {
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  text-align: left;
  position: relative;
  transition: all 0.25s ease;
}

.plan-card.featured {
  border-color: rgba(245, 158, 11, 0.6);
  background: linear-gradient(145deg, rgba(30, 20, 10, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

.plan-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #3b82f6;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.plan-badge.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
}

.plan-title {
  font-family: var(--font-epic);
  font-size: 18px;
  color: #fff;
  margin: 0 0 10px 0;
}

.plan-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.plan-price .interval {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 400;
}

.plan-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
  color: #cbd5e1;
  flex-grow: 1;
}

.btn-plan {
  width: 100%;
  padding: 12px;
  font-size: 13px;
}

.btn-plan.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   14. DADO 1D6 Y MODO MARCHA DE TROPAS (GDD v2.0)
   ========================================================================== */
.tool-btn.highlight {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border-color: var(--gold-light);
  color: var(--gold-light);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.tool-btn.highlight:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.6);
}

/* Banner flotante de Modo Marcha */
.movement-hud {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 22px;
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid var(--gold-light);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), 0 0 25px var(--gold-glow);
  animation: hudSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
}

@keyframes hudSlideDown {
  from { transform: translate(-50%, -24px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.movement-hud.hidden {
  display: none !important;
}

.movement-hud-dice {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid var(--gold-light);
  border-radius: 12px;
  font-size: 26px;
  color: var(--gold-light);
  box-shadow: inset 0 0 10px rgba(245, 215, 127, 0.25);
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 215, 127, 0.3); }
  50% { box-shadow: 0 0 22px rgba(245, 215, 127, 0.7); }
}

.movement-hud-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.movement-hud-title {
  font-family: var(--font-epic);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.movement-hud-desc {
  font-size: 11.5px;
  color: #94a3b8;
}

.movement-hud-desc strong {
  color: #f1f5f9;
}

.movement-hud-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 16px;
}

.troop-move-label {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
}

.troop-move-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.troop-step-btn {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.troop-step-btn:hover {
  background: var(--gold-light);
  color: #000;
}

.move-troops-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  min-width: 18px;
  text-align: center;
}

.btn-cancel-move {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-move:hover {
  background: #ef4444;
  color: #fff;
}

/* Modal 1D6 3D */
.dice-modal-card {
  width: 90%;
  max-width: 440px;
  background: var(--bg-card);
  border: 2px solid var(--gold-light);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px var(--gold-glow);
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  animation: modalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dice-modal-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dice-modal-tag {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--gold-light);
  letter-spacing: 1px;
  font-weight: 700;
}

.dice-modal-title {
  font-family: var(--font-epic);
  font-size: 22px;
  color: #fff;
  margin: 0;
}

.dice-modal-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

/* Escenario 3D del dado */
.dice-3d-stage {
  perspective: 600px;
  width: 130px;
  height: 130px;
  margin: 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dice-cube-3d {
  width: 76px;
  height: 76px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(30deg);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dice-cube-3d.rolling {
  animation: roll3DAnimation 0.65s linear infinite;
}

@keyframes roll3DAnimation {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  50% { transform: rotateX(360deg) rotateY(180deg) rotateZ(180deg); }
  100% { transform: rotateX(720deg) rotateY(360deg) rotateZ(360deg); }
}

.dice-face-3d {
  position: absolute;
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  font-size: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.15), 0 6px 14px rgba(0,0,0,0.45);
  user-select: none;
}

.dice-face-3d.face-front  { transform: rotateY(0deg) translateZ(38px); }
.dice-face-3d.face-back   { transform: rotateY(180deg) translateZ(38px); color: #dc2626; }
.dice-face-3d.face-right  { transform: rotateY(90deg) translateZ(38px); }
.dice-face-3d.face-left   { transform: rotateY(-90deg) translateZ(38px); }
.dice-face-3d.face-top    { transform: rotateX(90deg) translateZ(38px); }
.dice-face-3d.face-bottom { transform: rotateX(-90deg) translateZ(38px); color: #dc2626; }

.dice-result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 52px;
}

.dice-roll-status {
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
}

.dice-roll-val {
  font-size: 40px;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 20px var(--gold-glow);
  line-height: 1;
}

.dice-roll-details {
  font-size: 13px;
  color: #e2e8f0;
}

.dice-roll-details strong {
  color: var(--gold-light);
  font-size: 16px;
}

.dice-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.btn-proceed-march {
  flex: 1;
  padding: 12px;
  font-size: 13px;
}

/* ==========================================================================
   14. CONTROLES DE LA BANDEJA DE CARTAS RESPONSIVA
   ========================================================================== */
.dock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-toggle-dock {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
}

.btn-toggle-dock:hover {
  background: rgba(212, 175, 55, 0.25);
  box-shadow: 0 0 10px var(--gold-glow);
  transform: scale(1.08);
}

/* ==========================================================================
   15. SISTEMA DE DISEÑO RESPONSIVO (MÓVILES, TABLETS & PANTALLAS PEQUEÑAS)
   ========================================================================== */

/* Laptops y Pantallas Medianas (<= 1280px) */
@media (max-width: 1280px) {
  .top-nav {
    padding: 0 14px;
    gap: 10px;
  }
  .brand-text .game-subtitle {
    display: none;
  }
  .turn-status-bar {
    gap: 8px;
  }
  .resource-badge {
    padding: 4px 8px;
    font-size: 11px;
  }
  .resource-badge .res-label {
    display: none;
  }
  .map-controls-quick {
    gap: 6px;
  }
  .tool-btn {
    padding: 6px 10px;
    font-size: 11.5px;
  }
  .hex-inspector {
    width: 310px;
  }
}

/* Tablets en Orientación Horizontal y Vertical (<= 1024px) */
@media (max-width: 1024px) {
  .top-nav {
    height: auto;
    min-height: 58px;
    padding: 6px 14px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
  }
  .brand {
    order: 1;
  }
  .user-profile-nav {
    order: 2;
  }
  .turn-status-bar {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .map-controls-quick {
    order: 4;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .hex-inspector {
    width: 295px;
    max-height: calc(100vh - 210px);
    overflow-y: auto;
  }
  .cards-dock {
    height: auto;
    max-height: 165px;
  }
}

/* Smartphones y Tablets Pequeñas (<= 768px) */
@media (max-width: 768px) {
  .top-nav {
    height: auto !important;
    min-height: 52px !important;
    padding: 6px 10px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .brand {
    order: 1 !important;
    gap: 8px !important;
  }
  .brand-text .game-subtitle {
    display: none !important;
  }
  .user-profile-nav {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .turn-status-bar {
    order: 3 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px 0 2px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .turn-status-bar::-webkit-scrollbar {
    display: none;
  }
  .map-controls-quick {
    order: 4 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    padding-top: 4px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
  .map-controls-quick .tool-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 6px 4px !important;
  }

  .logo-gem {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 8px;
  }
  .game-title {
    font-size: 15px;
    letter-spacing: 1.5px;
  }
  .faction-pill {
    padding: 4px 10px;
    flex-shrink: 0;
  }
  .faction-label {
    display: none;
  }
  .faction-name {
    font-size: 11.5px;
  }
  .resource-badge {
    padding: 3px 7px;
    font-size: 10.5px;
    flex-shrink: 0;
  }
  .resource-badge .res-label {
    display: none;
  }
  .btn-end-turn {
    padding: 5px 10px;
    font-size: 11px;
    flex-shrink: 0;
  }
  
  /* En pantallas móviles, los botones del mapa se compactan a íconos para ahorrar espacio */
  .tool-btn {
    padding: 6px 8px;
    font-size: 12px;
  }
  .tool-btn span:not(:first-child) {
    display: none;
  }
  .btn-subnav span:not(:first-child) {
    display: none;
  }
  .btn-auth-trigger {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  /* El Inspector de hexágono se convierte en Bottom Sheet elegante deslizante */
  .hex-inspector {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    max-height: 70vh !important;
    border-radius: 20px 20px 0 0 !important;
    border: 1.5px solid var(--gold-light) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateY(0) !important;
    z-index: 200 !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.95), 0 0 30px var(--gold-glow) !important;
  }
  .hex-inspector.hidden {
    transform: translateY(105%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Bandeja de Cartas Colapsible en Móvil */
  .cards-dock {
    height: auto;
    min-height: 44px;
    max-height: 168px;
    padding: 6px 12px 8px;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
  }
  .cards-dock.collapsed {
    max-height: 42px;
    overflow: hidden;
  }
  .cards-dock.collapsed .cards-carousel {
    display: none;
  }
  .dock-title span:nth-child(2) {
    font-size: 11px;
  }
  .deck-count {
    font-size: 10px;
  }
  .btn-draw-card {
    padding: 4px 8px;
    font-size: 11px;
  }
  .card-item {
    min-width: 120px;
    height: 105px;
    padding: 8px 10px;
  }
  .card-name {
    font-size: 11px;
  }
  .card-desc {
    display: none;
  }

  /* HUD de Movimiento 1D6 */
  .movement-hud {
    top: 8px;
    width: 94%;
    padding: 8px 12px;
    flex-direction: column;
    gap: 8px;
  }
  .movement-hud-controls {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 6px;
    width: 100%;
    justify-content: space-between;
  }

  /* Modales Emergentes en Móvil */
  .modal-card, .combat-card, .help-card, .dice-modal-card, .profile-card, .shop-card {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    padding: 14px !important;
  }

  /* Arena Táctica 6x5 en Móvil */
  .tactical-cell {
    min-height: clamp(34px, 12vw, 54px) !important;
  }
  .cell-wall-icon {
    font-size: 18px !important;
  }
  .tactical-unit {
    padding: 1px !important;
  }
  .unit-icon {
    font-size: 16px !important;
  }
  .unit-name {
    font-size: 8px !important;
  }
  .unit-hp {
    font-size: 8px !important;
  }
  .tactical-stage-6x5 {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Controles de zoom flotantes */
  .hud-zoom-controls {
    left: 10px;
    top: 10px;
  }
  .zoom-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .zoom-level {
    font-size: 9px;
    padding: 2px 4px;
  }
}

/* Pantallas Extra Pequeñas (<= 480px) */
@media (max-width: 480px) {
  .top-nav {
    padding: 4px 8px;
  }
  .logo-gem {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  .game-title {
    font-size: 13.5px;
  }
  .turn-status-bar {
    gap: 4px;
  }
  .resource-badge {
    padding: 2px 5px;
    font-size: 9.5px;
  }
  .btn-end-turn {
    padding: 4px 7px;
    font-size: 10px;
  }
  .faction-pill {
    padding: 3px 7px;
  }
  .btn-assign-faction {
    padding: 5px 3px;
    font-size: 9.5px;
  }
  .action-btn {
    padding: 9px;
    font-size: 11.5px;
  }
}



