/**
 * Estilos Principales - Panteón y Mitología Comparada de Deidades
 * Temas Claro y Oscuro, Sistema de Pestañas, Árboles SVG, Radar de Arena y Test Arquetípico.
 */

:root {
  /* Tema Oscuro Canónico (Midnight Slate) */
  --bg-base: #0b0f17;
  --bg-surface: #131b26;
  --bg-surface-elevated: #1a2434;
  --bg-input: #0f1622;
  --border-subtle: #233044;
  --border-strong: #3b4e6b;
  
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #cbd5e1; /* Ajustado para óptimo contraste en fondo oscuro */
  
  --gold-primary: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --purple-oracle: #8b5cf6;
  --cyan-sky: #0ea5e9;
  --crimson-war: #ef4444;
  --emerald-life: #10b981;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 15px rgba(245, 158, 11, 0.2);
  --transition: all 0.2s ease-in-out;
}

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #334155; /* Alto contraste para lectura diáfana en claro */
  
  --gold-primary: #d97706;
  --gold-glow: rgba(217, 119, 6, 0.15);
  --purple-oracle: #7c3aed;
  --cyan-sky: #0284c7;
  --crimson-war: #dc2626;
  --emerald-life: #059669;
  
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 15px rgba(217, 119, 6, 0.12);
}

/* Reset y estructura */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  margin-top: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.6;
  color: var(--text-secondary);
}

.mono-num {
  font-family: 'JetBrains Mono', monospace;
}

/* Layout General */
.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
}

/* Cabecera Hero y Resumen */
.tool-hero-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.tool-hero-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-primary), var(--purple-oracle), var(--cyan-sky));
}

.tool-hero-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tool-hero-desc {
  margin: 0;
  font-size: 1rem;
  max-width: 850px;
}

/* Barra de Pestañas Principales */
.tabs-navigation {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 3px solid transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  min-height: 44px;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

.tab-btn .tab-icon {
  font-size: 1.1rem;
}

/* Paneles de Contenido */
.tab-content-panel {
  display: none;
}

.tab-content-panel.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

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

/* =======================================================
   MÓDULO 1: PANTEÓN Y SINCRETISMO
   ======================================================= */
.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrapper {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
}

.search-input {
  width: 100%;
  min-height: 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-glow);
}

.search-icon-pos {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.filter-pills-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.pill-btn {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pill-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.pill-btn.active {
  background: var(--gold-primary);
  color: #000000;
  border-color: var(--gold-primary);
  font-weight: 600;
}

/* Cuadrícula de Deidades */
.deities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.deity-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.deity-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.deity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.deity-pantheon-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.deity-name-block {
  margin-bottom: 0.5rem;
}

.deity-card-title {
  font-size: 1.25rem;
  margin: 0 0 0.2rem;
  color: var(--text-main);
}

.deity-card-original {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.deity-domains-list {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.domain-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
}

.deity-card-snippet {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deity-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: auto;
}

.deity-stats-quick {
  display: flex;
  gap: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* =======================================================
   MÓDULO 2: ÁRBOLES GENEALÓGICOS INTERACTIVOS
   ======================================================= */
.tree-controls-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.tree-selector-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tree-select-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-height: 40px;
}

.tree-select-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.tree-select-btn.active {
  background: var(--gold-primary);
  color: #000000;
  border-color: var(--gold-primary);
}

.tree-actions-zoom {
  display: flex;
  gap: 0.4rem;
}

.btn-zoom {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  transition: var(--transition);
}

.btn-zoom:hover {
  background: var(--bg-input);
  border-color: var(--gold-primary);
}

.tree-viewport-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-height: 520px;
  overflow: auto;
  position: relative;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: center;
}

.tree-interactive-canvas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  transform-origin: top center;
  transition: transform 0.2s ease-out;
  min-width: 600px;
}

/* Nodos del árbol jerárquico */
.tree-node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.tree-node-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  max-width: 280px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 2;
}

.tree-node-card:hover {
  border-color: var(--gold-primary);
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
}

.tree-node-card.root-node {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), var(--bg-surface-elevated));
  border-color: var(--gold-primary);
}

.tree-node-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--text-main);
}

.tree-node-role {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-primary);
  margin-bottom: 0.35rem;
}

.tree-node-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.tree-children-container {
  display: flex;
  gap: 1.5rem;
  position: relative;
  margin-top: 1.75rem;
  padding-top: 1.75rem;
}

.tree-children-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 1.75rem;
  background: var(--border-strong);
}

.tree-children-container::after {
  content: '';
  position: absolute;
  top: 1.75rem;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--border-strong);
}

/* =======================================================
   MÓDULO 3: TEST DE ARQUETIPO DIVINO
   ======================================================= */
.quiz-container-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  max-width: 780px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.quiz-progress-bar-wrapper {
  margin-bottom: 1.5rem;
}

.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.quiz-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: 4px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), var(--purple-oracle));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.quiz-question-title {
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.quiz-option-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: left;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 52px;
}

.quiz-option-btn:hover {
  border-color: var(--gold-primary);
  background: var(--bg-input);
  transform: translateX(3px);
}

.quiz-option-btn.selected {
  border-color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: var(--shadow-glow);
}

.quiz-option-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: bold;
}

.quiz-option-btn.selected .quiz-option-marker {
  border-color: var(--gold-primary);
  background: var(--gold-primary);
  color: #000000;
}

/* Tarjeta de Resultados del Test */
.quiz-result-card {
  text-align: center;
}

.archetype-avatar-box {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--purple-oracle));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

.result-archetype-title {
  font-size: 1.85rem;
  margin: 0 0 0.4rem;
}

.result-archetype-tagline {
  font-size: 1.05rem;
  color: var(--gold-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.result-archetype-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 650px;
  margin: 0 auto 1.5rem;
}

.result-breakdown-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.breakdown-row {
  margin-bottom: 0.85rem;
}

.breakdown-row:last-child {
  margin-bottom: 0;
}

.breakdown-label-flex {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.breakdown-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-base);
  border-radius: 3px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gold-primary);
}

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

/* =======================================================
   MÓDULO 4: ARENA Y COMPARADOR 1 VS 1
   ======================================================= */
.arena-card-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.arena-selection-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .arena-selection-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.fighter-select-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fighter-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.styled-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 44px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 40px 0 12px;
  font-family: inherit;
  font-size: 0.92rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: var(--transition);
}

.styled-select option, .styled-select optgroup {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.styled-select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-glow);
}

.vs-badge-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--crimson-war);
  color: var(--crimson-war);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 auto;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}

.arena-comparison-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .arena-comparison-body {
    grid-template-columns: 1fr;
  }
}

.arena-radar-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.radar-svg-box {
  width: 100%;
  max-width: 360px;
  height: auto;
}

.arena-attributes-bars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: center;
}

.attr-comparison-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.attr-name-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.dual-bars-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  height: 10px;
}

.bar-side-left {
  display: flex;
  justify-content: flex-end;
  background: var(--bg-base);
  border-radius: 4px;
  overflow: hidden;
}

.bar-side-right {
  display: flex;
  justify-content: flex-start;
  background: var(--bg-base);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill-f1 {
  height: 100%;
  background: var(--gold-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.bar-fill-f2 {
  height: 100%;
  background: var(--purple-oracle);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Tarjeta del Veredicto Mitológico */
.arena-verdict-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(139, 92, 246, 0.08));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.verdict-title {
  margin: 0;
  font-size: 1.25rem;
}

.verdict-winner-badge {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 12px;
  background: var(--gold-primary);
  color: #000000;
}

.verdict-scenario {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.verdict-scenario:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.scenario-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.35rem;
}

.scenario-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* =======================================================
   MODAL ACCESIBLE DE FICHA TÉCNICA
   ======================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  padding: 1.75rem;
  position: relative;
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-main);
  border-color: var(--crimson-war);
  background: rgba(239, 68, 68, 0.1);
}

.modal-deity-header {
  margin-bottom: 1.25rem;
}

.modal-epithets-list {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.modal-epithet-item {
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.4;
}

.modal-epithet-item:last-child {
  margin-bottom: 0;
}

.modal-epithet-term {
  font-weight: 700;
  color: var(--gold-primary);
}

.modal-tags-section {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

/* Botones universales */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gold-primary);
  color: #000000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px;
}

.btn-secondary:hover {
  background: var(--bg-input);
  border-color: var(--gold-primary);
}

/* Adaptabilidad Móvil */
@media (max-width: 640px) {
  .tool-layout {
    padding: 0 0.75rem;
    margin: 1rem auto 2rem;
  }
  
  .tool-hero-box {
    padding: 1.25rem 1rem;
  }
  
  .tool-hero-title {
    font-size: 1.4rem;
  }
  
  .quiz-container-box {
    padding: 1.25rem 1rem;
  }
  
  .arena-card-container {
    padding: 1.25rem 1rem;
  }
}
