/* SURF FURY — página oficial. Una web de los 90 con la paleta y los píxeles del juego. */
:root {
  --ink: #0b0420;
  --deep: #1a0b3d;
  --purple: #2a1650;
  --pink: #ff4f9a;
  --cyan: #5ee6f0;
  --yellow: #ffe14d;
  --lime: #b6ff3b;
  --orange: #ff9a3d;
  --white: #ffffff;
  --lilac: #b9a7ff;
  --light: #e8e0ff;
  --shade: #3d2c75;
}
.out { border-style: solid; border-color: var(--light) var(--shade) var(--shade) var(--light); }
.in { border-style: solid; border-color: var(--shade) var(--light) var(--light) var(--shade); }

html { background: var(--ink); }
body {
  margin: 0;
  padding: 0 0 40px;
  background: var(--ink) url(img/fondo.png) repeat;
  image-rendering: pixelated;
  color: var(--white);
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.35;
}
img.px, video.px, .px { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--cyan); }
a:visited { color: var(--pink); }
a:hover { color: var(--yellow); background: var(--purple); }
small { font-size: 15px; }
i { color: var(--lilac); }

/* La marquesina de arriba, como en 1997. */
.marquee {
  display: block;
  background: var(--pink);
  color: var(--ink);
  font: bold 16px/26px "Courier New", Courier, monospace;
  border-bottom: 2px solid var(--yellow);
}

/* El «documento»: 800 de ancho, borde biselado. */
.page { width: 800px; max-width: 100%; margin-top: 18px; }
.frame {
  background: rgba(11, 4, 32, 0.92);
  border: 4px solid;
  border-color: var(--light) var(--shade) var(--shade) var(--light);
  padding: 10px 20px 16px;
}
.logo { max-width: 100%; height: auto; }
.lang img { border: 2px solid; border-color: var(--light) var(--shade) var(--shade) var(--light); background: var(--purple); padding: 4px 6px; }
.lang:hover img { border-color: var(--shade) var(--light) var(--light) var(--shade); }

/* Franja de obras (amarillo y negro, como el GIF de la época). */
.obras {
  margin: 6px 0 10px;
  padding: 6px;
  text-align: center;
  font: bold 15px "Courier New", Courier, monospace;
  color: var(--ink);
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--ink) 12px 24px);
}
.obras span { background: var(--yellow); padding: 2px 8px; }

/* Menú: botones con bisel de Windows 95. */
.nav { margin: 4px auto 6px; }
.nav td { padding: 0; }
.btn {
  display: inline-block;
  padding: 6px 8px;
  background: var(--purple);
  border: 3px solid;
  border-color: var(--light) var(--shade) var(--shade) var(--light);
}
.btn:hover { border-color: var(--shade) var(--light) var(--light) var(--shade); background: var(--deep); }
.btn img { display: block; }

.hr { display: block; margin: 18px 0; height: 8px; }
.h { margin: 22px 0 10px; text-align: center; }
.h img { max-width: 100%; height: auto; }
.lead { color: var(--yellow); }

/* Marcos de captura: bisel hundido + escaneado CRT como en el juego. */
.bevel { border: 4px solid; border-color: var(--shade) var(--light) var(--light) var(--shade); background: var(--ink); margin: 6px auto; }
.bevel td { padding: 0; line-height: 0; }
.crt { position: relative; line-height: 0; }
.crt::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(11, 4, 32, 0.28) 2px 3px);
  box-shadow: inset 0 0 40px rgba(11, 4, 32, 0.55);
}
.shot, .trailer, .thumb { display: block; max-width: 100%; height: auto; }
.trailer { background: var(--ink); }

.steam { margin: 14px auto; border: 3px double var(--lime); background: var(--deep); }
.steam img { max-width: 100%; height: auto; }

/* Ficha del spot y webring. */
.ficha { background: var(--deep); border: 2px solid var(--purple); }
.stars { color: var(--yellow); letter-spacing: 2px; }
.ring { margin: 10px auto 0; text-align: center; border: 2px dashed var(--pink); background: var(--ink); }
.ring a { font: bold 16px "Courier New", Courier, monospace; }
.ringdots { font-size: 15px; }
.ringdots a.on { color: var(--yellow); }

ul.stars-list { list-style: none; padding-left: 4px; }
ul.stars-list li { margin: 4px 0; }
ul.stars-list li::before { content: "★ "; color: var(--pink); }

/* El «reproductor MIDI». */
.midi { margin: 14px auto; border: 3px solid; border-color: #fff #555 #555 #fff; background: #c0c0c0; color: var(--ink); }
.midi small { color: #222; }
.play {
  font: bold 16px "MS Sans Serif", Tahoma, Geneva, sans-serif;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #fff #555 #555 #fff;
  padding: 4px 14px;
  cursor: pointer;
}
.play:active, .play.on { border-color: #555 #fff #fff #555; }

/* Logros: bloqueados hasta pasar por encima. */
.achs td.ach { width: 96px; font-size: 13px; color: var(--lilac); }
.achs td.ach small { font-size: 13px; }
.achs img { border: 2px solid var(--purple); background: var(--ink); }
.achs td.ach:hover img { border-color: var(--yellow); }
.achs td.secret small { color: var(--pink); }

.thumbs img { border: 3px solid; border-color: var(--light) var(--shade) var(--shade) var(--light); }
.thumbs a:hover img { border-color: var(--shade) var(--light) var(--light) var(--shade); }

.sys { border-color: var(--lilac); background: var(--deep); }
.sys th { color: var(--yellow); padding-right: 14px; }

.counter { display: inline-block; margin: 6px 0; padding: 4px; background: #000; border: 3px solid; border-color: var(--shade) var(--light) var(--light) var(--shade); line-height: 0; }
.snippet { display: block; margin: 6px auto; max-width: 560px; padding: 6px; background: #000; color: var(--lime); font-size: 12px; word-break: break-all; border: 1px solid var(--purple); }
.buttons img { margin: 2px; }
.legal { color: var(--lilac); }

/* «NEW!» (imagen) y «COMING SOON TO STEAM» (texto), centrados en la misma línea. */
.soon { display: inline-flex; align-items: center; gap: 8px; }
.soon img { display: block; }

/* <blink> no existe ya: se imita. */
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

/* Purpurina que sigue al ratón (web.js). */
.spark { position: fixed; width: 6px; height: 6px; pointer-events: none; z-index: 9; image-rendering: pixelated; }

@media (prefers-reduced-motion: reduce) {
  .blink { animation: none; }
  .marquee { white-space: normal; }
}

/* Barra del móvil y menú hamburguesa (ocultos en escritorio). */
.topbar, .m-only { display: none; }
.burger {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: var(--purple);
  border: 3px solid;
  border-color: var(--light) var(--shade) var(--shade) var(--light);
  cursor: pointer;
}
.burger[aria-expanded="true"] { border-color: var(--shade) var(--light) var(--light) var(--shade); background: var(--deep); }
.burger:focus-visible, .btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.bars { display: grid; gap: 3px; width: 18px; }
.bars i { display: block; height: 3px; background: var(--yellow); box-shadow: 1px 1px 0 var(--ink); }
.burger[aria-expanded="true"] .bars i:nth-child(2) { background: var(--pink); }

/* Móvil: barra fija con el logo y la hamburguesa; el menú se despliega debajo; columnas apiladas. */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .marquee { font-size: 14px; line-height: 22px; }
  .topbar {
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 30;
    height: 58px; box-sizing: border-box;
    padding: 0 12px;
    background: var(--ink);
    border-bottom: 3px solid var(--pink);
    box-shadow: 0 3px 0 var(--ink);
  }
  .tb-logo img { display: block; height: 34px; width: auto; }
  .head { display: none; }
  [id] { scroll-margin-top: 70px; }
  .menu {
    display: none;
    position: fixed; top: 58px; left: 0; right: 0; z-index: 29;
    max-height: calc(100vh - 58px); overflow-y: auto;
    padding: 10px 12px 14px;
    background: rgba(11, 4, 32, 0.97);
    border-bottom: 4px solid;
    border-color: var(--shade);
  }
  body.menu-open .menu { display: block; }
  .menu .nav, .menu .nav tbody, .menu .nav tr, .menu .nav td { display: block !important; width: 100%; }
  .menu .nav { margin: 0; border-spacing: 0; }
  .menu .nav td { padding: 4px 0; }
  .menu .btn { display: block; padding: 12px; text-align: center; box-sizing: border-box; }
  .menu .btn img { margin: 0 auto; }
  .m-only { display: block; }
  .menu-extra { text-align: center; margin: 12px 0 0; line-height: 2.2; }
  /* Las tablas crecen hasta su contenido más ancho: en el móvil, la exterior pasa a bloques y lo de dentro se
     limita al ancho de la pantalla. */
  .page, .page > tbody, .page > tbody > tr, .page > tbody > tr > td.frame { display: block; width: auto; }
  .page { margin: 10px 8px 0; }
  .frame { padding: 8px 12px; border-width: 3px; overflow-wrap: break-word; }
  .frame img, .frame video { max-width: 100%; height: auto; }
  .frame table { max-width: 100%; }
  .bevel, .steam, .midi, .ring, .sys { box-sizing: border-box; }
  .steam td, .midi td { padding: 8px; }
  .cols td { display: block; width: auto !important; }
  .obras { font-size: 13px; }
  .h img { height: auto; }
  /* Logros: 4 por fila. Capturas: 2 por fila. */
  .achs, .achs tbody { display: block; }
  .achs tbody { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .achs tr { display: contents; }
  .achs td.ach { width: auto; padding: 2px; }
  .achs img { width: 100%; max-width: 64px; height: auto; }
  .thumbs, .thumbs tbody { display: block; }
  .thumbs tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .thumbs tr { display: contents; }
  .thumbs td { display: block; padding: 0; }
  .thumbs img { width: 100%; height: auto; box-sizing: border-box; }
  .ring td { padding: 4px 2px; }
  .ring a { font-size: 14px; }
  .ring img { max-width: 140px; height: auto; }
  .ficha td { display: block; text-align: left; }
  .ficha td[align="right"] { text-align: left; }
  .sys th, .sys td { font-size: 15px; }
  .snippet { overflow-x: auto; word-break: normal; white-space: nowrap; max-width: 100%; box-sizing: border-box; }
  .buttons { line-height: 0; }
}
