@font-face { font-family: StripGlyphs; src: url(assets/StripGlyphs.otf) format('opentype'); font-display: block; }
:root { --bg: #030306; --fg: #d8e2ff; --dim: #7c86a8; --red: #ff3b2f; --mint: #7dffc8; --violet: #b45cff; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden;
  font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#fx { pointer-events: none; }
body.choosing #fx { pointer-events: auto; cursor: crosshair; }
[hidden] { display: none !important; }

.screen { position: fixed; inset: 0; padding: 24px 16px; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.kicker { color: var(--dim); letter-spacing: .3em; font-size: 12px; margin: 0; }
#choice { pointer-events: none; }
.kicker.top { position: absolute; top: 24px; left: 16px; right: 16px; text-align: center; }
.glyph { font-family: StripGlyphs; text-transform: uppercase; }

.btn { display: inline-block; background: rgba(3,3,6,.6); color: var(--fg); border: 1px solid var(--dim); padding: 12px 20px;
  font: inherit; letter-spacing: .15em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover, .btn:focus-visible { border-color: var(--mint); color: var(--mint); outline: none; }
.btn.big { font-size: 17px; padding: 16px 28px; }
#pick { display: flex; flex-direction: column; gap: 12px; }
.ghost-btn { position: fixed; right: 16px; bottom: 16px; z-index: 5; background: none; border: 0; color: var(--dim); font: inherit; cursor: pointer; }

.log { position: fixed; left: 16px; top: 16px; z-index: 3; color: var(--mint); font-size: 12px; white-space: pre; pointer-events: none;
  text-shadow: 0 0 6px rgba(125,255,200,.5); }
#labels span { position: fixed; z-index: 2; transform: translate(-50%, 0); color: var(--dim); font-size: 11px; letter-spacing: .25em;
  white-space: nowrap; pointer-events: none; transition: opacity .6s; }

#reticle { position: fixed; left: 50%; top: 50%; width: 46vmin; height: 46vmin; transform: translate(-50%,-50%); z-index: 2;
  pointer-events: none; animation: lock 1.2s ease-out both; }
#reticle i { position: absolute; width: 18%; height: 18%; border: 2px solid var(--red); }
#reticle i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
#reticle i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
#reticle i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
#reticle i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
@keyframes lock { from { transform: translate(-50%,-50%) scale(1.8) rotate(20deg); opacity: 0; } }

#code form { display: flex; flex-direction: column; align-items: center; gap: 14px; }
#codein { width: min(320px, 86vw); background: rgba(3,3,6,.7); border: 1px solid var(--dim); color: var(--fg); padding: 12px;
  font: 22px ui-monospace, Menlo, monospace; letter-spacing: .3em; text-align: center; text-transform: uppercase; }
#codein:focus { outline: none; border-color: var(--mint); }
#codeglyph { font-size: 44px; min-height: 66px; color: var(--violet); letter-spacing: .1em; text-shadow: 0 0 12px rgba(180,92,255,.6); }
.msg { min-height: 1.5em; margin: 0; font-size: 20px; letter-spacing: .3em; }
.msg.no { color: var(--red); animation: shake .4s; }
.msg.yes { color: var(--mint); }
.hint { max-width: 420px; margin: 0; color: var(--dim); min-height: 3em; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }

.reveal { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; margin: 0; font-size: 18px; letter-spacing: .5em;
  color: var(--mint); opacity: 0; transition: opacity .6s; }
.reveal.on { opacity: 1; }

#vid { width: min(92vw, 832px); max-height: 74vh; }
body.hostile #vid { animation: tremor .12s steps(2) infinite; }
@keyframes tremor { 50% { transform: translate(3px,-2px); } }

.file { position: relative; max-width: 720px; margin: 24px auto 40px; padding: 28px 22px; background: rgba(6,7,12,.88);
  border: 1px solid #2a2f44; box-shadow: 0 0 40px rgba(0,0,0,.8); }
.file > * { animation: rise .5s both; }
.stamp { position: absolute; right: 14px; top: 18px; color: var(--red); border: 3px solid var(--red); padding: 4px 10px;
  font-weight: 700; letter-spacing: .2em; transform: rotate(8deg); opacity: .85; }
.dhead { color: var(--red); font-size: 12px; letter-spacing: .15em; margin: 0 110px 4px 0; }
.dfile { color: var(--dim); font-size: 12px; margin: 0 0 18px; }
.dstatus { font-size: 22px; letter-spacing: .2em; margin: 0 0 18px; }
.dstatus.friend { color: var(--mint); } .dstatus.enemy { color: var(--red); } .dstatus.code { color: var(--violet); }
.sec { display: grid; grid-template-columns: 120px 1fr; gap: 4px 16px; padding: 10px 0; border-top: 1px dashed #2a2f44; }
.sec b { color: var(--dim); font-weight: 400; letter-spacing: .15em; font-size: 12px; padding-top: 2px; }
.sec p { margin: 0; }
.sec.lang p { color: #fff; }
@media (max-width: 520px) { .sec { grid-template-columns: 1fr; } .dhead { margin-right: 0; margin-top: 44px; } }
.redact { background: #e9ecf5; color: transparent; padding: 0 2px; cursor: pointer; transition: background .3s, color .3s; }
.redact.open { background: rgba(255,59,47,.18); color: var(--red); }
.redact.locked { cursor: default; }
.specimen { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 14px 0; border-top: 1px dashed #2a2f44; color: var(--dim); font-size: 12px; }
.specimen .glyph { font-size: 30px; color: var(--violet); }
.dline { font-size: 17px; margin: 18px 0; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

#endtext p { margin: 6px 0; letter-spacing: .2em; opacity: 0; animation: appear .6s forwards; }
@keyframes appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#endtext p:last-child { color: var(--red); font-size: 18px; }

/* atmosphere: shadows, eyes, grain (creep.js) */
#shade { pointer-events: none; }
#grain { pointer-events: none; z-index: 20; opacity: .14; mix-blend-mode: screen; image-rendering: pixelated; }
#mute { left: 16px; right: auto; z-index: 21; }
.screen { z-index: 4; }
body.red .file { border-color: #5a1010; }
/* the eye clips are baked on black; fixed screens can't blend with the canvas, so hide the sky behind them */
#bg { transition: opacity .5s; }
body.clipping #bg { opacity: 0; }
body.clipping { background: #000; }
