/* =========================================================
   PALETA DE COLORES GLOBAL (ESTADO 2796)
   Cambia aquí cualquier color y se actualizará en toda la web
   ========================================================= */
:root {
  --bg: #060D09;             /* Fondo principal carbón abisal */
  --card: #0C1A13;           /* Fondo de tarjetas */
  --card2: #08120D;          /* Fondo de inputs y cajas internas */
  --border: #1B3B2B;         /* Color de bordes */
  --text: #F0FDF4;           /* Texto principal */
  --muted: #9CC7B1;          /* Texto secundario */
  --emerald: #10B981;        /* Verde esmeralda principal */
  --emerald-light: #34D399;  /* Verde esmeralda claro */
  --danger: #E31A21;         /* Rojo alertas / cerrar */
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  min-height: 100dvh;
}

/* Padding específico para la app principal con barra inferior */
body.app-main {
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

/* Tarjetas y contenedores */
.card, .card-modal {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.top-gradient-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--emerald) 0%, var(--emerald-light) 60%, transparent 100%);
}

/* Campos de texto y desplegables */
.input-box {
  background-color: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-box:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

option {
  background-color: var(--card2);
  color: var(--text);
}

/* Botones de selección (Alianzas y Tier de Tropas) */
.badge-btn {
  background-color: #0F2319;
  color: var(--muted);
  border: 1px solid #1F4733;
  transition: all 0.2s ease;
  cursor: pointer;
}

.badge-btn:hover {
  background-color: #163325;
  color: #6EE7B7;
  border-color: var(--emerald);
}

.badge-selected {
  background-color: var(--emerald) !important;
  color: #04130B !important;
  font-weight: 800;
  border-color: var(--emerald) !important;
}

/* Botón principal de acción */
.btn-action {
  background: linear-gradient(90deg, #059669 0%, var(--emerald) 100%);
  color: #04130B;
  font-weight: 800;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn-action:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Barra de navegación inferior (App Principal) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(8, 18, 13, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 40;
}

.nav-btn {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.nav-btn.active {
  color: var(--emerald-light);
}

/* Barra deslizable FC1 - FC10 (Cuestionario de Tropas) */
input[type="range"].fc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  border: 1px solid var(--border);
  outline: none;
}

input[type="range"].fc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid var(--text);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

input[type="range"].fc-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid var(--text);
  cursor: pointer;
}
/* Cajitas de iconos de recursos y fondo del modal UTC (index.html) */
.icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: #09150F;
  border: 1px solid var(--border);
  font-size: 1.15rem;
}

.modal-backdrop {
  background-color: rgba(3, 10, 6, 0.84);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

button[id^="lang-"] {
  font-family: "Noto Color Emoji", system-ui, -apple-system, sans-serif;
}