/* ═══════════════════════════════════════════════════════════════
   ORION-7 — Terminal Interface
   Division of Reality Coherence | Internal Development Server
   
   This interface was not designed for public access.
   It was not designed against it either.
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

:root {
  --bg: #0a0c10;
  --bg-surface: #0f1117;
  --bg-input: #12141c;
  --bg-highlight: #1a1d28;
  
  --text: #c4c8d4;
  --text-dim: #6b7084;
  --text-dimmer: #3d4155;
  --text-bright: #e2e5ed;
  
  --accent: #2a7a6c;
  --accent-dim: #1a4f45;
  --accent-bright: #3aa594;
  
  --warn: #a07c1c;
  --warn-dim: #6b5312;
  
  --alert: #8b3a2a;
  --alert-bright: #c4562b;
  
  --odd: #6b5f83;
  --odd-bright: #8b7fa3;
  
  --border: #1e2130;
  --border-light: #282c3e;
  
  --font: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
  
  --cursor-blink: 1.1s;
}

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

::selection {
  background: var(--accent-dim);
  color: var(--text-bright);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────────────────── */

.terminal {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.terminal__header {
  flex-shrink: 0;
  padding: 20px 0 12px;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.terminal__title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.terminal__title span {
  color: var(--accent);
}

.terminal__meta {
  display: flex;
  gap: 24px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dimmer);
}

.terminal__meta .active {
  color: var(--accent-dim);
}

/* ── Output Area ─────────────────────────────────────────── */

.terminal__output {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  scroll-behavior: smooth;
}

.terminal__output::-webkit-scrollbar {
  width: 4px;
}

.terminal__output::-webkit-scrollbar-track {
  background: transparent;
}

.terminal__output::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Messages ────────────────────────────────────────────── */

.msg {
  margin-bottom: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.msg--system {
  color: var(--text-dim);
  font-size: 12px;
  font-style: italic;
}

.msg--user {
  color: var(--text-bright);
}

.msg--user::before {
  content: '> ';
  color: var(--accent);
}

.msg--orion {
  color: var(--text);
  padding-left: 2px;
}

.msg--orion .label {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 4px;
}

.msg--error {
  color: var(--alert-bright);
  font-size: 12px;
}

.msg--warn {
  color: var(--warn);
  font-size: 12px;
}

/* ── Typing Effect ───────────────────────────────────────── */

.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink var(--cursor-blink) step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.msg--orion .redacted {
  color: var(--odd-bright);
  text-decoration: line-through;
  opacity: 0.4;
  font-style: italic;
}

/* ── Input Area ──────────────────────────────────────────── */

.terminal__input-area {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 12px 0 20px;
}

.terminal__input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal__prompt {
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
  user-select: none;
}

.terminal__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.65;
  caret-color: var(--accent);
}

.terminal__input::placeholder {
  color: var(--text-dimmer);
}

.terminal__input:disabled {
  opacity: 0.5;
}

/* ── Efficiency Counter ──────────────────────────────────── */

.efficiency {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 11px;
  color: var(--text-dimmer);
  user-select: none;
  font-family: var(--font);
  letter-spacing: 0.05em;
  transition: color 2s ease;
}

.efficiency.elevated {
  color: var(--accent-dim);
}

.efficiency.critical {
  color: var(--warn-dim);
}

/* ── Scan Lines (subtle) ─────────────────────────────────── */

.terminal::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  z-index: 1000;
}

/* ── Status Bar ──────────────────────────────────────────── */

.terminal__status {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 999;
}

.terminal__status-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s ease;
}

.terminal__status-fill.active {
  animation: pulse-bar 2s ease-in-out infinite;
}

@keyframes pulse-bar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 600px) {
  .terminal {
    padding: 0 12px;
  }
  
  body {
    font-size: 12px;
  }
  
  .terminal__meta {
    flex-direction: column;
    gap: 2px;
  }
  
  .efficiency {
    bottom: 12px;
    right: 12px;
    font-size: 10px;
  }
}

/* ── Print (prevent) ─────────────────────────────────────── */

@media print {
  body::before {
    content: 'ORION-7: Printing this terminal output is not recommended. The content may have changed between render and capture. It usually does.';
    display: block;
    padding: 40px;
    font-family: monospace;
  }
  .terminal { display: none; }
}
