@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: block; src: url(../fonts/plex-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: block; src: url(../fonts/plex-sans-500.woff2) format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: block; src: url(../fonts/plex-sans-600.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: block; src: url(../fonts/plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: block; src: url(../fonts/plex-mono-500.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-display: block; src: url(../fonts/plex-mono-600.woff2) format("woff2"); }
:root { --bg: #090c13; --fg: #eef1f7; --soft: #b9c1d1; --dim: #7f8aa0; --beam: #ffc65c; --ui: rgba(10, 13, 20, 0.82);
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--fg); overflow: hidden; font-family: var(--sans); -webkit-font-smoothing: antialiased; }
#app { position: fixed; inset: 0; display: grid; place-items: center; }
#stage { position: relative; width: min(100vw, calc(100vh * 16 / 9)); height: min(100vh, calc(100vw * 9 / 16)); overflow: hidden; container-type: size;
  background: radial-gradient(120% 90% at 50% 40%, #121826 0%, var(--bg) 62%, #06080d 100%); }
#stage::before { content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px); background-size: 2.5cqw 2.5cqw; }
#stage:fullscreen { width: 100vw; height: 100vh; }
#stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

#subs { position: absolute; left: 50%; bottom: 5.2cqh; transform: translateX(-50%); max-width: 78cqw; padding: .7cqh 1.4cqw; border-radius: .8cqh; background: rgba(4, 6, 10, .82);
  font-size: 2.7cqh; line-height: 1.35; text-align: center; color: #fff; z-index: 4; pointer-events: none; }
#subs:empty { display: none; }

#title { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2.4cqh; text-align: center; pointer-events: none; z-index: 3; opacity: 0; transition: opacity 1.4s ease; }
#title.show { opacity: 1; }
#title h1, .logo { margin: 0; font-weight: 600; letter-spacing: .32em; margin-right: -.32em; font-size: 6.4cqh; color: #fff; text-shadow: 0 0 3cqh rgba(255, 198, 92, .35); }
#title p { margin: 0; font-size: 2.5cqh; color: var(--soft); letter-spacing: .04em; max-width: 70cqw; }
#titlenote { font-family: var(--mono); font-size: 1.75cqh !important; color: var(--dim) !important; margin-top: 2cqh !important; line-height: 1.6; }

.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 5; transition: opacity .7s ease; }
.overlay.fade { opacity: 0; pointer-events: none; }
.inner { display: grid; justify-items: center; gap: 2.6cqh; padding: 0 16px; text-align: center; }
.scan { position: relative; width: 46cqw; height: 2px; background: rgba(255,255,255,.08); margin-bottom: 1.5cqh; }
.scan i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 16px 4px var(--beam), -40px 0 30px 2px rgba(255,198,92,.35); animation: sweep 1.8s linear infinite; }
@keyframes sweep { from { left: 0; } to { left: 100%; } }
.tag { margin: 0; color: var(--soft); font-size: clamp(13px, 2.3cqh, 24px); max-width: 80cqw; }
.langs { display: flex; gap: 0; border: 1px solid #364058; border-radius: 999px; overflow: hidden; }
.langs button { font: inherit; font-size: clamp(12px, 1.9cqh, 18px); padding: .55em 1.4em; background: none; color: var(--dim); border: 0; cursor: pointer; }
.langs button.on { background: #fff; color: #000; }
#loader { width: min(380px, 56cqw); }
.bar { height: 4px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--beam); transition: width .2s; }
#loadtext { margin: 1.4cqh 0 0; font-family: var(--mono); font-size: clamp(11px, 1.6cqh, 15px); color: var(--dim); }
#start, #replay { font: inherit; font-weight: 600; font-size: clamp(15px, 2.6cqh, 26px); letter-spacing: .2em; padding: .8em 1.8em; color: #000; background: #fff; border: 0; border-radius: 999px; cursor: pointer; }
#start:hover, #start:focus-visible, #replay:hover, #replay:focus-visible { background: var(--beam); outline: none; }
.hint { margin: 0; color: #5d667a; font-family: var(--mono); font-size: clamp(10px, 1.5cqh, 14px); }
#end { background: transparent; place-items: end center; padding-bottom: 10cqh; }
.links { margin: 0; display: flex; gap: 2.4cqw; font-family: var(--mono); font-size: clamp(11px, 1.7cqh, 16px); }
.links a { color: var(--soft); text-decoration: none; border-bottom: 1px solid #445; padding-bottom: 2px; }
.links a:hover { color: #fff; border-color: #fff; }

#bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(980px, calc(100vw - 28px)); display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px;
  background: var(--ui); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 10; transition: opacity .5s ease, transform .5s ease; font-family: var(--mono); font-size: 14px; }
#bar.idle { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
#bar button { background: none; border: 0; color: #fff; font-size: 17px; cursor: pointer; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-family: inherit; }
#bar button.txt { font-size: 13px; font-weight: 600; width: 38px; }
#bar button.off { opacity: .4; }
#bar button:hover, #bar button:focus-visible { background: rgba(255,255,255,.14); outline: none; }
#clock { white-space: nowrap; color: #c8cede; min-width: 98px; text-align: right; }
#scrub { position: relative; flex: 1; height: 34px; cursor: pointer; touch-action: none; }
#track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: rgba(255,255,255,.18); border-radius: 2px; }
#fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--beam); border-radius: 2px; }
#knob { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--beam); left: 0; }
#marks { position: absolute; inset: 0; pointer-events: none; }
#marks i { position: absolute; top: 50%; width: 2px; height: 10px; margin-top: -5px; background: rgba(255,255,255,.45); }
#tip { position: absolute; bottom: 38px; transform: translateX(-50%); white-space: nowrap; background: rgba(0,0,0,.88); padding: 4px 8px; border-radius: 6px; font-size: 13px; opacity: 0; transition: opacity .15s; pointer-events: none; }
#scrub:hover #tip { opacity: 1; }
@media (max-width: 560px) { #bar { gap: 4px; padding: 7px 8px; bottom: 8px; } #clock { display: none; } }
