/* =====================================================
   RETROS — El Museo del Videojuego Clásico
   Estética: CRT scan + neón + pixel art + oscuro
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --neon-blue:   #00aaff;
  --neon-cyan:   #00ffcc;
  --neon-pink:   #ff00aa;
  --neon-yellow: #ffdd00;
  --dark:        #020a12;
  --dark2:       #050f1e;
  --dark3:       #08172b;
  --glass:       rgba(0, 20, 50, 0.75);
  --glass2:      rgba(0, 30, 70, 0.85);
  --border:      rgba(0, 150, 255, 0.35);
  --border2:     rgba(0, 200, 255, 0.6);
  --text:        #cce6ff;
  --text-dim:    rgba(180, 220, 255, 0.6);
  --font-pixel:  'Press Start 2P', monospace;
  --font-orb:    'Orbitron', sans-serif;
  --font-mono:   'Share Tech Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── FONDO CRT ── */
#fondo {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,60,120,0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0,40,100,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(0,80,60,0.2) 0%, transparent 50%),
    linear-gradient(180deg, #010810 0%, #020a18 50%, #010810 100%);
}

#scanlines {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; opacity: 0.03;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: rgba(2, 10, 18, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px; height: 60px;
}

.nav-brand { display: flex; align-items: center; gap: 10px; }

.pixel-dot {
  width: 10px; height: 10px;
  background: var(--neon-cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-logo {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px var(--neon-cyan);
  letter-spacing: 4px;
}

.nav-tagline {
  font-size: 11px; color: var(--text-dim);
  display: none;
}
@media(min-width:768px){ .nav-tagline { display: block; } }

.nav-links { display: flex; gap: 4px; }

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-orb);
  font-size: 11px; font-weight: 700;
  padding: 6px 14px; border-radius: 6px;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.nav-link:hover { color: var(--neon-blue); background: rgba(0,150,255,0.1); }
.nav-cta {
  background: rgba(0,150,255,0.15);
  border: 1px solid var(--border);
  color: var(--neon-blue);
}
.nav-cta:hover { background: rgba(0,150,255,0.3); box-shadow: 0 0 16px rgba(0,150,255,0.4); }

.nav-toggle { display: none; background: none; border: none; color: var(--neon-blue); font-size: 20px; cursor: pointer; }
@media(max-width:640px){
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ── HERO ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 100px 40px 60px;
  position: relative; overflow: hidden;
}

.hero-scan {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,150,255,0.015) 2px,
    rgba(0,150,255,0.015) 4px
  );
}

.hero-content { position: relative; z-index: 1; max-width: 680px; }

.hero-year {
  font-family: var(--font-pixel);
  font-size: 9px; letter-spacing: 3px;
  color: var(--neon-cyan);
  margin-bottom: 20px;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-pixel);
  line-height: 1.4;
  margin-bottom: 10px;
}

.pixel-text {
  font-size: clamp(24px, 5vw, 48px);
  color: #fff;
  text-shadow: 0 0 30px rgba(0,200,255,0.5), 2px 2px 0 var(--neon-blue);
}

.hero-sub {
  font-family: var(--font-orb);
  font-size: clamp(14px, 3vw, 22px);
  color: var(--neon-cyan);
  text-shadow: 0 0 20px var(--neon-cyan);
  letter-spacing: 6px;
  font-weight: 400;
}

.hero-desc {
  font-size: 14px; color: var(--text-dim);
  margin: 24px 0 32px;
  max-width: 500px; line-height: 1.8;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 50px; }

.btn-primary {
  font-family: var(--font-orb);
  font-size: 12px; font-weight: 900;
  letter-spacing: 2px;
  padding: 14px 28px;
  background: var(--neon-blue);
  color: #000; border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 0 24px rgba(0,150,255,0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(0,150,255,0.9); }

.btn-secondary {
  font-family: var(--font-orb);
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--neon-cyan); border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(0,200,255,0.1); transform: translateY(-2px); }

.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--font-orb); font-size: 28px; font-weight: 900; color: var(--neon-yellow); text-shadow: 0 0 16px var(--neon-yellow); }
.stat-label { font-size: 10px; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; }

.hero-sprite { position: absolute; right: 60px; bottom: 80px; z-index: 1; opacity: 0.6; }
.pixel-art { font-size: clamp(16px, 2.5vw, 28px); line-height: 1.1; }

/* ── SECCIONES ── */
.contenedor { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.section-buscador,
.section-historia,
.section-consolas,
.section-juegos,
.section-guias { padding: 80px 0; }

.section-historia { background: rgba(0,8,20,0.6); }
.section-guias { background: rgba(0,8,20,0.5); }

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(12px, 2vw, 18px);
  color: var(--neon-cyan);
  text-shadow: 0 0 14px var(--neon-cyan);
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.section-desc {
  color: var(--text-dim); font-size: 13px;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

/* ── BUSCADOR ── */
.buscador-panel {
  background: var(--glass2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 40px rgba(0,150,255,0.2);
}

#buscador-input {
  width: 100%; padding: 14px 20px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-radius: 10px; color: #fff;
  font-family: var(--font-mono); font-size: 14px;
  outline: none; margin-bottom: 20px;
  transition: border 0.2s;
}
#buscador-input:focus { border-color: var(--neon-blue); box-shadow: 0 0 16px rgba(0,150,255,0.3); }

.chips-group { margin-bottom: 14px; }
.chips-label { font-size: 10px; letter-spacing: 3px; color: var(--text-dim); margin-bottom: 8px; font-family: var(--font-orb); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(0,30,70,0.6);
  font-size: 11px; font-family: var(--font-mono);
  color: var(--text-dim); cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.chip:hover, .chip.activo {
  background: rgba(0,150,255,0.25);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 12px rgba(0,150,255,0.4);
}

.resultados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-top: 24px;
}

.resultado-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
  transition: all 0.2s; cursor: pointer;
}
.resultado-card:hover { border-color: var(--neon-blue); box-shadow: 0 0 20px rgba(0,150,255,0.3); transform: translateY(-2px); }
.resultado-card h4 { font-family: var(--font-orb); font-size: 12px; color: #fff; margin-bottom: 6px; }
.resultado-card p { font-size: 11px; color: var(--text-dim); margin-bottom: 10px; }
.resultado-card a { font-size: 11px; color: var(--neon-cyan); text-decoration: none; font-family: var(--font-orb); }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 20px; }

.timeline::before {
  content: '';
  position: absolute; left: 60px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-blue), var(--neon-pink));
  opacity: 0.5;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  margin-bottom: 40px;
  position: relative;
}

.timeline-marker {
  font-family: var(--font-pixel);
  font-size: 9px; color: var(--neon-yellow);
  text-align: right; padding-top: 16px;
  position: relative;
}
.timeline-marker::after {
  content: '';
  position: absolute; right: -13px; top: 20px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan);
}

.timeline-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  transition: all 0.3s;
}
.timeline-card:hover { border-color: var(--neon-blue); box-shadow: 0 0 24px rgba(0,150,255,0.25); }

.timeline-era {
  font-family: var(--font-pixel);
  font-size: 8px; color: var(--neon-pink);
  letter-spacing: 2px; margin-bottom: 8px;
}
.timeline-card h3 { font-family: var(--font-orb); font-size: 16px; color: #fff; margin-bottom: 10px; }
.timeline-card p { font-size: 13px; color: var(--text-dim); line-height: 1.7; margin-bottom: 12px; }
.timeline-tag { font-size: 10px; color: var(--neon-cyan); opacity: 0.7; letter-spacing: 1px; }

/* ── CONSOLAS GRID ── */
.consolas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-bottom: 30px;
}

.consola-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer; transition: all 0.25s;
  position: relative; overflow: hidden;
}
.consola-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,150,255,0.06) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.consola-card:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 30px rgba(0,150,255,0.3);
  transform: translateY(-3px);
}
.consola-card:hover::before { opacity: 1; }

.consola-icon { font-size: 36px; flex-shrink: 0; }
.consola-info { flex: 1; }
.consola-info h3 { font-family: var(--font-orb); font-size: 14px; color: #fff; margin-bottom: 4px; }
.consola-years { font-size: 10px; color: var(--neon-yellow); letter-spacing: 1px; display: block; margin-bottom: 6px; }
.consola-info p { font-size: 11px; color: var(--text-dim); }
.consola-badge {
  font-size: 10px; font-family: var(--font-orb);
  background: rgba(0,150,255,0.2);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 10px;
  color: var(--neon-blue); white-space: nowrap;
}

/* Panel consola */
.panel-consola {
  background: var(--glass2);
  border: 1px solid var(--border2);
  border-radius: 16px; padding: 28px;
  margin-top: 20px;
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panel-header h3 { font-family: var(--font-orb); font-size: 18px; color: var(--neon-cyan); }
.btn-cerrar { background: rgba(255,0,0,0.15); border: 1px solid rgba(255,0,0,0.3); color: #f66; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; transition: all 0.2s; }
.btn-cerrar:hover { background: rgba(255,0,0,0.3); }

.panel-juegos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.pj-card {
  background: rgba(0,20,50,0.7);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
}
.pj-card h4 { font-family: var(--font-orb); font-size: 12px; color: #fff; margin-bottom: 6px; }
.pj-card p { font-size: 11px; color: var(--text-dim); margin-bottom: 10px; }
.pj-card a { font-size: 11px; color: var(--neon-cyan); text-decoration: none; }

/* ── JUEGOS GRID ── */
.juegos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.juego-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  transition: all 0.3s;
}
.juego-card:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 30px rgba(0,150,255,0.3);
  transform: translateY(-4px);
}

.juego-img-wrap { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.juego-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; display: block; }
.juego-card:hover .juego-img-wrap img { transform: scale(1.06); }

.juego-overlay {
  position: absolute; inset: 0;
  background: rgba(0,100,200,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.juego-overlay span {
  font-family: var(--font-pixel);
  font-size: 12px; color: #fff;
  text-shadow: 0 0 10px rgba(0,200,255,0.8);
}
.juego-card:hover .juego-overlay { opacity: 1; }

.juego-info { padding: 16px; }
.juego-info h3 { font-family: var(--font-orb); font-size: 14px; color: #fff; margin-bottom: 8px; }
.juego-meta { display: flex; gap: 8px; margin-bottom: 8px; }

.tag-sistema, .tag-anio {
  font-size: 10px; border-radius: 4px; padding: 2px 8px;
  font-family: var(--font-mono); letter-spacing: 0.5px;
}
.tag-sistema { background: rgba(0,150,255,0.2); color: var(--neon-blue); border: 1px solid rgba(0,150,255,0.3); }
.tag-anio { background: rgba(255,220,0,0.1); color: var(--neon-yellow); border: 1px solid rgba(255,220,0,0.2); }

.juego-info p { font-size: 12px; color: var(--text-dim); line-height: 1.6; margin-bottom: 12px; }
.juego-guia { font-size: 11px; color: var(--neon-cyan); text-decoration: none; font-family: var(--font-orb); transition: color 0.2s; }
.juego-guia:hover { color: #fff; }

/* ── GUÍAS ── */
.guias-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.guia-tab {
  font-family: var(--font-orb);
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0,30,70,0.5);
  color: var(--text-dim); cursor: pointer;
  transition: all 0.2s;
}
.guia-tab:hover, .guia-tab.activo {
  background: rgba(0,150,255,0.2);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
}

.guia-panel {
  background: var(--glass2);
  border: 1px solid var(--border2);
  border-radius: 16px; padding: 32px;
  backdrop-filter: blur(12px);
}

.guia-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.guia-header h2 { font-family: var(--font-orb); font-size: 22px; color: #fff; }
.guia-header .guia-year { font-family: var(--font-pixel); font-size: 10px; color: var(--neon-yellow); }

.guia-secciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

.guia-bloque {
  background: rgba(0,15,40,0.7);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.guia-bloque h4 { font-family: var(--font-orb); font-size: 13px; color: var(--neon-cyan); margin-bottom: 12px; }
.guia-bloque ul { list-style: none; }
.guia-bloque li { font-size: 12px; color: var(--text-dim); padding: 5px 0; border-bottom: 1px solid rgba(0,80,160,0.2); }
.guia-bloque li::before { content: '▸ '; color: var(--neon-blue); }
.guia-bloque li strong { color: var(--neon-yellow); }

.trucos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.truco-card { background: rgba(0,80,0,0.15); border: 1px solid rgba(0,200,100,0.2); border-radius: 8px; padding: 12px; }
.truco-card .truco-nombre { font-family: var(--font-orb); font-size: 11px; color: #00ff88; margin-bottom: 6px; }
.truco-card .truco-codigo { font-family: var(--font-pixel); font-size: 9px; color: var(--neon-yellow); background: rgba(0,0,0,0.4); padding: 6px 10px; border-radius: 4px; margin-bottom: 6px; display: block; letter-spacing: 2px; }
.truco-card p { font-size: 11px; color: var(--text-dim); }

/* ── FOOTER ── */
.footer {
  background: rgba(0,5,15,0.95);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { font-family: var(--font-pixel); font-size: 16px; color: var(--neon-cyan); text-shadow: 0 0 10px var(--neon-cyan); margin-bottom: 12px; }
.footer-col p { font-size: 12px; color: var(--text-dim); line-height: 1.7; }
.footer-col h4 { font-family: var(--font-orb); font-size: 12px; color: var(--neon-blue); letter-spacing: 2px; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 12px; color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--neon-cyan); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-dim); }
.footer-pixel { font-family: var(--font-pixel); font-size: 8px; color: var(--neon-pink); opacity: 0.6; animation: blink 2s steps(1) infinite; }

/* ── RESPONSIVE ── */
@media(max-width:768px){
  .hero { padding: 90px 20px 40px; }
  .hero-sprite { display: none; }
  .timeline { padding-left: 0; }
  .timeline::before { left: 30px; }
  .timeline-item { grid-template-columns: 60px 1fr; gap: 12px; }
  .timeline-marker { font-size: 7px; }
  .guia-panel { padding: 20px; }
}
