/* Plantilla web de Horizonte 64 Software (misma estética que el sitio) */
:root {
  --cream: #F0E6C8; --yellow: #FFD54A; --red: #E03A2E; --blue: #3A86FF; --cyan: #00C2C7;
  --black: #111111; --navy: #16123a; --navy-2: #0d0b24;
  --pixel: "Press Start 2P", monospace; --term: "VT323", monospace;
  --topbar: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--black); color: var(--cream); font-family: var(--term); font-size: 22px; }

.topbar {
  height: var(--topbar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  border-bottom: 3px solid var(--navy);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand span { font-family: var(--pixel); font-size: 14px; }
.brand b { color: var(--red); font-weight: normal; }
.topbar nav a { font-family: var(--pixel); font-size: 11px; color: var(--cream); text-decoration: none; text-transform: uppercase; }
.topbar nav a::before { content: "> "; color: var(--red); }

.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; }

/* Ventana con el juego en formato vertical 9:16 que cabe en la pantalla */
.window { border: 3px solid var(--cream); background: var(--navy-2); box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6); }
.window-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; background: var(--navy); border-bottom: 3px solid var(--cream);
  font-family: var(--pixel); font-size: 11px;
}
.window-buttons button {
  font: inherit; font-size: 14px; line-height: 1; color: var(--cream); background: none;
  border: 2px solid var(--cream); width: 24px; height: 22px; padding: 0; cursor: pointer;
}
.window-buttons button:disabled { opacity: 0.35; cursor: default; }

.screen {
  position: relative;
  /* cabe en el alto de la ventana, pero nunca menos de 480 px (si no cabe, la página hace scroll) */
  height: max(480px, min(calc(100vh - var(--topbar) - 130px), calc((100vw - 40px) * 16 / 9)));
  max-width: calc(100vw - 40px);
  aspect-ratio: 9 / 16;
  background: #000;
}
#unity-canvas { width: 100%; height: 100%; display: block; background: #000; outline: none; }

.overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  text-align: center; padding: 24px; background: #000;
}
.overlay[hidden] { display: none; }
.overlay p { margin: 0; text-transform: uppercase; }
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.logo, #play, .note { position: relative; }
.logo { width: 90%; }
.note { color: var(--yellow); font-size: 20px; }

.btn {
  display: inline-flex; align-items: center; gap: 14px; cursor: pointer;
  font-family: var(--pixel); font-size: 14px; text-transform: uppercase;
  padding: 16px 22px; color: var(--cream); background: var(--blue);
  border: 3px solid var(--cream);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.35), inset 3px 3px 0 rgba(255, 255, 255, 0.25);
}
.btn:hover { transform: translate(-2px, -2px); }

.bar { width: 70%; height: 22px; border: 2px solid var(--cream); padding: 2px; }
#bar-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--blue) 0 10px, transparent 10px 13px); }

.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; margin: 0; }
.controls div { display: flex; gap: 8px; }
.controls dt { color: var(--cyan); text-transform: uppercase; }
.controls dd { margin: 0; }
