/* ANARCHY666 — O.R.A. SECURE TERMINAL
   A deliberately separate visual world from the rest of the site: a
   green-phosphor DOS-style terminal, full-screen, self-contained. */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

:root {
  --term-bg: #050f09;
  --term-green: #52ff8f;
  --term-green-dim: #2c8f56;
  --term-amber: #ffb627;
}

a { color: inherit; }

body.terminal-body {
  background: #000;
  overflow: hidden;
}

.disconnect-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--term-green-dim);
  border: 1px solid var(--term-green-dim);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.disconnect-link:hover,
.disconnect-link:focus-visible {
  color: var(--term-green);
  border-color: var(--term-green);
}

.crt {
  position: relative;
  height: 100vh;
  background: var(--term-bg);
}
.crt::before {
  /* scanlines */
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, rgba(0,0,0,0.3) 0px, rgba(0,0,0,0.3) 1px,
    transparent 1px, transparent 3px
  );
  pointer-events: none;
  z-index: 5;
}
.crt::after {
  /* tube vignette */
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  z-index: 4;
}

.terminal-screen {
  height: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 2.2rem clamp(1rem, 4vw, 3rem) 1.6rem;
  display: flex;
  flex-direction: column;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  line-height: 1.35;
  color: var(--term-green);
  text-shadow: 0 0 4px rgba(82,255,143,0.55), 0 0 1px rgba(82,255,143,0.9);
  animation: flicker 6s infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.93; }
  94% { opacity: 1; }
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--term-green-dim) transparent;
}
.terminal-output::-webkit-scrollbar { width: 8px; }
.terminal-output::-webkit-scrollbar-track { background: transparent; }
.terminal-output::-webkit-scrollbar-thumb { background: var(--term-green-dim); border-radius: 4px; }

.terminal-output .line { min-height: 1.3em; }
.terminal-output .err { color: var(--term-amber); }
.terminal-output .dim { color: var(--term-green-dim); }
.terminal-output .ok { color: var(--term-green); font-weight: bold; }

.terminal-input-line {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(82,255,143,0.18);
}
.prompt { flex-shrink: 0; cursor: text; }
.terminal-input {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--term-green);
  caret-color: var(--term-green);
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  text-shadow: 0 0 4px rgba(82,255,143,0.55);
}
.terminal-input:disabled { opacity: 0.5; }

@media (max-width: 640px) {
  .terminal-screen { font-size: 1.05rem; padding: 4rem 1rem 1.2rem; }
  .terminal-input { font-size: 1.05rem; }
  .disconnect-link { font-size: 0.9rem; padding: 0.25rem 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-screen { animation: none; }
}
