/* VARIABLES Y CONFIGURACIÓN BASE DEL SISTEMA */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0D0D0D; 
  --surface: #1A1A1A; 
  --surface2: #242424;
  --border: #333; 
  --text: #F0F0E8; 
  --muted: #777;
  --accent: #39FF14; /* Verde fósforo CRT */
  --amber: #FFB800; /* Ámbar clásico */
  --yt-red: #FF0033; /* Rojo YouTube Terminal */
  --mono: 'Share Tech Mono', monospace; 
  --sans: 'Inter', sans-serif;
}
body { background: var(--bg); color: var(--text); font-family: var(--sans); min-height: 100vh; }

/* BARRA DE NAVEGACIÓN (STICKY NAV) */
header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(13,13,13,0.92); backdrop-filter: blur(8px); z-index: 10; }
nav { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 2rem; max-width: 1200px; margin: 0 auto; }
.nav-brand { font-family: var(--mono); font-size: 1.2rem; font-weight: bold; letter-spacing: 1.5px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 0.8rem; }
.nav-brand span { color: var(--accent); text-shadow: 0 0 8px rgba(57,255,20,0.6); }
.nav-logo-img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); object-fit: cover; }
.nav-stats { font-family: var(--mono); font-size: .75rem; color: var(--muted); margin-left: auto; text-transform: uppercase; letter-spacing: 1px; display: flex; gap: 1.5rem; }
.stat-counter { color: var(--muted); }
.stat-visits { color: var(--amber); text-shadow: 0 0 4px rgba(255,184,0,0.4); }

/* LAYOUT PRINCIPAL */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* BLOQUE PRESENTACIÓN / SOBRE MÍ (MANIFIESTO 1983) */
.about-box { background: rgba(26,26,26,0.4); border: 1px dashed var(--border); padding: 2rem; margin-bottom: 3rem; position: relative; border-radius: 4px; }
.about-box::before { content: "SYS_INFO // AUTHOR_WELCOME"; position: absolute; top: -9px; left: 15px; background: var(--bg); padding: 0 8px; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 1px; }
.about-layout { display: flex; gap: 2rem; align-items: center; }
.about-logo-wrapper { flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.about-logo-img { width: 140px; height: 140px; border-radius: 50%; border: 2px solid var(--accent); box-shadow: 0 0 15px rgba(57,255,20,0.25); object-fit: cover; background: #000; }
.about-text { font-size: 0.95rem; color: rgba(240,240,232,0.85); line-height: 1.6; }
.about-text strong { color: var(--amber); font-family: var(--mono); font-weight: normal; }

@media(max-width:650px){ 
  .about-layout { flex-direction: column; text-align: center; gap: 1.5rem; }
  .about-logo-img { width: 120px; height: 120px; }
  .nav-stats { flex-direction: column; gap: 0.2rem; align-items: flex-end; }
}
/* MODO REPOSITORIO GLOBAL */
.catalog-view { display: none; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.catalog-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 1.2rem; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: inherit; }
.catalog-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(57,255,20,0.1); }
.cc-header { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 0.5rem; }
.cc-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.2rem; color: var(--text); }
.cc-alias { font-family: var(--mono); font-size: 0.85rem; color: var(--amber); margin-bottom: 1rem; }
.cc-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; border-top: 1px solid #262626; padding-top: 0.8rem; margin-top: auto; }
.cc-type { text-transform: uppercase; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.cc-status { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.cc-status.pending { color: var(--amber); }

/* MODO DETALLE DEL COMPONENTE */
.detail-view { display: none; }
.main-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; margin-top: 1rem; align-items: start; }
@media(max-width:900px){ .main-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* COLUMNA VISUAL (IZQUIERDA) */
.visual-wrapper { position: sticky; top: 5.5rem; }
.img-container { width: 100%; aspect-ratio: 4/3; background: #050505; border: 1px solid var(--border); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.img-container img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.badge { position: absolute; font-family: var(--mono); font-size: .75rem; padding: .3rem .6rem; border: 1px solid transparent; text-transform: uppercase; }
.badge-tl { top: 1rem; left: 1rem; border-color: var(--border); background: rgba(13,13,13,0.8); color: var(--muted); }
.badge-tr { top: 1rem; right: 1rem; background: rgba(57,255,20,0.15); border-color: var(--accent); color: var(--accent); font-weight: bold; }

/* BOTONES DE ACCIÓN */
.action-zone { margin-top: 1rem; display: flex; gap: 1rem; }
.btn { flex: 1; background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: .8rem; font-family: var(--mono); font-size: .85rem; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: .5rem; transition: all .15s ease; text-decoration: none; border-radius: 2px; }
.btn:hover { background: var(--surface2); border-color: var(--text); }
.btn-primary { background: rgba(57,255,20,0.08); border-color: var(--accent); color: var(--accent); font-weight: bold; }
.btn-primary:hover { background: rgba(57,255,20,0.15); border-color: var(--accent); box-shadow: 0 0 10px rgba(57,255,20,0.2); }
.btn-youtube { background: rgba(255, 0, 51, 0.08); border-color: var(--yt-red); color: var(--yt-red); font-weight: bold; display: none; }
.btn-youtube:hover { background: rgba(255, 0, 51, 0.18); border-color: var(--yt-red); box-shadow: 0 0 10px rgba(255, 0, 51, 0.3); color: #FF3355; }

/* COLUMNA LOGÍSTICA DE DATOS (DERECHA) */
.eyebrow { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; margin-bottom: .4rem; }
h1 { font-size: 2.4rem; font-weight: 400; letter-spacing: -0.5px; line-height: 1.1; margin-bottom: .4rem; }
.subtitle { font-family: var(--mono); font-size: .95rem; color: var(--amber); margin-bottom: 1.5rem; }
.variant-box { background: var(--surface); border-left: 3px solid var(--amber); padding: 1rem; margin-bottom: 1.5rem; }
.variant-label { font-family: var(--mono); font-size: .85rem; color: var(--text); font-weight: bold; margin-bottom: .3rem; }
.variant-note { font-size: .85rem; color: var(--muted); line-height: 1.4; }
.description { font-size: .95rem; color: rgba(240,240,232,0.85); line-height: 1.6; margin-bottom: 1.8rem; }

/* BLOQUE CENTRAL INFOGRÁFICO */
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 1.8rem; }
.fact-item { background: var(--bg); padding: 1rem; }
.fact-label { font-family: var(--mono); font-size: .70rem; color: var(--muted); text-transform: uppercase; margin-bottom: .3rem; }
.fact-value { font-size: 1rem; font-weight: 500; color: var(--text); }

/* SUBSECCIONES COMPLEMENTARIAS */
.section-title { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: .8rem; border-bottom: 1px solid #222; padding-bottom: .3rem; }
.peripherals { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.tag { background: var(--surface); border: 1px solid var(--border); padding: .3rem .7rem; font-size: .8rem; border-radius: 2px; color: rgba(240,240,232,0.9); }
.collection-status { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .8rem; background: rgba(30,30,30,0.5); padding: .4rem .8rem; border: 1px solid var(--border); }
.status-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); }
.status-dot.pending { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* VARIANTES INTERCONECTADAS */
.related-section { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-title { font-family: var(--mono); font-size: 1rem; color: var(--text); margin-bottom: 1.2rem; }
.related-title span { color: var(--muted); font-size: .8rem; font-weight: normal; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.related-card { background: var(--surface); border: 1px solid var(--border); padding: 1rem; position: relative; cursor: pointer; }
.related-card:hover:not(.current) { border-color: var(--amber); }
.related-card.current { border-color: var(--accent); background: rgba(57,255,20,0.02); cursor: default; }
.rc-variant { font-family: var(--mono); font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.rc-alias { font-size: .95rem; font-weight: 500; margin-bottom: .5rem; }
.rc-year { font-family: var(--mono); font-size: .8rem; color: var(--amber); }

/* POPUP EMULADOR DE TERMINAL */
#overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5,5,5,0.85); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 100; padding: 1.5rem; }
#overlay.open { opacity: 1; pointer-events: all; }
.terminal-window { width: 100%; max-width: 650px; background: #0A0F0D; border: 1px solid var(--accent); box-shadow: 0 0 30px rgba(57,255,20,0.15); display: flex; flex-direction: column; }
.terminal-header { background: rgba(57,255,20,0.08); border-bottom: 1px solid var(--accent); padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.terminal-title { font-family: var(--mono); font-size: .8rem; color: var(--accent); letter-spacing: 1px; flex-grow: 1; }
.terminal-close { background: none; border: none; color: var(--accent); font-family: var(--mono); font-size: 1.1rem; cursor: pointer; padding: 0 .3rem; opacity: .7; }
.terminal-close:hover { opacity: 1; }

/* --- CUERPO DEL POPUP DETALLE (ESTÁTICO Y DE LECTURA CÓMODA) --- */
/* --- CUERPO DEL POPUP DETALLE (LECTURA COMODA Y FORMATO DE FÁBRICA RECOBRADO) --- */
.terminal-body {
  padding: 1.5rem;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  background-color: #0A0F0D !important; /* Tu fondo oscuro original */
  box-sizing: border-box;
}

/* Forzamos que todos los elementos usen tu fuente mono limpia, sin parpadeos ni brillos molestos */
.terminal-body p, 
.terminal-body div, 
.terminal-body td, 
.terminal-body span,
.terminal-body li,
.terminal-body h1,
.terminal-body h2,
.terminal-body h3 {
  font-family: var(--mono) !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.5px;
  line-height: 1.5 !important;
  text-shadow: none !important;
  animation: none !important;
}

/* 🌟 RESTAURACIÓN DE TUS CLASES ORIGINALES PARA LA TABLA DE DATOS */
.terminal-body .spec-row {
  display: flex;
  justify-content: space-between;
  padding: .25rem 0;
  border-bottom: 1px dashed rgba(57,255,20,0.15); /* Tu línea punteada fósforo */
}

.terminal-body .spec-key {
  color: var(--accent) !important;
  opacity: .7 !important; /* Izquierda: Texto fósforo atenuado */
}

.terminal-body .spec-val {
  color: #fff !important; /* Derecha: Valor en blanco brillante */
  text-align: right !important; /* Justificado a la derecha */
  max-width: 65%;
}


    /* --- CONFIGURACIÓN PARA EL BOTÓN REAL DE YOUTUBE --- */
    .btn-youtube { 
      background: rgba(255, 0, 51, 0.08) !important; 
      border: 1px solid var(--yt-red) !important; /* Asegura el grosor del borde idéntico al verde */
      color: var(--yt-red) !important; 
      font-family: var(--mono) !important; /* Fuerza a usar tu tipografía retro de consola */
      font-size: .85rem !important; /* Iguala el tamaño de fuente al botón de Specs */
      text-transform: uppercase;
      letter-spacing: 1px;
      cursor: pointer;
      display: none; /* JavaScript cambiará esto a 'inline-flex' si detecta vídeo */
      align-items: center;
      justify-content: center;
      gap: .5rem;
      padding: .8rem;
      border-radius: 2px;
      outline: none;
    }
    .btn-youtube:hover { 
      background: rgba(255, 0, 51, 0.18) !important; 
      border-color: var(--yt-red) !important; 
      box-shadow: 0 0 10px rgba(255, 0, 51, 0.3); 
      color: #FF3355 !important; 
    }


/* ===================================================
   SOPORTES FÍSICOS RETRO (CARTUCHO, DISQUETE, CASSETTE)
   =================================================== */
.game-media {
  position: relative;
  width: 100%;
  height: 145px;
  border-radius: 6px;
  padding: 12px;
  font-family: var(--mono);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset -2px -2px 0px rgba(0,0,0,0.4), inset 2px 2px 0px rgba(255,255,255,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.game-media:hover {
  transform: translateY(-4px);
  box-shadow: 0px 8px 15px rgba(0,0,0,0.5), inset -2px -2px 0px rgba(0,0,0,0.4), inset 2px 2px 0px rgba(255,255,255,0.2);
}
/* ETIQUETA ADHESIVA INTERNA */
.media-label {
  background: #FFFFFF;
  color: #000000;
  padding: 6px 8px;
  border-radius: 3px;
  border-left: 5px solid var(--accent); /* Corregida variable a --accent */
  display: flex;
  flex-direction: column;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  z-index: 2;
}
.media-genre { font-size: 0.65rem; color: #666666; font-weight: bold; }
.media-title { font-size: 0.9rem; font-weight: bold; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-year { font-size: 0.7rem; text-align: right; color: #444444; }
/* 1. DISEÑO CARTUCHO PLÁSTICO (GRIS NES) */
.game-media.cartucho {
  background: #555555 !important; 
  border: 2px solid #333333;
}
.game-media.cartucho::before {
  content: "";
  position: absolute;
  bottom: 0; left: 10%; right: 10%; height: 25px;
  background: repeating-linear-gradient(90deg, #222222, #222222 5px, transparent 5px, transparent 14px);
  opacity: 0.8;
  z-index: 1;
}

/* 2. DISEÑO DISQUETE 3.5" (NEGRO MUESCA) */
.game-media.disquete {
  background: #151515 !important; 
  border: 2px solid #000000;
  border-top-right-radius: 24px; /* Esquina cortada del disquete */
}
.game-media.disquete::after {
  content: "";
  position: absolute;
  bottom: 0; right: 25px; width: 45px; height: 32px;
  background: #888888; /* Lámina metálica protectora */
  border-radius: 2px 2px 0 0;
  box-shadow: inset -1px 0 0 #fff, inset 0 1px 0 #fff;
  z-index: 1;
}

/* 3. DISEÑO CASSETTE COMPACTO */
.game-media.cassette {
  background: #222222 !important;
  border: 3px solid #111111;
}
.game-media.cassette::before {
  content: "⚙️   ⚙️";
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 12px; left: 50%; transform: translateX(-50%);
  width: 75px; height: 22px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: rgba(255,255,255,0.4);
  z-index: 1;
  letter-spacing: 12px;
  padding-left: 12px;
}
    .sys-footer { border-top: 1px solid var(--border); padding: 1.5rem 2rem; margin-top: auto; background: #0A0A0A; }
    .footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
    .footer-status { color: var(--accent); text-shadow: 0 0 5px rgba(57,255,20,0.4); }
    @media(max-width:650px){ .footer-content { flex-direction: column; gap: 0.5rem; text-align: center; } }

/* Contenedor principal del pie de página */
.retro-terminal-footer {
  background-color: #000000;
  font-family: 'Courier New', Courier, monospace;
  padding: 50px 20px 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

/* Línea divisoria superior estilo consola */
.footer-divider {
  width: 100%;
  max-width: 800px;
  border-top: 2px dashed #00ff00;
  margin-bottom: 25px;
}

/* Estado de la terminal (Texto Ámbar) */
.terminal-status {
  color: #ffb000;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 30px;
}

.amber-text {
  color: #ffb000;
  font-weight: bold;
}

/* Zona central de propina */
.donation-container {
  max-width: 600px;
  margin-bottom: 40px;
}

.donation-text {
  color: #a0a0a0; /* Gris claro para que el botón resalte más */
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Estilo del botón Cyberpunk para el Footer */
.btn-cyberpunk-footer {
  display: inline-block;
  font-weight: bold;
  font-size: 16px;
  color: #00ff00;
  background-color: #000000;
  text-decoration: none;
  padding: 14px 28px;
  border: 2px solid #00ff00;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.4), inset 0 0 8px rgba(0, 255, 0, 0.2);
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.6);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.btn-cyberpunk-footer:hover {
  color: #000000;
  background-color: #00ff00;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
  text-shadow: none;
}

/* Animación del cursor parpadeante '>' */
.btn-cyberpunk-footer .blink-cursor {
  animation: footerCursorBlink 1s infinite;
  margin-right: 8px;
}

@keyframes footerCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 🌟 CURSOR UNIVERSAL RETRO BLINDADO - CON ACELERACIÓN DE HARDWARE NATIVA */
/* 🌟 CURSOR UNIVERSAL INDESTRUCTIBLE - CONMUTADOR DE VISIBILIDAD CRUCIAL */
.blink-cursor-universal {
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 4px;
  vertical-align: middle;
  background: #ffb000 !important; /* Ámbar de fábrica */
  animation: latido-indestructible 1s infinite steps(2) !important;
}

/* El pie de página reutilizará la misma animación pero forzando su color verde neón */
.blink-cursor-verde {
  display: inline-block;
  width: 4px;
  height: 10px;
  margin-left: 4px;
  vertical-align: middle;
  background: var(--accent, #00ff33) !important;
  animation: latido-indestructible 1s infinite steps(2) !important;
}

@keyframes latido-indestructible {
  0%, 49% { visibility: visible; }
  50%, 100% { visibility: hidden; }
}

/* Texto de copyright / firmware al final de todo */
.terminal-firmware {
  color: #444444; /* Gris oscuro, simula un comentario de código */
  font-size: 11px;
  letter-spacing: 1px;
}

/* Estilo base del botón retro-terminal */
.btn-cyberpunk {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace; /* Fuente de terminal */
  font-weight: bold;
  font-size: 16px;
  color: #00ff00; /* Verde Fósforo (Cambiar a #ffb000 si prefieres Ámbar) */
  background-color: #000000; /* Fondo negro puro */
  text-decoration: none;
  padding: 12px 24px;
  border: 2px solid #00ff00; /* Borde verde fósforo */
  text-transform: uppercase;
  letter-spacing: 2px;
  
  /* Efecto de brillo de pantalla CRT */
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5), inset 0 0 10px rgba(0, 255, 0, 0.3);
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

/* 🌟 CURSOR UNIVERSAL RETRO BLINDADO - REUTILIZA TU ANIMACIÓN NATIVA */
.blink-cursor-universal {
  animation: footerCursorBlink 1s infinite !important;
}


/* Efecto al pasar el ratón (Hover) */
.btn-cyberpunk:hover {
  color: #000000;
  background-color: #00ff00; /* Invierte los colores al estilo selección de terminal */
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.9);
  text-shadow: none;
}

/* Animación de parpadeo para el cursor '>' */
.btn-cyberpunk .prompt {
  animation: parpadeo 1s infinite;
  margin-right: 5px;
}

@keyframes parpadeo {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

    /* --- CONFIGURACIÓN DE TARJETA CON MINIATURA --- */
    .catalog-card { 
      display: flex !important; 
      flex-direction: row !important; /* Coloca la foto a la izquierda y los textos a la derecha */
      gap: 1rem; 
      align-items: center; 
      padding: 1rem; 
    }
    .cc-thumb-wrapper {
      width: 80px;
      height: 80px;
      flex-shrink: 0;
      background: #050505;
      border: 1px solid var(--border);
      border-radius: 4px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .cc-thumb-img {
      max-width: 100% !important; /* Limita el ancho al contenedor de 80px */
      max-height: 100% !important; /* Limita el alto al contenedor de 80px */
      width: auto !important; /* Mantiene la proporción original del logo */
      height: auto !important; /* Mantiene la proporción original del logo */
      object-fit: contain; /* Encaja la imagen limpiamente sin recortarla */
      padding: 6px; /* Deja un margen elegante para que respire el logotipo */
    }
    /* Contenedor para que el texto ocupe el resto de la tarjeta */
    .cc-info-wrapper {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100%;
      min-width: 0; /* Evita que textos largos rompan el grid */
    }

    input::placeholder, textarea::placeholder { color: rgba(255, 184, 0, 0.4) !important; font-family: var(--mono); }

    /* --- ANIMACIÓN KEYFRAMES CORREGIDA Y FORZADA --- */
    @keyframes verticalScroll {
      0% { transform: translateY(0); }
      40% { transform: translateY(0); }         /* Pausa fija en la Línea 1 */
      45% { transform: translateY(-36px); }     /* Desplazamiento fluido hacia arriba */
      85% { transform: translateY(-36px); }     /* Pausa fija en la Línea 2 */
      100% { transform: translateY(-72px); }    /* Salto final al duplicado para reiniciar */
    }

 /* Optimización de visualización en pantallas móviles */
    @media(max-width: 900px) {
      .retro-ticker-container { display: none !important; } /* Esconde el banner en pantallas muy pequeñas para evitar amontonamientos */
    }

    /* --- ARQUITECTURA DE CABECERA EN DOS FILAS --- */
    .main-header {
      width: 100%;
      background: #0A0F0D;
      border-bottom: 1px solid var(--border);
    }
    .header-container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0.8rem 2rem;
      display: flex;
      flex-direction: column;
      gap: 0.8rem; /* Separación exacta entre la fila de arriba y el banner */
    }
    .header-row-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
    }
    .header-row-bottom {
      width: 100%;
    }
    .btn-author-trigger {
      background: none; 
      border: 1px dashed var(--amber); 
      color: var(--amber); 
      font-family: var(--mono); 
      font-size: 0.75rem; 
      padding: 0.1rem 0.5rem; 
      cursor: pointer; 
      border-radius: 2px; 
      text-shadow: 0 0 4px rgba(255,184,0,0.4);
    }

    /* --- CONTENEDOR DEL BANNER SEGUNDA FILA --- */
    /* --- CONTENEDOR DEL BANNER SEGUNDA FILA --- */
    .retro-ticker-container {
      width: 100%;
      height: 36px;
      overflow: hidden;
      background: #020403; /* Fondo negro ultra profundo */
      border: 1px solid var(--border);
      border-radius: 2px;
      position: relative;
      box-sizing: border-box;
    }

    /* EFECTO MATRIX / CRT: Rejilla física de barrido superpuesta ante el texto */
    .retro-ticker-container::after {
      content: " ";
      display: block;
      position: absolute;
      top: 0; left: 0; bottom: 0; right: 0;
      /* Dibuja líneas negras horizontales muy marcadas cada 2 píxeles */
      background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.7) 50%), 
                  linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
      background-size: 100% 2px, 3px 100%;
      /* Asegura que las líneas queden por encima de las letras pero dejen leer */
      pointer-events: none; 
      z-index: 10;
    }
    .retro-ticker-wrapper {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      display: block;
      height: 144px; /* 🌟 ACTUALIZADO: 4 líneas × 36px para dar cabida a la 3ª + Duplicado */
      animation: 
        verticalScrollAbsolute 15s infinite ease-in-out, /* 🌟 RECOMENDADO: Sube a 15s para dar 4s por línea */
        crtBrightnessFlicker 0.15s infinite alternate,
        videoSignalGlitch 6s infinite linear;
    }
    .ticker-text-line {
      height: 36px;
      line-height: 36px; /* Centrado vertical exacto para la nueva fuente */
      margin: 0;
      padding: 0 1rem;
      /* Aplicamos la nueva tipografía retro de tubo CRT */
      font-family: 'VT323', monospace; 
      font-size: 1.25rem; 
      /* Un ligero efecto de brillo neón para enfatizar los puntos del fósforo */
      text-shadow: 0 0 5px rgba(255, 184, 0, 0.6); 
      color: var(--amber);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      box-sizing: border-box;
      letter-spacing: 0.5px; /* Separación de caracteres estilo pantalla digital */
    }
    .ticker-text-line.text-muted { color: var(--muted); }
    .ticker-text-line.text-error { color: var(--yt-red); }

    /* --- ANIMACIÓN ABSOLUTA EN PÍXELES RECALIBRADA PARA 3 LÍNEAS (REPARADO COLOFÓN) --- */
    @keyframes verticalScrollAbsolute {
      /* 📺 LÍNEA 1: Se muestra del 0% al 28% (~4.2 segundos de exposición) */
      0% { top: 0px; }
      28% { top: 0px; }
      
      /* 🔄 TRANSICIÓN FLUIDA HACIA LA LÍNEA 2 */
      33% { top: -36px; }
      
      /* 📺 LÍNEA 2: Se muestra del 33% al 61% (~4.2 segundos de exposición) */
      61% { top: -36px; }
      
      /* 🔄 TRANSICIÓN FLUIDA HACIA LA LÍNEA 3 */
      66% { top: -72px; }
      
      /* 📺 LÍNEA 3: Se muestra del 66% al 94% (~4.2 segundos de exposición) ¡AHORA SÍ AGUANTA! */
      94% { top: -72px; }
      
      /* 🔄 TRANSICIÓN RÁPIDA FINAL AL DUPLICADO PARA REINICIO INFINITO INVISIBLE */
      100% { top: -108px; }
    }

    /* 2. EFECTO FLICKER: Micro-oscilación constante en el brillo del fósforo */
    @keyframes crtBrightnessFlicker {
      0%   { opacity: 0.96; filter: drop-shadow(0 0 4px rgba(255,184,0,0.7)); }
      50%  { opacity: 1.00; filter: drop-shadow(0 0 7px rgba(255,184,0,0.9)); }
      100% { opacity: 0.95; filter: drop-shadow(0 0 3px rgba(255,184,0,0.6)); }
    }

    /* 3. INTERFERENCIA DE VÍDEO (GLITCH): Pequeños saltos de estática aleatorios */
    @keyframes videoSignalGlitch {
      0%   { transform: skew(0deg) scaleY(1); }
      92%  { transform: skew(0deg) scaleY(1); }
      93%  { transform: skew(4deg) scaleY(1.05); opacity: 0.7; } /* Distorsión rápida */
      94%  { transform: skew(-3deg) scaleY(0.95); }
      95%  { transform: skew(0deg) scaleY(1); }
      98%  { transform: skew(0deg) scaleY(1); }
      99%  { transform: skew(-5deg) opacity: 0.6; } /* Micro-corte de señal */
      100% { transform: skew(0deg) scaleY(1); }
    }

/* 🔒 ESCUDO DE PROPIEDAD INTELECTUAL: Desactiva la selección de textos e imágenes */
body, p, span, div, h1, h2, h3, img {
    -webkit-user-select: none;  /* Safari */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* IE/Edge */
    user-select: none;          /* Estándar universal */
}

/* 🕹️ CONTENEDORES MAESTROS PARA LOS ECOSISTEMAS DE HARDWARE */
/* 📊 ARQUITECTURA DE ECOSISTEMA DE HARDWARE EN MODO CIRCUITO INTERACTIVO */
.ecosystem-diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    margin-top: 1.5rem;
}

/* Tarjeta Central del Sistema: Grande, presidiendo el mapa */
.eco-node-main {
    max-width: 450px;
    width: 100%;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(255, 184, 0, 0.05);
}

/* Rejilla de Periféricos Satélites (Abajo) */
.eco-satellites-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

/* Flechas conectoras de circuito estilo terminal ciberpunk */
.eco-circuit-arrow {
    font-family: var(--mono);
    color: var(--amber);
    font-size: 1.2rem;
    opacity: 0.5;
    margin: -0.5rem 0;
    text-shadow: 0 0 5px var(--amber);
    animation: ecoPulse 2s infinite ease-in-out;
}

@keyframes ecoPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* 🔼 BOTÓN FLOTANTE INTERACTIVO BACK-TO-TOP */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--amber);
    color: var(--amber);
    font-family: var(--mono), monospace;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.1);
    z-index: 9999; /* Se asegura de flotar por encima de la urna 360 e iframes */
    display: none; /* Arranca invisible por defecto */
    transition: all 0.2s ease-in-out;
    border-radius: 2px;
}

.scroll-top-btn:hover {
    background: var(--amber);
    color: #000;
    box-shadow: 0 0 15px var(--amber);
    transform: translateY(-2px);
}

/* 📟 LOG_HISTÓRICO_SYS: TERMINAL DE CRÓNICAS Y ANÉCDOTAS */
.retro-chronicle-terminal {
    background-color: #030303;
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 2px;
    padding: 1.2rem;
    height: 250px; /* Altura estricta delimitada */
    overflow-y: auto; /* Scroll vertical independiente */
    font-family: var(--mono), monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
    white-space: pre-wrap; /* Respeta los saltos de línea de tu archivo TXT */
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
}

/* Personalización ciberpunk del scrollbar de la crónica */
.retro-chronicle-terminal::-webkit-scrollbar {
    width: 6px;
}
.retro-chronicle-terminal::-webkit-scrollbar-track {
    background: #000;
}
.retro-chronicle-terminal::-webkit-scrollbar-thumb {
    background: rgba(255, 184, 0, 0.3);
    border-radius: 2px;
}
.retro-chronicle-terminal::-webkit-scrollbar-thumb:hover {
    background: var(--amber);
}

/* 🖼️ VITRINA MULTIMEDIA: INTERRUPTOR Y CARRUSEL DE IMÁGENES DENTRO DE DETALLE */
.bunker-carousel-container {
    width: 100%;
    position: relative;
    background: #050505;
    border: 1px solid rgba(255, 184, 0, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

/* Área de proyección de la foto activa */
.carousel-main-viewport {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.carousel-main-viewport img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.8));
    transition: opacity 0.2s ease-in-out;
}

/* Carril horizontal inferior de miniaturas (*Thumbnails*) */
.carousel-thumbs-strip {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem;
    background: #000;
    border-top: 1px dashed rgba(255, 184, 0, 0.1);
    overflow-x: auto;
}

.carousel-thumb-node {
    width: 60px;
    height: 60px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 2px;
    background: #0a0a0a;
    box-sizing: border-box;
    transition: all 0.2s;
    flex-shrink: 0;
}

.carousel-thumb-node:hover, .carousel-thumb-node.active {
    border-color: var(--amber);
    box-shadow: 0 0 8px var(--amber);
    transform: translateY(-1px);
}

.carousel-thumb-node img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================================================================
   📟 CIRCUIT_SCROLL.SYS: PERSONALIZACIÓN NEÓN DE LA BARRA DEL TIMELINE
   ========================================================================= */

/* 1. Diseñamos las dimensiones de la barra (Altura estricta controlada) */
#retro-timeline-wrapper::-webkit-scrollbar {
    height: 6px; /* Una línea muy fina y elegante para que no sature la vista */
    background: #000000; /* Fondo negro ultra profundo a juego con el búnker */
}

/* 2. El raíl de fondo (La pista por donde corre el cursor) */
#retro-timeline-wrapper::-webkit-scrollbar-track {
    background: #020403; 
    border-top: 1px dashed rgba(255, 184, 0, 0.1); /* Micro-línea de bus de datos */
}

/* 3. El cursor deslizable (El fósforo neón que arrastramos con el ratón) */
#retro-timeline-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 184, 0, 0.25); /* Ámbar atenuado en reposo */
    border-radius: 2px;
    box-shadow: inset 0 0 4px rgba(255, 184, 0, 0.1);
    transition: background 0.2s ease-in-out;
}

/* 4. Efecto interactivo: Se ilumina a máxima potencia de fósforo al pasar el ratón */
#retro-timeline-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--amber); /* Ámbar neón puro */
    box-shadow: 0 0 10px var(--amber); /* Destello neón CRT */
}

/* =========================================================================
   🎛️ CONTROLES_DE_ACCESO.SYS: BOTONERA DE ANCLAS DE PORTADA (VERDE NEÓN)
   ========================================================================= */
.retro-anchors-console {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0.1rem 0.5rem 0.2rem 0.5rem !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

@media (max-width: 900px) {
    .retro-anchors-console {
        justify-content: flex-start !important;
        width: max-content !important;
    }
}

/* Delimitación perfecta entre el banner y el catálogo en ordenadores */
@media (min-width: 901px) {
    .header-row-bottom {
        margin-bottom: 1.2rem !important;
    }
}

.anchor-btn-node {
    background: rgba(0, 5, 2, 0.85) !important;
    border: 1px solid rgba(57, 255, 20, 0.3) !important;  /* 🟢 Borde verde fósforo blindado */
    color: rgba(57, 255, 20, 0.7) !important;   /* 🟢 Texto verde fósforo blindado */
    font-family: var(--mono), monospace;
    font-size: 0.68rem !important;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.7rem !important;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 4px rgba(57, 255, 20, 0.05) !important;
    flex-shrink: 0 !important;
}

.anchor-btn-node:hover {
    background: rgba(57, 255, 20, 0.1) !important;
    border-color: #39ff14 !important; /* 🟢 Verde brillante interactivo */
    color: #39ff14 !important;
    text-shadow: 0 0 8px #39ff14 !important;
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* Efecto de desplazamiento suave nativo */
html {
    scroll-behavior: smooth;
}

/* =========================================================================
   📟 MOBILE_GEOMETRY.SYS: COMPACTACIÓN DE PORTADA EN PANTALLAS TÁCTILES (DEFINITIVA)
   ========================================================================= */
@media (max-width: 768px) {
    /* 1. Reseteamos el margen del catálogo general para que las tarjetas suban */
    #catalog-grid {
        margin-top: 0.5rem !important; 
        padding-top: 0 !important;
    }
    
    /* 2. Forzamos a todos los pabellones de marcas a pegarse de forma compacta en fila india */
    .pabellon-seccion {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* 3. El colchón de aire controlado para que el búnker libre la cabecera fija alta */
    #sys-welcome-bunker { 
        margin-top: 14.5rem !important; /* Lo restauramos a su valor de gala original */
        padding-top: 0 !important;
    }

    /* 4. Recortamos el relleno inferior del timeline en móviles */
    #retro-timeline-wrapper {
        padding-bottom: 0 !important; 
        margin-bottom: 0 !important;
    }

    /* 5. 🚀 LA JUGADA MAESTRA: Identificamos la sección de la línea de tiempo que está 
          justo antes del búnker y le destruimos radicalmente sus márgenes de fábrica */
    #sys-welcome-bunker {
        clear: both !important;
    }
    
    /* Forzamos a cualquier section, div o elemento previo al búnker a perder su colchón inferior */
    #sys-welcome-bunker,
    #sys-welcome-bunker-placeholder {
        position: relative;
    }
    
    section:has(#retro-timeline-wrapper),
    div:has(#retro-timeline-wrapper) {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}


/* =========================================================================
   🔒 ANCHORS_STANDBY.SYS: MODO SUSPENSIÓN DE BOTONERA (BLINDAJE TOTAL)
   ========================================================================= */
.anchors-standby-mode {
    pointer-events: none !important;
    cursor: default !important;
}

/* Forzamos el apagado radical superando cualquier herencia del móvil */
.anchors-standby-mode .anchor-btn-node {
    background: rgba(10, 15, 12, 0.4) !important; 
    border: 1px solid rgba(57, 255, 20, 0.08) !important; 
    color: rgba(57, 255, 20, 0.15) !important; /* Fósforo gastado y apagado */
    text-shadow: none !important;
    box-shadow: none !important;
    pointer-events: none !important;     
    opacity: 0.25 !important; /* 🌟 ATENUACIÓN AGRESIVA PARA PANTALLA TÁCTIL */
    transform: none !important;
}

.anchors-standby-mode .anchor-btn-node:hover {
    background: rgba(10, 15, 12, 0.4) !important;
    border-color: rgba(57, 255, 20, 0.08) !important;
    color: rgba(57, 255, 20, 0.15) !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
}
