/* Página de inicio (marca Pakilis). Oscuro por defecto; claro si el dispositivo lo pide.
   Morado y naranja no se distinguen solo por el tono: el naranja es claro y el morado
   oscuro, así que también se separan por claridad (útil si no se ve bien el color). */
:root {
  --fondo: #100b1e;
  --tarjeta: #1a1230;
  --borde: #6b55b0;
  --texto: #f4efff;
  --texto-suave: #b9abdc;
  --violeta: #8f6bff;
  --naranja: #ff8a1f;
  --sobre-naranja: #1a0d00;
  --brillo: 0 0 22px rgba(255, 138, 31, 0.35);
  --foco: #ff8a1f;
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --fondo: #faf7ff;
    --tarjeta: #ffffff;
    --borde: #8f7cc9;
    --texto: #1e1238;
    --texto-suave: #5a4b82;
    --violeta: #6d3fe0;
    --brillo: none;
    --foco: #1e1238;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 560px;
  margin-inline: auto;
  font-family: var(--fuente);
  color: var(--texto);
  background: var(--fondo);
}

h1, h2, p { margin: 0; }

header { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.marca { font-size: 15px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--texto-suave); }
h1 { font-size: 32px; line-height: 1.15; }
.sub { font-size: 17px; line-height: 1.4; color: var(--texto-suave); }

main { flex: 1; }
.juegos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }

.juego {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 20px 20px;
  color: inherit;
  text-decoration: none;
  background: var(--tarjeta);
  border: 2px solid var(--borde);
  border-top: 8px solid var(--violeta);
  border-radius: 20px;
}
.juego h2 { font-size: 26px; line-height: 1.2; }
.juego p { font-size: 18px; line-height: 1.35; }
.juego .detalle { font-size: 16px; color: var(--texto-suave); }

/* Se ve como botón, pero el enlace es toda la tarjeta: cualquier toque dentro juega. */
.jugar {
  align-self: stretch;
  margin-top: 12px;
  min-height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 800;
  color: var(--sobre-naranja);
  background: var(--naranja);
  box-shadow: var(--brillo);
}

footer { text-align: center; }
.enlace { display: inline-block; padding: 14px 16px; color: var(--texto-suave); font-size: 16px; text-decoration: underline; }

a:focus-visible { outline: 4px solid var(--foco); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .juego { transition: transform 0.15s ease; }
  .juego:hover { transform: translateY(-2px); }
}
