:root {
  --void: #0b0907; --rust: #5a2c14; --rust2: #8a4a22;
  --brass: #c9a24a; --brass-hi: #f1d58a; --brass-lo: #6b4f1c; --copper: #b8683a;
  --neon: #33f5d2; --amber: #ffb02e; --blood: #ff4a3d; --phosphor: #9dffb0;
  --ink: #e9dcc0; --muted: #9a8a6c;
  --mono: 'Share Tech Mono', ui-monospace, monospace;
  --stencil: 'Black Ops One', Impact, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--void); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 16px/1.55 var(--mono);
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(255,140,40,.18), transparent 70%),
    radial-gradient(ellipse 50% 50% at 100% 100%, rgba(51,245,210,.10), transparent 70%),
    radial-gradient(circle at 70% 20%, rgba(138,74,34,.35), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #17110c, #0b0907 60%);
}
.scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 10;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
main { max-width: 820px; margin: 0 auto; padding: 28px 16px 80px; position: relative; }

/* Brass nameplate */
.plate {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 20px 28px; border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 2px, transparent 2px 5px),
    linear-gradient(160deg, #3a2a14, #1d150b 55%, #2c1e0e);
  border: 2px solid var(--brass-lo);
  box-shadow: inset 0 1px 0 rgba(241,213,138,.25), inset 0 -2px 0 rgba(0,0,0,.6), 0 10px 30px rgba(0,0,0,.6);
}
.plate::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 6px; border-radius: 2px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, #111 10px 20px); opacity: .75;
}
.rivet { position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-hi), var(--brass) 40%, var(--brass-lo) 80%);
  box-shadow: 0 1px 2px #000; }
.tl { top: 7px; left: 7px; } .tr { top: 7px; right: 7px; } .bl { bottom: 7px; left: 7px; } .br { bottom: 7px; right: 7px; }
h1 {
  margin: 0; font: 400 clamp(2rem, 7vw, 3.2rem)/1 var(--stencil); letter-spacing: .08em; position: relative;
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255,176,46,.8), 0 0 22px rgba(255,120,20,.45), 2px 2px 0 #3a1a05;
  animation: flicker 7s infinite;
}
h1::after { /* glitch ghost */
  content: attr(data-text); position: absolute; left: 2px; top: 0; color: var(--neon); opacity: .35;
  clip-path: inset(0 0 62% 0); text-shadow: none; animation: glitch 4.5s steps(1) infinite;
}
.sub { margin: 6px 0 0; color: var(--muted); font-size: .8rem; letter-spacing: .25em; text-transform: uppercase; }
.dial { display: flex; flex-direction: column; gap: 4px; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
select, button {
  font: 1rem var(--mono); color: var(--brass-hi); cursor: pointer;
  background: linear-gradient(180deg, #2b2012, #140e07); border: 1px solid var(--brass-lo); border-radius: 4px;
  padding: 6px 12px; box-shadow: inset 0 1px 0 rgba(241,213,138,.2), 0 2px 0 #000;
}
select:focus, button:focus-visible { outline: 1px solid var(--neon); box-shadow: 0 0 12px rgba(51,245,210,.5); }
button:hover { color: var(--void); background: linear-gradient(180deg, var(--brass-hi), var(--brass)); }
button:active { transform: translateY(1px); }
/* CRT result terminals */
.crt {
  position: relative; padding: 14px 18px 16px; border-radius: 10px;
  background: radial-gradient(ellipse at 50% 40%, #0d1f15, #040a07 80%);
  border: 3px solid #2a1f12; outline: 2px solid var(--brass-lo); outline-offset: -1px;
  box-shadow: inset 0 0 30px rgba(0,0,0,.9), inset 0 0 4px rgba(157,255,176,.2), 0 8px 24px rgba(0,0,0,.6);
  animation: boot .5s ease-out;
}
.crt::before {
  content: ""; position: absolute; inset: 0; border-radius: 8px; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(157,255,176,.04) 0 1px, transparent 1px 3px);
}
.head { display: flex; align-items: center; gap: 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.lamp { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: blink 1s steps(2) infinite; }
.crt.ok .lamp { background: var(--phosphor); box-shadow: 0 0 8px var(--phosphor); animation: none; }
.crt.err .lamp { background: var(--blood); box-shadow: 0 0 10px var(--blood); animation: none; }
.name { color: var(--brass-hi); overflow-wrap: anywhere; flex: 1; }
.status { color: var(--amber); white-space: nowrap; }
.crt.ok .status { color: var(--phosphor); }
.crt.err .status, .crt.err .text { color: var(--blood); text-shadow: 0 0 6px rgba(255,74,61,.5); }
.text {
  margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem;
  color: var(--phosphor); text-shadow: 0 0 5px rgba(157,255,176,.55);
}
.text:empty { display: none; }
.crt.ok .text::after { content: "█"; margin-left: 2px; animation: blink 1s steps(2) infinite; }
.actions { display: flex; gap: 10px; margin-top: 14px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wave { 0%, 100% { height: 20%; } 50% { height: 100%; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes boot { from { opacity: 0; transform: scaleY(.02); filter: brightness(3); } to { opacity: 1; transform: none; filter: none; } }
@keyframes flicker { 0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .55; } }
@keyframes glitch { 0%, 88% { transform: none; opacity: 0; } 89% { transform: translate(-3px, 1px); opacity: .5; } 92% { transform: translate(3px, -1px); opacity: .4; } 95% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
@media (max-width: 520px) { .plate { padding: 18px 20px; } .sub { letter-spacing: .12em; } }

/* YT-Transcribe */
a { color: var(--neon); }
.brand { text-decoration: none; }
h2 { margin: 36px 0 10px; font: 400 1.2rem var(--stencil); letter-spacing: .08em; color: var(--brass); }
.console {
  margin-top: 34px; padding: 22px; border-radius: 10px; display: flex; flex-direction: column; gap: 16px;
  background: radial-gradient(circle at 50% 0%, rgba(51,245,210,.07), transparent 60%), linear-gradient(180deg, #19120b, #0e0a06);
  border: 2px solid var(--rust2); box-shadow: inset 0 0 40px rgba(0,0,0,.8), 0 0 0 4px #120c07, 0 0 0 6px var(--brass-lo);
}
.url { display: flex; flex-direction: column; gap: 6px; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
input[type=text], input[type=password] {
  width: 100%; font: 1.05rem var(--mono); color: var(--phosphor); padding: 10px 12px; border-radius: 4px;
  background: #040a07; border: 1px solid var(--brass-lo); box-shadow: inset 0 0 12px rgba(0,0,0,.9); text-shadow: 0 0 5px rgba(157,255,176,.5);
}
input:focus { outline: 1px solid var(--neon); box-shadow: 0 0 12px rgba(51,245,210,.4); }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.row button { margin-left: auto; font-size: 1.05rem; padding: 9px 20px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); padding-bottom: 8px; cursor: pointer; }
.check input { accent-color: var(--amber); width: 18px; height: 18px; }
.flash.err { color: var(--blood); text-shadow: 0 0 6px rgba(255,74,61,.5); margin: 14px 4px 0; }
.recent { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.recent a { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 6px; text-decoration: none;
  background: linear-gradient(180deg, #1a130b, #100b06); border: 1px solid var(--brass-lo); }
.recent a:hover { border-color: var(--neon); }
.recent strong { color: var(--brass-hi); font-weight: 400; overflow-wrap: anywhere; }
.recent span { color: var(--muted); font-size: .82rem; }
.logout { margin-top: 40px; text-align: right; }
.logout button { font-size: .8rem; padding: 4px 10px; }
article.crt { margin-top: 34px; }
.meta { margin: 8px 0 0; color: var(--muted); font-size: .85rem; }
.text p { margin: 0 0 1em; }
.text p:last-child { margin-bottom: 0; }
.crt.ok .text p:last-child::after { content: "█"; margin-left: 2px; animation: blink 1s steps(2) infinite; }
.crt.ok .text::after { content: none; }
.btn { display: inline-block; font: 1rem var(--mono); color: var(--brass-hi); text-decoration: none;
  background: linear-gradient(180deg, #2b2012, #140e07); border: 1px solid var(--brass-lo); border-radius: 4px;
  padding: 6px 12px; box-shadow: inset 0 1px 0 rgba(241,213,138,.2), 0 2px 0 #000; }
.btn:hover { color: var(--void); background: linear-gradient(180deg, var(--brass-hi), var(--brass)); }
.actions { flex-wrap: wrap; }
body.busy .lamp { background: var(--amber); }
@media (max-width: 520px) { .row button { margin-left: 0; width: 100%; } }
.tldr { margin: 16px 0 18px; padding: 12px 16px; border-left: 3px solid var(--amber); background: rgba(255,176,46,.06); border-radius: 4px; color: var(--ink); }
.tldr h2 { margin: 0 0 6px; font-size: 1rem; color: var(--amber); }
.tldr p { margin: 0 0 6px; }
.tldr ul { margin: 0; padding-left: 1.2em; }
.tldr li { margin: 3px 0; }
.tldr .wait { color: var(--muted); animation: blink 1.2s steps(2) infinite; }
