/* ================================================================
   INFILTRADO.CSS — Hub del Blue Shell / El Infiltrado
   Hereda el sistema de base.css. El giro de esta página: el acento
   protagonista es --electric (identidad espía/Blue Shell); el oro
   queda para el chrome compartido (nav, footer, títulos de sección).
   ================================================================ */

.inf-page {
  position: relative; z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 20px 80px;
}

/* ── HERO / EXPEDIENTE ─────────────────────────────────────────── */
.inf-hero { text-align: center; margin-bottom: 56px; }

.inf-hero-logo {
  width: 92px; height: 92px; object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 24px rgba(79,195,247,.35));
}

.inf-hero-eyebrow {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 10px;
}

.inf-hero-title {
  font-family: var(--font-accent);
  font-size: clamp(48px, 9vw, 88px);
  letter-spacing: .08em;
  line-height: .95;
  color: var(--text);
  text-shadow: 0 0 40px rgba(79,195,247,.25);
}
.inf-hero-title span { color: var(--electric); }

.inf-hero-sub {
  max-width: 640px;
  margin: 16px auto 0;
  font-size: 16px; font-weight: 400;
  color: var(--text-dim);
  line-height: 1.6;
}

.inf-freshness {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(10,13,24,.8);
  border: 1px solid var(--border);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.inf-freshness-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ADE80; box-shadow: 0 0 8px #4ADE80;
}
.inf-freshness-dot.stale { background: var(--muted); box-shadow: none; }

/* ── ESTADO VACÍO GLOBAL ───────────────────────────────────────── */
.inf-empty {
  max-width: 560px; margin: 0 auto;
  padding: 28px;
  text-align: center;
  color: var(--text-dim);
  font-size: 15px; line-height: 1.6;
  background: var(--bg-card);
  border: 1px solid var(--border);
  clip-path: polygon(14px 0%, 100% 0%, calc(100% - 14px) 100%, 0% 100%);
}
.inf-empty a { color: var(--purple); font-weight: 600; }

/* ── SECCIONES ─────────────────────────────────────────────────── */
.inf-section { margin-bottom: 64px; }

.inf-section-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: .06em;
  color: var(--gold);
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}
.inf-section-title::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: linear-gradient(180deg, var(--electric), transparent);
}

.inf-section-sub {
  font-size: 14px; color: var(--text-dim);
  margin-bottom: 18px; line-height: 1.5;
  padding-left: 16px;
}
.inf-section-sub a { color: var(--electric); font-weight: 600; }
.inf-section-sub code {
  font-family: var(--font-body); font-weight: 700;
  color: var(--gold-light);
  background: rgba(200,155,60,.1);
  padding: 1px 6px;
}

/* ── CARDS BASE ────────────────────────────────────────────────── */
.inf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px 20px;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}
.inf-card-title {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.inf-empty-row {
  color: var(--muted); font-size: 14px;
  padding: 10px 0; list-style: none;
}

/* ── BLOQUE 1: DETONADOR ───────────────────────────────────────── */
.inf-shell-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: stretch;
}

.inf-detonator {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 50% 30%, rgba(79,195,247,.08), transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(79,195,247,.25);
  clip-path: polygon(20px 0%, 100% 0%, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0% 100%, 0% 20px);
}

.inf-detonator-ring { position: relative; width: 220px; height: 220px; }
.inf-gauge { width: 100%; height: 100%; transform: rotate(0deg); }

.inf-gauge-hex-bg {
  fill: rgba(6,8,16,.6);
  stroke: rgba(79,195,247,.15);
  stroke-width: 6;
}
.inf-gauge-hex {
  fill: none;
  stroke: var(--electric);
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(79,195,247,.6));
  transition: stroke-dashoffset 1.2s cubic-bezier(.22,1,.36,1);
}

.inf-gauge-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
}
.inf-gauge-pct {
  font-family: var(--font-accent);
  font-size: 52px; line-height: 1;
  color: var(--electric);
  text-shadow: 0 0 24px rgba(79,195,247,.5);
}
.inf-gauge-label {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-dim);
}

.inf-detonator-meta { text-align: center; }
.inf-progress-nums {
  font-family: var(--font-body);
  font-size: 15px; font-weight: 600;
  color: var(--text);
}
.inf-progress-nums span { color: var(--electric); font-weight: 700; }
.inf-detonator-status {
  margin-top: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--text-dim);
  letter-spacing: .04em;
}

/* ── Columna de estado ── */
.inf-status-col { display: flex; flex-direction: column; gap: 16px; }

.inf-active-punishment.has-punishment {
  border-color: rgba(220,38,38,.4);
  background:
    linear-gradient(135deg, rgba(220,38,38,.08), transparent 50%),
    var(--bg-card);
}
.inf-active-none { color: var(--muted); font-size: 14px; }
.inf-active-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inf-punishment-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-accent);
  font-size: 20px; letter-spacing: .06em;
  color: var(--pcolor, var(--gold));
  padding: 6px 16px;
  border: 1px solid color-mix(in srgb, var(--pcolor, #C89B3C) 45%, transparent);
  background: color-mix(in srgb, var(--pcolor, #C89B3C) 10%, transparent);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.inf-active-since { font-size: 13px; color: var(--text-dim); }

.inf-counters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inf-counter { text-align: center; }
.inf-counter-num {
  font-family: var(--font-accent);
  font-size: 40px; line-height: 1;
  color: var(--gold-light);
}
.inf-counter-label {
  margin-top: 6px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Rankings compartidos (saboteadores + leaderboard) ── */
.inf-saboteurs, .inf-leaderboard { list-style: none; }
.inf-saboteurs li, .inf-leaderboard li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(200,155,60,.08);
  font-family: var(--font-body);
}
.inf-saboteurs li:last-child, .inf-leaderboard li:last-child { border-bottom: none; }

.inf-rank {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-accent);
  font-size: 14px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--bg-surface);
}
.inf-rank.r1 { color: #060810; background: var(--gold);      border-color: var(--gold); }
.inf-rank.r2 { color: #060810; background: #B8C4D4;          border-color: #B8C4D4; }
.inf-rank.r3 { color: #060810; background: var(--gold-dark); border-color: var(--gold-dark); }

.inf-name { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-pts  { font-size: 14px; font-weight: 700; color: var(--electric); white-space: nowrap; }

.inf-leaderboard { background: var(--bg-card); border: 1px solid var(--border); padding: 8px 18px; }

/* ── BLOQUE 2: HISTORIAL ───────────────────────────────────────── */
.inf-history { display: flex; flex-direction: column; gap: 10px; }

.inf-history-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--pcolor, var(--gold));
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.inf-history-icon { font-size: 20px; flex-shrink: 0; }
.inf-history-name {
  flex: 1;
  font-family: var(--font-accent);
  font-size: 18px; letter-spacing: .05em;
  color: var(--text);
}
.inf-history-state {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 10px;
}
.inf-history-state.done     { color: #4ADE80; background: rgba(74,222,128,.1); }
.inf-history-state.canceled { color: var(--muted); background: rgba(90,96,112,.15); }
.inf-history-date { font-size: 13px; color: var(--text-dim); white-space: nowrap; }

/* ── BLOQUE 3: DOS COLUMNAS ────────────────────────────────────── */
.inf-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.inf-encounters { display: flex; flex-wrap: wrap; gap: 10px; }
.inf-enc-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: border-color .2s;
}
.inf-enc-chip:hover { border-color: rgba(79,195,247,.4); }
.inf-enc-name {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  color: var(--text);
}
.inf-enc-count {
  font-family: var(--font-accent);
  font-size: 16px;
  color: var(--electric);
}

/* ── Nav: distintivo sutil del enlace ── */
.inf-nav-link { color: var(--electric) !important; }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .inf-shell-grid { grid-template-columns: 1fr; }
  .inf-two-col    { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 520px) {
  .inf-page { padding-top: 80px; }
  .inf-detonator-ring { width: 180px; height: 180px; }
  .inf-gauge-pct { font-size: 42px; }
  .inf-counters { grid-template-columns: 1fr; }
  .inf-history-row { flex-wrap: wrap; }
  .inf-history-date { width: 100%; padding-left: 34px; }
}

/* ── Accesibilidad: sin animación de gauge si el usuario lo pide ── */
@media (prefers-reduced-motion: reduce) {
  .inf-gauge-hex { transition: none; }
}

/* ── EL CHAT EN NÚMEROS ────────────────────────────────────────── */
.inf-pred-hero {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 16px;
}
.inf-pred-pct {
  font-family: var(--font-accent);
  font-size: 64px; line-height: 1;
  color: var(--electric);
  text-shadow: 0 0 24px rgba(79,195,247,.4);
}
.inf-pred-verdict {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  color: var(--gold-light);
  line-height: 1.35;
}
.inf-pred-count { margin-top: 4px; font-size: 13px; color: var(--text-dim); }

.inf-pred-list { display: flex; flex-direction: column; }
.inf-pred-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(200,155,60,.08);
  font-size: 13px;
}
.inf-pred-mark {
  width: 20px; height: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.inf-pred-mark.ok { color: #060810; background: #4ADE80; }
.inf-pred-mark.ko { color: #fff;    background: #DC2626; }
.inf-pred-title {
  flex: 1; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inf-pred-pick { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

.inf-duel-counters {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 16px;
}
.inf-duel-counters > div { text-align: center; }
.inf-duel-num {
  display: block;
  font-family: var(--font-accent);
  font-size: 38px; line-height: 1;
  color: var(--gold-light);
}
.inf-duel-lbl {
  display: block; margin-top: 4px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
}
.inf-duel-biggest {
  padding: 12px 14px;
  background: rgba(200,155,60,.06);
  border: 1px solid rgba(200,155,60,.2);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.inf-duel-biggest-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.inf-duel-biggest-body { font-size: 14px; color: var(--text); line-height: 1.4; }
.inf-duel-biggest-body strong { color: var(--gold-light); }
.inf-duel-date { color: var(--text-dim); font-size: 12px; }

/* ══════════════════════════════════════════════════════════════
   BLUE SHELL — ESCALADA DE TENSIÓN
   --------------------------------------------------------------
   Antes: una barra que se llenaba en silencio. Ahora el detonador
   se pone nervioso conforme se carga — el pulso acelera (--bs-speed
   lo fija el JS según el %) y el color vira de azul a rojo.
   Es el momento más dramático del proyecto; que se note.
   ══════════════════════════════════════════════════════════════ */
.inf-detonator {
  --bs-speed: 1.8s;
  --bs-color: var(--electric);
  transition: filter .6s var(--ease-hex);
}

/* La carga del hexágono se ve SUBIR, no aparece hecha */
.inf-gauge-hex {
  transition: stroke-dashoffset 1.6s var(--ease-hex), stroke .8s ease;
  stroke: var(--bs-color);
}
.inf-detonator-ring { transition: transform .4s var(--ease-hex); }

/* ── Templado (50-80%) ── */
.inf-detonator.bs-warm  { --bs-color: #FACC15; }
.inf-detonator.bs-warm .inf-detonator-ring {
  animation: syk-pulse var(--bs-speed) var(--ease-hex) infinite;
}

/* ── Caliente (80-100%): ya no es una barra, es una amenaza ── */
.inf-detonator.bs-hot { --bs-color: #FB923C; }
.inf-detonator.bs-hot .inf-detonator-ring {
  animation: syk-pulse var(--bs-speed) var(--ease-hex) infinite;
  filter: drop-shadow(0 0 22px rgba(251,146,60,.45));
}

/* ── Crítico (100%): late, brilla y tiembla ── */
.inf-detonator.bs-critical { --bs-color: #EF4444; }
.inf-detonator.bs-critical .inf-detonator-ring {
  animation: bs-critical-beat var(--bs-speed) ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(239,68,68,.6));
}
.inf-detonator.bs-critical .inf-gauge-pct {
  color: #EF4444;
  text-shadow: 0 0 24px rgba(239,68,68,.75);
}
.inf-detonator.bs-critical .inf-detonator-status {
  color: #FCA5A5;
  animation: syk-pulse 1s ease-in-out infinite;
}
@keyframes bs-critical-beat {
  0%, 100% { transform: scale(1)    rotate(0deg); }
  25%      { transform: scale(1.045) rotate(-.6deg); }
  50%      { transform: scale(1)    rotate(0deg); }
  75%      { transform: scale(1.045) rotate(.6deg); }
}
