/* GAMEZ_RETRO · estilos. Colores principales en :root */
:root {
  color-scheme: dark;
  --bg: #070b1a;
  --bg2: #0c1430;
  --panel: #101b38;
  --panel2: #15234a;
  --line: #24407a;
  --text: #eef3ff;
  --muted: #9fb2d4;
  --yellow: #ffd23f;
  --cyan: #48d9ff;
  --pink: #ff4fa3;
  --radius: 4px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.5;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #ffffff55, transparent),
    radial-gradient(1px 1px at 120px 80px, #ffffff33, transparent),
    radial-gradient(1px 1px at 200px 160px, #48d9ff44, transparent);
  background-size: 240px 200px;
}
main { flex: 1; outline: none; }
a { color: var(--cyan); }
a:hover { color: var(--yellow); }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--yellow); color: #111; padding: 8px 12px; font-weight: 700; }
.skip:focus { top: 8px; }

.pix { display: block; width: 100%; height: auto; image-rendering: pixelated; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.center { text-align: center; padding-top: 48px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.h1 { font-family: var(--mono); font-size: clamp(26px, 4.5vw, 42px); line-height: 1.15; margin: 10px 0 12px; letter-spacing: .5px; text-shadow: 3px 3px 0 #000a, 0 0 18px #48d9ff40; overflow-wrap: anywhere; }
.h2 { font-family: var(--mono); font-size: clamp(19px, 2.6vw, 24px); margin: 36px 0 14px; color: var(--yellow); text-transform: uppercase; letter-spacing: 1.5px; }
.h2::before { content: "▶ "; color: var(--pink); }
.h3 { font-family: var(--mono); font-size: 19px; color: var(--cyan); margin: 26px 0 10px; }

/* ---------- Cabecera ---------- */
.top { position: sticky; top: 0; z-index: 20; background: #070b1aee; backdrop-filter: blur(6px); border-bottom: 2px solid var(--line); box-shadow: 0 2px 0 #000; }
.top-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo { display: block; width: 168px; flex: none; }
.menu { display: flex; gap: 4px; }
.menu a { color: var(--text); text-decoration: none; font-family: var(--mono); font-weight: 700; font-size: 15px; padding: 8px 10px; white-space: nowrap; border: 2px solid transparent; border-radius: var(--radius); }
.menu a:hover { border-color: var(--line); color: var(--yellow); }
.menu a.active { border-color: var(--yellow); color: var(--yellow); background: #ffd23f14; }
.top-search { margin-left: auto; display: flex; min-width: 0; flex: 0 1 200px; }
.top-search input { min-width: 0; }
.top-search input { width: 100%; background: var(--bg2); border: 2px solid var(--line); border-right: 0; padding: 7px 10px; border-radius: var(--radius) 0 0 var(--radius); }
.top-search button { background: var(--cyan); color: #04121c; border: 2px solid var(--cyan); padding: 0 12px; font-size: 18px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.menu-btn { display: none; margin-left: auto; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); width: 44px; height: 40px; cursor: pointer; }
.menu-ico, .menu-ico::before, .menu-ico::after { display: block; width: 20px; height: 3px; background: var(--yellow); margin: 0 auto; position: relative; }
.menu-ico::before, .menu-ico::after { content: ""; position: absolute; left: 0; }
.menu-ico::before { top: -7px; } .menu-ico::after { top: 7px; }

/* ---------- Portada ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 2px solid var(--line); background: linear-gradient(#050818, #1a0f3d 62%, #3a0f4f); }
.hero-sky { position: absolute; inset: 0; background:
  radial-gradient(circle at 50% 78%, #ff4fa3aa 0, #ff4fa300 22%),
  repeating-linear-gradient(0deg, transparent 0 3px, #00000030 3px 4px); }
.hero-grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 46%;
  background-image: linear-gradient(var(--cyan) 2px, transparent 2px), linear-gradient(90deg, var(--cyan) 2px, transparent 2px);
  background-size: 60px 40px; transform: perspective(300px) rotateX(62deg); transform-origin: top; opacity: .45;
  animation: avance 2.5s linear infinite; mask-image: linear-gradient(transparent, #000 30%); -webkit-mask-image: linear-gradient(transparent, #000 30%); }
@keyframes avance { to { background-position: 0 40px; } }
.hero-in { position: relative; max-width: 900px; margin: 0 auto; padding: 36px 16px 64px; text-align: center; }
.hero-logo { margin: 18px auto 8px; max-width: 760px; filter: drop-shadow(0 0 14px #48d9ff66); }
.hero-lead { font-family: var(--mono); font-size: clamp(15px, 2.2vw, 19px); color: #dfe7ff; margin: 6px 0 22px; }
.hero-stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 20px 0 0; font-family: var(--mono); }
.hero-stats span { background: #070b1acc; border: 2px solid var(--line); padding: 4px 12px; border-radius: var(--radius); }
.parade { display: flex; justify-content: center; gap: clamp(10px, 3vw, 30px); }
.parade span { width: clamp(22px, 4vw, 34px); animation: salto 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * .15s); }
@keyframes salto { 50% { transform: translateY(-8px); } }

.big-search { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.big-search input { flex: 1; min-width: 0; background: var(--bg2); border: 3px solid var(--cyan); padding: 12px 14px; border-radius: var(--radius); font-size: 17px; box-shadow: 4px 4px 0 #000; }
.wrap > .big-search { margin: 0 0 20px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-weight: 800; text-decoration: none; padding: 11px 16px; border: 3px solid #000; border-radius: var(--radius); cursor: pointer; box-shadow: 4px 4px 0 #000; transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #000; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }
.btn-yellow { background: var(--yellow); color: #151005; }
.btn-cyan { background: var(--cyan); color: #04121c; }
.btn-red { background: #ff4d5e; color: #1a0306; }
.btn-red:hover { color: #000; }
.btn-ghost { background: var(--panel2); color: var(--text); border-color: var(--line); }
.btn-yellow:hover, .btn-cyan:hover { color: #000; }
.btn-ghost:hover { color: var(--yellow); }

/* ---------- Tarjetas ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.brand-card, .console-card, .guide-card {
  --acc: var(--cyan);
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, var(--panel2), var(--panel)); border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: 5px 5px 0 #000; transition: transform .1s, border-color .1s;
}
.brand-card:hover, .console-card:hover, .guide-card:hover { border-color: var(--acc); transform: translate(-2px, -2px); color: var(--text); }
.brand-card { padding: 18px 16px; align-items: center; text-align: center; border-top: 6px solid var(--acc); }
.brand-art { width: 64px; margin: 4px 0 12px; filter: drop-shadow(3px 3px 0 #0008); }
.brand-name { font-family: var(--mono); font-weight: 800; font-size: 22px; color: var(--acc); text-shadow: 2px 2px 0 #000; }
.brand-meta { color: var(--muted); font-size: 14px; }

.console-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.console-card { padding: 14px; align-items: center; text-align: center; }
.console-art { width: 52px; margin: 2px 0 10px; }
.console-name { font-family: var(--mono); font-weight: 800; font-size: 17px; }
.console-meta { color: var(--muted); font-size: 13px; }
.brand-h { color: var(--acc); }
.brand-h a { color: inherit; text-decoration: none; }
.brand-h a:hover { text-decoration: underline; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.steps li { background: var(--panel); border: 2px dashed var(--line); padding: 16px; display: flex; flex-direction: column; gap: 4px; border-radius: var(--radius); }
.steps span:last-child { color: var(--muted); }
.step-art { width: 40px; margin-bottom: 6px; }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guide-card { padding: 16px; gap: 6px; }
.guide-card strong { font-family: var(--mono); font-size: 17px; color: var(--cyan); }
.guide-card span:last-child { color: var(--muted); }
.guide-art { width: 40px; }

/* ---------- Franja de marca/consola ---------- */
.band { --acc: var(--cyan); background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 26%, var(--bg)), var(--bg) 75%); border-bottom: 3px solid var(--acc); }
.band-in { padding-top: 14px; padding-bottom: 22px; }
.band-head { display: flex; align-items: center; gap: 18px; }
.band-art { width: 76px; flex: none; filter: drop-shadow(4px 4px 0 #0009); }
.band .h1 { margin: 0 0 4px; }

.crumbs { font-size: 14px; color: var(--muted); padding: 14px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--yellow); }
.crumbs [aria-current] { color: var(--text); }
.crumbs .sep { color: var(--line); }

/* ---------- Filtros y listas ---------- */
.filters { display: none; flex-wrap: wrap; gap: 12px; margin: 22px 0 6px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.field.grow { flex: 1 1 260px; }
.field input, .field select { background: var(--bg2); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 16px; font-family: var(--sans); min-width: 150px; }
.field input:focus, .field select:focus { border-color: var(--cyan); }
.js .filters { display: flex; }
[hidden] { display: none !important; }
.logo img, .hero-logo img { display: block; width: 100%; height: auto; }
.count { color: var(--muted); font-family: var(--mono); font-size: 14px; margin: 10px 0; }

.games { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 14px; }
.game-row { --acc: var(--cyan); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); background: var(--panel); border: 2px solid var(--line); border-left: 6px solid var(--acc); padding: 10px 12px; border-radius: var(--radius); height: 100%; }
.game-row:hover { background: var(--panel2); border-color: var(--acc); color: var(--text); }
.game-title { font-weight: 700; }
.game-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.chip { color: var(--acc); font-weight: 700; }
.empty { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.empty .pix { width: 22px; }
.note { background: var(--panel); border-left: 4px solid var(--cyan); padding: 12px 14px; color: var(--muted); font-size: 14px; border-radius: var(--radius); margin: 22px 0; }

/* ---------- Ficha de juego ---------- */
.detail { display: grid; grid-template-columns: minmax(240px, 330px) 1fr; gap: 32px; align-items: start; margin-top: 10px; }
.ficha { --acc: var(--cyan); aspect-ratio: 3 / 4; display: flex; flex-direction: column; border: 4px solid #000; outline: 4px solid var(--acc); outline-offset: -10px; border-radius: 6px;
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--acc) 45%, transparent), transparent 60%), repeating-linear-gradient(0deg, #ffffff06 0 2px, transparent 2px 4px), linear-gradient(160deg, #1b2a5c, #090f24);
  box-shadow: 8px 8px 0 #000; padding: 18px; position: sticky; top: 80px; }
.ficha-top, .ficha-bottom { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--acc); font-weight: 800; }
.ficha-art { width: 46%; margin: auto auto 14px; filter: drop-shadow(5px 5px 0 #000a); }
.ficha-title { font-family: var(--mono); font-weight: 900; font-size: clamp(18px, 2.4vw, 24px); text-align: center; line-height: 1.15; text-shadow: 3px 3px 0 #000; margin-bottom: auto; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 14px 0; }
.facts div { background: var(--panel); border: 2px solid var(--line); padding: 8px 12px; border-radius: var(--radius); }
.facts dt { font-size: 12px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; }
.facts dd { margin: 0; font-weight: 700; }
.buy { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }

/* ---------- Trucos, consejos y revisión ---------- */
.detail-info .lead { font-size: 17px; color: #d6def2; margin: 0 0 6px; }
.star { color: var(--yellow); font-weight: 700; }
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 4px 18px 16px; margin: 28px 0; box-shadow: 5px 5px 0 #000; }
.panel .h2 { margin-top: 18px; }
.panel-yellow { border-color: #8a7420; }
.panel-cyan { border-color: #1f6f8a; }
.tricks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.trick { background: var(--bg2); border: 2px dashed #8a7420; border-radius: var(--radius); padding: 12px 14px; }
.trick h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-family: var(--mono); font-size: 16px; color: var(--yellow); }
.trick h3 .pix { width: 18px; flex: none; }
.trick p { margin: 0; color: #d6def2; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; color: #d6def2; }
.checks li::before { content: "■"; position: absolute; left: 4px; top: 0; color: var(--cyan); }
.checks.tips li::before { content: "▶"; color: var(--pink); }
.small { font-size: 13px; }

/* ---------- Textos ---------- */
.prose { max-width: 780px; }
.prose p { color: #d6def2; font-size: 17px; }
.prose .lead { color: var(--muted); font-size: 19px; }
.big-sprite { width: 110px; margin: 0 auto; }

/* ---------- Pie ---------- */
.foot { margin-top: 56px; border-top: 2px solid var(--line); background: #050817; }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 22px 16px 30px; color: var(--muted); font-size: 14px; }
.foot .small { font-size: 12.5px; max-width: 820px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Móvil ---------- */
@media (max-width: 1060px) {
  .top-in { flex-wrap: wrap; gap: 10px; }
  .logo { width: 140px; }
  .menu-btn { display: block; }
  .menu { display: none; order: 3; width: 100%; flex-direction: column; }
  .menu.open { display: flex; }
  .menu a { padding: 12px; border-color: var(--line); }
  .top-search { order: 4; width: 100%; margin-left: 0; flex: 1 1 100%; }
  .top-search input { flex: 1; width: auto; }
}
@media (max-width: 680px) {
  .detail { grid-template-columns: 1fr; }
  .ficha { position: static; max-width: 300px; width: 100%; margin: 0 auto; }
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .console-grid { grid-template-columns: repeat(2, 1fr); }
  .games { grid-template-columns: 1fr; }
  .band-art { width: 56px; }
  .big-search { flex-direction: column; }
  .big-search .btn { justify-content: center; }
  .field, .field input, .field select { min-width: 0; width: 100%; }
  .field { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Colecciones especiales ---------- */
.feature { --acc: var(--pink); display: flex; align-items: center; gap: 22px; margin-top: 30px; padding: 20px 22px; text-decoration: none; color: var(--text);
  background: linear-gradient(110deg, color-mix(in srgb, var(--acc) 30%, var(--panel)), var(--panel) 70%);
  border: 3px solid var(--acc); border-radius: var(--radius); box-shadow: 6px 6px 0 #000; transition: transform .1s; }
.feature:hover { transform: translate(-2px, -2px); color: var(--text); }
.feature-art { width: 84px; flex: none; filter: drop-shadow(4px 4px 0 #0009); }
.feature-text { display: flex; flex-direction: column; gap: 4px; }
.feature-tag { align-self: flex-start; font-family: var(--mono); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; background: var(--acc); color: #120310; padding: 2px 8px; border-radius: var(--radius); }
.feature strong { font-family: var(--mono); font-size: clamp(18px, 2.6vw, 24px); line-height: 1.2; text-shadow: 2px 2px 0 #000; }
.feature-text > span:not(.feature-tag):not(.feature-cta) { color: #d6def2; }
.feature-cta { font-family: var(--mono); font-weight: 800; color: var(--yellow); }

.col-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; }
.col-item { --acc: var(--cyan); display: grid; grid-template-columns: auto 56px 1fr auto; gap: 14px; align-items: center;
  background: var(--panel); border: 2px solid var(--line); border-left: 6px solid var(--acc); border-radius: var(--radius); padding: 12px 16px; }
.col-num { font-family: var(--mono); font-weight: 900; font-size: 22px; color: var(--acc); text-shadow: 2px 2px 0 #000; }
.col-art { width: 56px; }
.col-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.col-title { font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; }
.col-title:hover { color: var(--yellow); text-decoration: underline; }
.col-meta { font-size: 13px; color: var(--acc); font-weight: 700; }
.col-note { color: #c9d4ec; font-size: 15px; }
.col-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.col-actions .btn { padding: 8px 12px; font-size: 14px; }
@media (max-width: 760px) {
  .feature { flex-direction: column; align-items: flex-start; }
  .feature-art { width: 64px; }
  .col-item { grid-template-columns: auto 44px 1fr; }
  .col-art { width: 44px; }
  .col-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- Especiales en rejilla, Mi lista y botones activos ---------- */
.js-only { display: none !important; }
.js .js-only { display: flex !important; }
.js button.js-only { display: inline-flex !important; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.feature-grid .feature { margin-top: 0; padding: 16px; align-items: flex-start; }
.feature-grid .feature-art { width: 56px; }
.feature-grid .feature strong { font-size: 18px; }
.feature-big { margin-top: 10px; }
.mylist-btns { margin: 6px 0 4px; }
.mylist-btns .btn { padding: 8px 12px; font-size: 14px; }
.btn.is-on { background: var(--yellow); color: #151005; border-color: #000; }
.mylist-tools label { cursor: pointer; }
@media (max-width: 680px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Trucos con etiqueta y mapas de ruta ---------- */
.trick { position: relative; }
.trick-tag { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 1px 7px; border-radius: var(--radius); margin-bottom: 6px; color: #120310; }
.tag-cheat { background: var(--yellow); }
.tag-secret { background: var(--cyan); }
.tag-glitch { background: var(--pink); }
.cheat-game { margin: 10px 0 18px; }
.cheat-game .h3 { margin: 14px 0 8px; }
.cheat-game .h3 a { color: var(--text); }
.cheat-game .h3 a:hover { color: var(--yellow); }
.panel-map { --acc: var(--cyan); border-color: var(--acc); background:
  linear-gradient(var(--panel), var(--panel)) padding-box,
  repeating-linear-gradient(0deg, transparent 0 22px, #ffffff08 22px 23px); }
.map-route { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 18px; counter-reset: none; }
.map-stop { position: relative; display: flex; gap: 10px; align-items: flex-start; background: var(--bg2); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.map-stop::after { content: "▶"; position: absolute; right: -15px; top: 50%; transform: translateY(-50%); color: var(--acc); font-size: 12px; }
.map-stop:last-child::after { content: "★"; color: var(--yellow); }
.map-node { flex: none; width: 30px; height: 30px; display: grid; place-items: center; font-family: var(--mono); font-weight: 900; color: #0a0f24; background: var(--acc); border: 2px solid #000; box-shadow: 2px 2px 0 #000; }
.map-text { display: flex; flex-direction: column; gap: 2px; }
.map-text strong { font-family: var(--mono); font-size: 15px; }
.map-text span { color: var(--muted); font-size: 14px; }
@media (max-width: 680px) { .map-stop::after { content: none; } }
