/**
 * Alien Survivors: Enjambre Espacial
 * Hoja de estilos prémium Sci-Fi Cyberpunk Midnight Slate
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta Sci-Fi Neon Midnight Slate */
  --bg-space: #070a12;
  --bg-card: #0d1322;
  --bg-card-subtle: #131c31;
  --border-glow: rgba(0, 229, 255, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --neon-cyan: #00e5ff;
  --neon-purple: #a855f7;
  --neon-amber: #f59e0b;
  --neon-green: #10b981;
  --neon-rose: #ec4899;
  --neon-red: #ef4444;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;

  /* Tokens canónicos del header y compatibilidad */
  --primary-color: #00e5ff;
  --primary-light: rgba(0, 229, 255, 0.15);
  --border-color: rgba(255, 255, 255, 0.12);
  --bg-input: #101728;
}

[data-theme="light"], body.light-theme {
  --bg-space: #0f172a;
  --bg-card: #1e293b;
  --bg-card-subtle: #334155;
  --border-glow: rgba(0, 229, 255, 0.35);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
}

/* Reset y estructura canónica del cuerpo */
body {
  font-family: var(--font-main);
  background-color: var(--bg-space);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-title,
.card-title,
.char-name {
  font-family: var(--font-heading);
}

.mono,
.hud-val,
.stat-val,
code {
  font-family: var(--font-mono);
}

/* Layout canónico de la herramienta */
.tool-layout {
  flex: 1 0 auto;
  max-width: 1200px;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 229, 255, 0.08);
  position: relative;
  overflow: hidden;
}

/* Barra superior del juego y metadatos */
.game-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.game-top-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nanocrystal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 700;
}

.game-top-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-game-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
}

.btn-game-action:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--neon-cyan);
  color: var(--text-bright);
}

.btn-game-action.is-muted {
  opacity: 0.6;
  text-decoration: line-through;
}

/* ==========================================
   VISTA DEL MENÚ PRINCIPAL Y SELECCIÓN
   ========================================== */

#view-menu {
  text-align: center;
}

.menu-hero {
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, #00e5ff 0%, #a855f7 50%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

.char-select-section {
  margin-bottom: 2rem;
}

.section-label {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.char-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.char-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
}

.char-card:hover {
  transform: translateY(-4px);
  border-color: var(--char-color, var(--neon-cyan));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 229, 255, 0.15);
}

.char-card.is-selected {
  border-color: var(--char-color, var(--neon-cyan));
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.28), inset 0 0 15px rgba(0, 229, 255, 0.08);
  transform: translateY(-4px);
}

.char-card.is-locked {
  filter: grayscale(0.65);
  opacity: 0.85;
}

.char-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.char-avatar-box {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
}

.char-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.char-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.char-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.char-desc {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #cbd5e1;
  margin-bottom: 0.85rem;
  flex: 1 1 auto;
}

.char-stats-mini {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.btn-char-action {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  background: var(--char-color, var(--neon-cyan));
  color: #070a12;
  transition: all 0.2s ease;
}

.btn-char-action:disabled {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  cursor: default;
}

.menu-actions-center {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-start-run {
  background: linear-gradient(135deg, #00e5ff 0%, #0284c7 100%);
  color: #04101e;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 0.85rem 2.5rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
  transition: all 0.25s ease;
  min-height: 48px;
}

.btn-start-run:hover {
  transform: scale(1.04);
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.6);
}

.btn-workshop-open {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.8rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.btn-workshop-open:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: #f59e0b;
}

/* ==========================================
   VISTA DEL JUEGO ACTIVO (CANVAS Y HUD)
   ========================================== */

#view-game {
  position: relative;
  width: 100%;
  display: none;
}

.game-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: #000;
}

#canvas-game {
  width: 100%;
  height: 100%;
  display: block;
}

/* HUD superior integrado sobre el canvas */
.game-hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.85) 0%, rgba(7, 10, 18, 0) 100%);
}

.hud-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hud-xp-wrapper {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hud-xp-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8 0%, #00e5ff 100%);
  box-shadow: 0 0 10px #00e5ff;
  transition: width 0.15s ease;
}

.hud-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(13, 19, 34, 0.75);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.hud-score-pill {
  background: rgba(13, 19, 34, 0.88);
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.hud-score-tag {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
}

.hud-score-val {
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.5);
}

.hud-pill-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Banner flotante de eventos y jefes en pantalla */
.game-event-banner {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translate(-50%, -20px) scale(0.92);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1.4rem;
  border-radius: 12px;
  background: rgba(11, 15, 23, 0.94);
  backdrop-filter: blur(10px);
  border: 2px solid #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.55), inset 0 0 15px rgba(239, 68, 68, 0.2);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease, visibility 0.25s;
  z-index: 50;
  max-width: 90%;
}

.game-event-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.game-event-banner.banner-danger {
  border-color: #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

.game-event-banner.banner-warning {
  border-color: #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

.game-event-banner.banner-info {
  border-color: #00e5ff;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
}

.event-banner-icon {
  font-size: 1.8rem;
  animation: banner-pulse 0.9s infinite alternate;
}

.event-banner-content {
  display: flex;
  flex-direction: column;
}

.event-banner-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.event-banner-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

@keyframes banner-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

.hud-hp-box {
  width: 160px;
  height: 14px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
}

.hud-hp-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ef4444 0%, #22c55e 100%);
  transition: width 0.1s ease;
}

.hud-hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  text-shadow: 0 1px 2px #000;
}

/* Slots de armas y pasivas abajo a la izquierda */
.hud-slots-overlay {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
}

.slots-row {
  display: flex;
  gap: 0.35rem;
}

.equip-slot {
  width: 34px;
  height: 34px;
  background: rgba(13, 19, 34, 0.85);
  border: 1px solid var(--border-glow);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.equip-slot.is-evolved {
  border-color: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.slot-icon {
  font-size: 1rem;
}

.slot-lvl {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
}

/* Botón flotante de dash para móvil */
.btn-mobile-dash {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.25);
  border: 2px solid var(--neon-cyan);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.btn-mobile-dash:active,
.btn-mobile-dash.is-ready:hover {
  background: var(--neon-cyan);
  color: #070a12;
}

/* ==========================================
   MODALES DEL JUEGO (NIVELACIÓN, COFRE, PAUSA)
   ========================================== */

.alien-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(7, 10, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.alien-modal.is-active {
  display: flex;
}

.alien-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 229, 255, 0.15);
  text-align: center;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: var(--neon-cyan);
}

.modal-header-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Cartas de nivelación */
.levelup-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.upgrade-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.upgrade-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-glow-color, var(--neon-cyan));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 229, 255, 0.12);
}

.upgrade-card.is-legendary {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(13, 19, 34, 0.9) 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.card-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-bright);
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.btn-select-card {
  margin-left: auto;
  border: none;
  color: #070a12;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 40px;
}

.btn-levelup-reroll {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 40px;
  width: 100%;
}

.btn-levelup-reroll:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ==========================================
   RULETA GACHAPÓN GALÁCTICA
   ========================================== */
.gacha-modal-box {
  max-width: 640px !important;
  text-align: center;
}

.gacha-roulette-container {
  position: relative;
  background: #090e1a;
  border: 2px solid rgba(255, 215, 0, 0.45);
  border-radius: 16px;
  padding: 1.25rem 0.75rem 1rem;
  margin: 1.2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 25px rgba(255, 215, 0, 0.08);
  overflow: hidden;
}

.roulette-pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffd700;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 10;
  filter: drop-shadow(0 0 8px #ffd700);
  animation: pointerPulse 1s ease-in-out infinite alternate;
}

@keyframes pointerPulse {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(3px); }
}

.roulette-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  background: rgba(4, 7, 13, 0.9);
  padding: 0.6rem 0;
}

/* Máscaras de degradado en los extremos para efecto de curvatura */
.roulette-viewport::before,
.roulette-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 5;
  pointer-events: none;
}

.roulette-viewport::before {
  left: 0;
  background: linear-gradient(90deg, #090e1a 0%, rgba(9, 14, 26, 0) 100%);
}

.roulette-viewport::after {
  right: 0;
  background: linear-gradient(-90deg, #090e1a 0%, rgba(9, 14, 26, 0) 100%);
}

.roulette-track {
  display: flex;
  gap: 0.85rem;
  will-change: transform;
}

.roulette-item {
  flex: 0 0 140px;
  height: 140px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  user-select: none;
  transition: transform 0.2s ease;
}

.roulette-item.is-selected {
  transform: scale(1.06);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
  border-color: #ffd700 !important;
}

.roulette-item-icon {
  font-size: 2.2rem;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.roulette-item-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  text-align: center;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.roulette-item-tier {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Colores por rareza */
.tier-common {
  border-color: #22c55e !important;
}
.tier-common .roulette-item-tier {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.tier-rare {
  border-color: #38bdf8 !important;
}
.tier-rare .roulette-item-tier {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.tier-epic {
  border-color: #a855f7 !important;
}
.tier-epic .roulette-item-tier {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.tier-legendary {
  border-color: #ffd700 !important;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
}
.tier-legendary .roulette-item-tier {
  background: rgba(255, 215, 0, 0.25);
  color: #ffd700;
}

.btn-spin-roulette {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #070a12;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45);
  transition: all 0.2s ease;
  min-height: 48px;
  width: 100%;
}

.btn-spin-roulette:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.65);
}

.btn-spin-roulette:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.gacha-result-wrap {
  animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 1rem;
}

.gacha-reward-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 2px solid #ffd700;
  border-radius: 14px;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
}

.gacha-reward-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.5));
  flex-shrink: 0;
}

.gacha-reward-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffd700;
  margin-bottom: 0.25rem;
}

.gacha-reward-desc {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.35;
}

/* Modal del taller */
.workshop-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.workshop-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
}

.ws-header {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ws-icon {
  font-size: 1.5rem;
}

.ws-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-bright);
}

.ws-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ws-pips {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.ws-pips .pip {
  flex: 1 1 0%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
}

.ws-pips .pip.active {
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}

.ws-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-cost {
  font-weight: 700;
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.btn-ws-buy {
  background: var(--neon-cyan);
  border: none;
  color: #070a12;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  min-height: 36px;
}

.btn-ws-buy:disabled {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  cursor: default;
}

/* Modal de resumen game over */
.go-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.go-stat-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
}

.go-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.go-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--neon-cyan);
}

/* Modal de pausa y lista DPS */
.pause-weapons-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.pause-weapon-row {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.pwr-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Botones principales de modales */
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-modal-primary {
  background: var(--neon-cyan);
  color: #070a12;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  min-height: 44px;
}

.btn-modal-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
}

/* Guía y preguntas frecuentes bajo el juego */
.game-guide-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.guide-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
}

.guide-card h3 {
  font-size: 1.15rem;
  color: var(--neon-cyan);
  margin: 0 0 0.5rem;
}

.guide-card p,
.guide-card ul {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  padding-left: 1.2rem;
}

/* Responsividad en móvil */
@media (max-width: 768px) {
  .tool-layout {
    padding: 0 0.5rem;
    margin: 0.5rem auto 2rem;
  }

  .card-main {
    padding: 1rem 0.75rem;
  }

  .game-canvas-wrapper {
    aspect-ratio: 4 / 3;
    max-height: 60vh;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .char-select-grid {
    grid-template-columns: 1fr;
  }

  .alien-modal-box {
    padding: 1.25rem 1rem;
  }

  .hud-top-row {
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-start;
  }

  .hud-stat-pill {
    padding: 0.2rem 0.45rem;
    font-size: 0.78rem;
    gap: 0.25rem;
  }

  .hud-hp-box {
    width: 100px;
    height: 12px;
  }

  .game-event-banner {
    padding: 0.45rem 0.85rem;
    gap: 0.5rem;
  }

  .event-banner-title {
    font-size: 0.88rem;
  }

  .event-banner-sub {
    font-size: 0.72rem;
  }

  .go-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================
   ESTILOS DE ICONOS VECTORIALES SCI-FI SVG
   ========================================== */
.scifi-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  stroke-width: 2;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  filter: drop-shadow(0 0 5px currentColor);
}

.card-icon-box .scifi-icon {
  width: 32px;
  height: 32px;
}

.slot-icon .scifi-icon {
  width: 22px;
  height: 22px;
}

.roulette-item-icon .scifi-icon {
  width: 44px;
  height: 44px;
}

.gacha-reward-icon .scifi-icon {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 0 14px currentColor);
}

.ws-icon .scifi-icon {
  width: 26px;
  height: 26px;
}

.hud-stat-pill .scifi-icon {
  width: 16px;
  height: 16px;
  margin-right: 2px;
}

