:root {
  --bg: #05060a; --ink: #ece9e2; --muted: #9b988f; --line: rgba(255,255,255,.12); --lc: #c8f53a;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); overflow: hidden; }
button { font: inherit; cursor: pointer; }

#gl, #css3d { position: fixed; inset: 0; }
#gl canvas { display: block; }
#css3d { pointer-events: none; z-index: 2; transition: opacity .6s ease; }
body.flying #css3d { opacity: 0; }
/* Renders fotorrealistas del FOH (Blender) sobre el video del concierto */
#plates { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
#plates img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#plate-wide { transition: transform 2.6s cubic-bezier(.65,0,.35,1), opacity .9s ease; }
#plate-zoom { opacity: 0; transform: scale(1.12); transition: opacity .9s ease .25s, transform 1.4s cubic-bezier(.2,.7,.2,1); }
body.plate-zoom #plate-wide { transform: scale(3); opacity: 0; transition: transform 2.6s cubic-bezier(.65,0,.35,1), opacity 1.2s ease 1.2s; }
body.plate-zoom #plate-zoom { opacity: 1; transform: none; transition: opacity 1.1s ease 1.5s, transform 1.4s cubic-bezier(.2,.7,.2,1) 1.4s; }
#css3d.live { pointer-events: auto; }
body.zoomed #gl { pointer-events: none; }

.screen { width: 1280px; height: 800px; background: #000; position: relative; overflow: hidden; }
.screen iframe { width: 1280px; height: 800px; border: 0; display: block; background: #07080b;
  transition: filter .8s ease; filter: brightness(.8) saturate(.95); }
body.zoomed .screen iframe { filter: none; }
.screen .glare { position: absolute; inset: 0; pointer-events: none; transition: opacity .8s;
  background: linear-gradient(115deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(255,255,255,.03) 100%); }
body.zoomed .screen .glare { opacity: 0; }

/* Terminal de arranque */
#boot { position: fixed; inset: 0; z-index: 20; background: #000; padding: 22px 26px; display: flex; flex-direction: column;
  transition: opacity .9s ease; font: 13px/1.42 var(--mono); color: #bfc3bb; }
#boot.out { opacity: 0; pointer-events: none; }
#term { margin: 0; flex: 1; overflow: hidden; white-space: pre-wrap; word-break: break-all; display: flex; flex-direction: column; justify-content: flex-end; }
#term .ok { color: #3ad46a; } #term .warn { color: #e8c23a; } #term .dim { color: #6e736b; } #term .hi { color: var(--lc); }
#term .ps { color: #6ab0ff; } #term .usr { color: #3ad46a; }
#term .cur { display: inline-block; width: .6em; height: 1.1em; background: #bfc3bb; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#boot-cta { display: flex; align-items: center; gap: 22px; padding-top: 18px; }
#enter { background: var(--lc); color: #0b0d08; border: 0; padding: 12px 22px; font: 700 13px var(--mono); letter-spacing: .12em; border-radius: 3px; }
#enter kbd { font: inherit; opacity: .6; margin-left: 6px; }
#skip { color: var(--muted); font: 13px var(--mono); }

/* HUD */
#hud { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; pointer-events: none; transition: opacity .5s; }
#hud > * { pointer-events: auto; }
body.zoomed #hud .hud-brand { opacity: 0; }
.hud-brand { font-weight: 700; letter-spacing: .3em; font-size: 15px; transition: opacity .5s; }
.hud-actions { display: flex; gap: 8px; }
.hud-actions button { background: rgba(10,11,14,.7); border: 1px solid var(--line); color: var(--ink); padding: 7px 12px; border-radius: 4px;
  font: 12px var(--mono); letter-spacing: .06em; backdrop-filter: blur(6px); }
body.zoomed #hud { top: auto; bottom: 0; justify-content: flex-end; padding: 10px 14px; }
body.zoomed #btn-back { display: none; }
body.zoomed .hud-actions button { padding: 4px 9px; font-size: 11px; opacity: .75; }

#hint { position: fixed; left: 50%; bottom: 7vh; transform: translateX(-50%); z-index: 10; text-align: center; transition: opacity .5s; }
body.zoomed #hint { opacity: 0; pointer-events: none; }
#btn-pc { background: rgba(8,9,12,.72); color: var(--ink); border: 1px solid rgba(200,245,58,.45); padding: 14px 22px; border-radius: 999px; font-size: 15px; backdrop-filter: blur(8px); }
#btn-pc:hover { border-color: var(--lc); }
#btn-pc .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lc); margin-right: 8px; box-shadow: 0 0 10px var(--lc); animation: pulse 1.6s infinite; }
#hint small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; text-shadow: 0 1px 4px #000; }
@keyframes pulse { 50% { opacity: .35; } }
/* Pantallas animadas de la consola (encima del render) */
.con-scr { pointer-events: none !important; display: block; filter: brightness(.82) saturate(.92) contrast(.96); border-radius: 2px; }
/* Enlaces legales (visibles siempre, también durante el arranque) */
#legal { position: fixed; left: 14px; bottom: 10px; z-index: 30; display: flex; gap: 14px; font: 11px/1.2 ui-sans-serif, system-ui, sans-serif; }
#legal a { color: rgba(255,255,255,.55); text-decoration: none; }
#legal a:hover { color: #fff; text-decoration: underline; }
body.zoomed #legal { opacity: .5; }
#gl canvas { width: 100vw !important; height: 100vh !important; }
