* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

::selection {
  background: #00ff00;
  color: #000;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb {
  background: #0a0a0a;
  border: 1px solid #00ff00;
}

/* matrix background canvas */
#matrixBg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.2;
  pointer-events: none;
}

/* scanlines overlay */
.scanlines {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,255,0,0.03) 0px,
    rgba(0,255,0,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* glitch overlay */
.glitch-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  background: rgba(0,255,0,0.02);
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0%   { opacity: 0; }
  50%  { opacity: 0.03; }
  100% { opacity: 0; }
}

/* top fine print */
.top-fineprint {
  position: fixed;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #888;
  letter-spacing: 3px;
  text-transform: uppercase;
  z-index: 10000;
  user-select: none;
  opacity: 0.6;
}

.term-body {
  padding: 28px 32px;
  height: 100vh;
  overflow-y: auto;
  position: relative;
  background: #000;
  z-index: 1;
}

/* boot sequence */
.boot-sequence { margin-bottom: 20px; }

.boot-sequence .line {
  opacity: 0;
  animation: fadeIn 0.3s forwards;
  margin-bottom: 3px;
  font-size: 13px;
}

.boot-sequence .warn {
  color: #888;
}
.boot-sequence .warn::before { content: ""; }

.boot-sequence .success {
  color: #00ff00;
  text-shadow: 0 0 8px rgba(0,255,0,0.6);
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ascii art */
.ascii-art {
  color: #00ff00;
  font-size: 10px;
  line-height: 1.2;
  margin: 20px 0;
  text-align: center;
  text-shadow: 0 0 6px rgba(0,255,0,0.4);
  opacity: 0.9;
  letter-spacing: 0;
  word-spacing: 0;
}

/* glitch text */
.glitch-text {
  text-align: center;
  margin: 10px 0;
  font-size: 11px;
  color: #555;
  letter-spacing: 4px;
  animation: glitchShift 2s infinite;
}

@keyframes glitchShift {
  0%, 100% { transform: translateX(0); opacity: 0.3; }
  10% { transform: translateX(2px); opacity: 0.6; }
  20% { transform: translateX(-1px); opacity: 0.2; }
  30% { transform: translateX(0); opacity: 0.4; }
  50% { transform: translateX(1px); opacity: 0.1; }
  80% { transform: translateX(-2px); opacity: 0.5; }
}

/* status panel */
.status-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  margin: 20px 0;
  padding: 12px;
  border: 1px solid #0f0f0f;
  background: #050505;
}

.stat {
  font-size: 12px;
  letter-spacing: 0.5px;
}

.stat .label { color: #555; margin-right: 8px; }
.stat .val.green { color: #00ff00; }
.stat .val.gray { color: #666; }

/* live feed */
.feed {
  margin: 16px 0 8px 0;
  padding: 8px;
  border: 1px solid #0a0a0a;
  background: #030303;
  max-height: 100px;
  overflow: hidden;
}

.feed-line {
  font-size: 12px;
  color: #00ff00;
  opacity: 0.7;
  margin-bottom: 2px;
  animation: scrollIn 0.5s ease;
}

@keyframes scrollIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 0.7; transform: translateY(0); }
}

/* input line */
.input-line {
  margin-top: 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.prompt {
  color: #00ff00;
  font-weight: bold;
  flex-shrink: 0;
}

.term-input {
  background: transparent;
  border: none;
  outline: none;
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  caret-color: #00ff00;
  flex: 1;
  margin-left: 4px;
}

.term-input::selection {
  background: #00ff00;
  color: #000;
}

.term-input::placeholder {
  color: #0f0f0f;
}

.output-area {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.out-err {
  color: #ff4444;
}

.out-upload {
  color: #888;
  font-size: 13px;
  font-family: "Courier New", Courier, monospace;
  margin-top: 2px;
}

.out-upload.done {
  color: #00ff00;
}

.out-camera {
  color: #00ff00;
  animation: flicker 0.1s infinite;
}

/* corner info */
.corner-info {
  position: fixed;
  bottom: 12px;
  right: 16px;
  text-align: right;
  z-index: 9997;
}

.corner-line {
  font-size: 11px;
  color: #444;
  letter-spacing: 1px;
}

.corner-line.blinking {
  color: #00ff00;
  animation: slowBlink 2s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(0,255,0,0.3);
}

@keyframes slowBlink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* term-body glitch flicker */
@keyframes termFlicker {
  0%   { opacity: 1; }
  2%   { opacity: 0; }
  4%   { opacity: 1; }
  6%   { opacity: 0.3; }
  8%   { opacity: 1; }
  10%  { opacity: 0.8; }
  12%  { opacity: 1; }
  30%  { opacity: 1; }
  32%  { opacity: 0.1; }
  34%  { opacity: 0.9; }
  36%  { opacity: 1; }
  100% { opacity: 1; }
}

.term-body.flicker {
  animation: termFlicker 0.6s ease-in-out;
}

@keyframes termBlackout {
  0%   { opacity: 1; }
  15%  { opacity: 0; }
  30%  { opacity: 0.2; }
  45%  { opacity: 0; }
  60%  { opacity: 0.5; }
  75%  { opacity: 0; }
  100% { opacity: 1; }
}

.term-body.blackout {
  animation: termBlackout 0.4s ease-in-out;
}

/* camera access overlay — TUI style */
.camera-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.camera-box {
  border: 1px solid #1a1a1a;
  background: #050505;
  padding: 20px 32px;
  text-align: center;
}

.camera-text {
  font-size: 14px;
  color: #ff4444;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.camera-upload {
  font-size: 12px;
  color: #555;
  font-family: "Courier New", Courier, monospace;
}



/* warning overlay — terminal style */
.warning-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.4s ease;
}

.warning-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.warn-term {
  width: 90%;
  max-width: 640px;
  padding: 28px 32px;
  border: 1px solid #0f0f0f;
  background: #000;
}

.warn-line {
  font-size: 14px;
  line-height: 1.7;
  font-family: "Courier New", Courier, monospace;
}

.warn-prompt {
  color: #00ff00;
  font-weight: bold;
}

.warn-cmd {
  color: #00ff00;
  opacity: 0.8;
}

.warn-out {
  color: #666;
  margin-left: 2px;
}

.warn-q {
  color: #888;
  margin-top: 12px;
  font-size: 14px;
}

.warn-input {
  margin-top: 6px;
  font-size: 14px;
  color: #00ff00;
}

.warn-cursor {
  color: #00ff00;
  font-weight: bold;
}

.warn-blink {
  animation: blink 0.8s step-end infinite;
  color: #00ff00;
}



/* glitch animation for random elements */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

.glitch-it {
  animation: glitch 0.2s infinite;
}
