/* Juegos Lumbre — misma identidad que lumbre.lat (mismas variables de color),
 * con una capa arcade para las portadas. Sin dependencias externas. */

:root {
  --navy: #123a5e;
  --navy-hi: #1c5182;
  --navy-lo: #0d2942;
  --juego: #e0393e;
  --juego-hi: #c22b30;
  --libre: #0f8a4f;
  --amber: #ffb648;
  --ink: #1b2431;
  --muted: #5a6b7d;
  --line: #dfe5ec;
  --bg: #f4f6f9;
  --card: #ffffff;
  --bg-alt: #f7f9fb;
  --bg-alt2: #eef3f8;
  --texto-suave: #40505f;
  --enlace: #1c5182;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 34, 55, .08), 0 6px 18px rgba(16, 34, 55, .07);
}

html.tema-oscuro {
  --navy: #3a7ab8;
  --navy-hi: #4a8ac8;
  --navy-lo: #16232f;
  --juego: #f05a5e;
  --juego-hi: #d94a4e;
  --libre: #2aaa7a;
  --ink: #e8eef4;
  --muted: #9ab0c4;
  --line: #3a4a5e;
  --bg: #1a1f26;
  --card: #242a33;
  --bg-alt: #2a3038;
  --bg-alt2: #2d333c;
  --texto-suave: #b6c6d8;
  --enlace: #7db4e8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

a { color: var(--enlace); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.2px; }

.envoltura { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- Cabecera ---------- */
.cabera { background: var(--navy-lo); color: #fff; }
.cabera__alta { display: flex; align-items: center; gap: 18px; padding: 14px 0; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.marca:hover { text-decoration: none; }
.marca__marca-svg { width: 34px; height: 34px; flex: none; }

.nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; align-items: center; }
.nav a, .nav button {
  color: #dbe8f4; background: none; border: 0; font: inherit; font-size: 15px;
  padding: 9px 13px; border-radius: 7px; cursor: pointer;
}
.nav a:hover, .nav button:hover { background: var(--navy-hi); color: #fff; text-decoration: none; }
.nav__tema {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  background: transparent; border: 1px solid rgba(255, 255, 255, .2); border-radius: 7px;
  color: #dbe8f4; cursor: pointer;
}
.nav__tema:hover { background: var(--navy-hi); border-color: var(--navy-hi); color: #fff; }
.nav__tema-icono { width: 20px; height: 20px; }

/* ---------- Portada (hero) ---------- */
/* La portada siempre es oscura: el texto blanco sobre el degradado claro del
 * tema claro se volvía ilegible a media página. */
.hero {
  background:
    radial-gradient(90% 120% at 85% 0%, rgba(109, 40, 217, .35) 0%, transparent 60%),
    linear-gradient(180deg, #081420 0%, var(--navy-lo) 100%);
  color: #fff; padding: 44px 0 40px;
}
.hero__rejilla { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 34px; align-items: center; }
.hero__sello {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--amber);
}
.hero h1 { margin: 0 0 12px; font-size: clamp(28px, 4.4vw, 44px); }
.hero p { margin: 0 0 20px; max-width: 58ch; color: #cfdcec; font-size: 17px; }
.hero__botones { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero__rasgos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hero__rasgos li {
  font-size: 13px; padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: #e6eff8; border: 1px solid rgba(255, 255, 255, .18);
}

/* Tarima: la consola del hero, dibujada sólo con CSS. */
.tarima {
  background: #10151d; border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px;
  padding: 14px; box-shadow: var(--shadow);
}
.tarima__pantalla {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 10px;
  background:
    radial-gradient(120% 90% at 80% 110%, rgba(255, 182, 72, .35), transparent 55%),
    linear-gradient(175deg, #2a0550 0%, #4c1d95 45%, #0b0418 100%);
}
.tarima__pantalla::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 4px);
}
.tarima__nave { position: absolute; width: 26px; height: 16px; background: #f9a826; clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%); }
.tarima__nave--a { left: 18%; top: 26%; animation: flota 3.4s ease-in-out infinite; }
.tarima__nave--b { right: 24%; top: 52%; width: 20px; height: 13px; background: #7dd3fc; animation: flota 4.1s ease-in-out infinite reverse; }
.tarima__disparo { position: absolute; left: 24%; top: 44%; width: 4px; height: 26px; border-radius: 2px; background: #fff; animation: dispara 1.5s linear infinite; }
.tarima__luna { position: absolute; right: 12%; top: 14%; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.tarima__palpal { display: flex; gap: 12px; margin-top: 16px; }
.tarima__palpal span { flex: 1; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
@keyframes flota { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(8px); } }
@keyframes dispara { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(38px); opacity: .4; } 100% { transform: translateY(44px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tarima__nave, .tarima__disparo { animation: none; }
}

/* ---------- Secciones ---------- */
main { padding: 10px 0 40px; }
.seccion { padding: 34px 0 6px; scroll-margin-top: 80px; }
.seccion__cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.seccion__titulo { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); }
.seccion__texto { margin: 0; color: var(--muted); max-width: 70ch; }
.seccion__sello {
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--navy); background: var(--bg-alt2); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.seccion--alt {
  margin: 34px calc(50% - 50vw) 0; padding: 34px max(20px, calc(50vw - 580px)) 30px;
  background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.seccion--alt .seccion__cab, .seccion--alt .rasgos { max-width: 1120px; margin-inline: auto; }

/* ---------- Fichas ---------- */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }

.ficha {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ficha__portada { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-lo); }
.ficha__portada .portada__img {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover;
}
.ficha__portada .portada__img[hidden] { display: none; }

/* Arte de respaldo: se ve mientras no haya portada real para el juego. El
 * z-index:0 encierra aquí dentro sus hijos posicionados, que si no pintan por
 * encima de la fotografía. */
.portada__arte {
  position: absolute; inset: 0; z-index: 0; display: grid; place-content: center; gap: 6px; text-align: center;
  background:
    radial-gradient(120% 100% at 15% 0%, var(--juego-c, var(--amber)) 0%, transparent 42%),
    linear-gradient(160deg, var(--juego-a, var(--navy)) 0%, var(--juego-b, var(--navy-hi)) 100%);
}
.portada__arte::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 5px);
}
.portada__nombre {
  position: relative; z-index: 1; font-family: "Impact", "Arial Black", system-ui, sans-serif;
  font-size: clamp(26px, 5vw, 40px); letter-spacing: 2px; text-transform: uppercase; color: #fff;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .35);
}
.portada__nave {
  position: relative; z-index: 1; justify-self: center; width: 44px; height: 26px;
  background: #fff; opacity: .92; clip-path: polygon(50% 100%, 0 0, 50% 26%, 100% 0);
}
.ficha__bandera {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; padding: 3px 9px; border-radius: 999px;
  background: rgba(8, 12, 20, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .28);
}

.ficha__cuerpo { padding: 16px 18px 4px; flex: 1; }
.ficha__titulo { margin: 0 0 2px; font-size: 19px; }
.ficha__genero { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--juego); }
.ficha__resumen { margin: 0 0 12px; color: var(--texto-suave); font-size: 15px; }
.ficha__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ficha__tags li {
  font-size: 12px; color: var(--muted); background: var(--bg-alt2);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
}

.ficha__pie {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px 16px; margin-top: 12px; border-top: 1px solid var(--line); background: var(--bg-alt);
}
.ficha--vacio {
  border-style: dashed; border-color: var(--line); background: transparent; box-shadow: none;
  align-self: start; justify-content: center; text-align: center; padding: 8px 0;
}
.ficha--vacio .vacio__mas {
  display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 6px;
  border: 1px dashed var(--line); border-radius: 50%; color: var(--muted);
  font-size: 26px; line-height: 1;
}
.ficha--vacio .ficha__cuerpo { padding-top: 6px; }
.ficha--vacio .ficha__titulo { color: var(--muted); }
.ficha--vacio .ficha__resumen { max-width: 42ch; margin-inline: auto; }
.ficha--vacio .ficha__pie { background: transparent; justify-content: center; border-top: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1;
  padding: 12px 18px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn--grande { padding: 14px 22px; font-size: 16px; }
.btn--fant { background: var(--amber); color: #231603; }
.btn--fant:hover { background: #ffc66b; }
.btn--fant--claro { background: transparent; color: #eaf2fa; border-color: rgba(255, 255, 255, .35); }
.btn--fant--claro:hover { background: rgba(255, 255, 255, .12); }
.btn--jugar { background: var(--juego); color: #fff; }
.btn--jugar:hover { background: var(--juego-hi); }
.enlace-tenue { font-size: 14px; color: var(--muted); }
.nota { font-size: 13px; color: var(--muted); }

/* ---------- Rasgos ---------- */
.rasgos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.rasgo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.rasgo svg { width: 26px; height: 26px; stroke: var(--navy); fill: none; stroke-width: 1.7; margin-bottom: 10px; }
.rasgo h3 { margin: 0 0 6px; font-size: 16px; }
.rasgo p { margin: 0; color: var(--texto-suave); font-size: 14.5px; }

/* ---------- Pie ---------- */
.pie { background: var(--navy-lo); color: #cfdded; margin-top: 20px; }
.pie__alta { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; padding: 26px 20px 18px; }
.pie__marca { display: flex; align-items: center; gap: 12px; }
.pie__marca svg { width: 32px; height: 32px; }
.pie__marca strong { display: block; color: #fff; font-size: 16px; }
.pie__marca small { display: block; font-size: 13px; color: #a9c4dd; }
.pie__enlaces { display: flex; flex-wrap: wrap; gap: 4px; }
.pie__enlaces a { color: #dbe8f4; font-size: 15px; padding: 8px 12px; border-radius: 7px; }
.pie__enlaces a:hover { background: var(--navy-hi); color: #fff; text-decoration: none; }
.pie__baja {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: 13px; color: #90aecb; padding: 14px 20px 22px; border-top: 1px solid rgba(255, 255, 255, .12);
}

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .hero__rejilla { grid-template-columns: 1fr; }
  .hero__tarima { order: -1; }
  .nav { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .cabera__alta { gap: 10px; }
  .ficha__pie { flex-direction: column; align-items: stretch; text-align: center; }
  .btn { width: 100%; }
}
