/* ================================================================
   PROPHETTE — terminal.css
   Standalone terminal page styles
   ================================================================ */

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

:root {
  --bg:          #030000;
  --bg-chrome:   #0a0303;
  --text:        #b89070;
  --text-bright: #eee0d8;
  --text-dim:    #7a5252;
  --red:         #a81212;
  --red-bright:  #c41f1f;
  --glow-text:   rgba(184, 144, 112, 0.35);
  --glow-red:    rgba(168, 18, 18, 0.5);
  --font:        'Space Mono', monospace;
}

html, body {
  height: 100%;
  background: #000;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  overflow: hidden;
}

/* ----------------------------------------------------------------
   WRAPPER
   ---------------------------------------------------------------- */
.terminal-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  box-shadow:
    0 0 60px rgba(168, 18, 18, 0.1),
    0 0 180px rgba(168, 18, 18, 0.05);
}

/* ----------------------------------------------------------------
   CHROME BAR
   ---------------------------------------------------------------- */
.terminal-chrome {
  background: var(--bg-chrome);
  border-bottom: 1px solid #1e0808;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  user-select: none;
}

.chrome-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #5c1515;
  border: 1px solid #8a2525;
}

.chrome-title {
  flex: 1;
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.chrome-exit {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: color 0.2s;
  line-height: 1;
}
.chrome-exit:hover { color: var(--red-bright); }

/* ----------------------------------------------------------------
   TERMINAL SCREEN
   ---------------------------------------------------------------- */
.terminal-screen {
  flex: 1;
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.75rem;
  overflow: hidden;
  animation: screen-on 0.6s ease-out forwards;
  cursor: text;
}

@keyframes screen-on {
  0%   { opacity: 0; }
  15%  { opacity: 0.7; }
  18%  { opacity: 0.1; }
  22%  { opacity: 0.85; }
  30%  { opacity: 0.5; }
  40%  { opacity: 1; }
  100% { opacity: 1; }
}

/* CRT scanlines */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent      0px,
    transparent      2px,
    rgba(0,0,0,0.13) 2px,
    rgba(0,0,0,0.13) 4px
  );
  pointer-events: none;
  z-index: 10;
}

/* Edge vignette */
.terminal-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
  z-index: 11;
}

/* ----------------------------------------------------------------
   OUTPUT AREA
   ---------------------------------------------------------------- */
.terminal-output {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 2;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}

.terminal-output::-webkit-scrollbar       { width: 3px; }
.terminal-output::-webkit-scrollbar-track  { background: transparent; }
.terminal-output::-webkit-scrollbar-thumb  { background: var(--red); border-radius: 2px; }

/* ----------------------------------------------------------------
   LINE TYPES
   ---------------------------------------------------------------- */
.line {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1.65em;
  animation: line-in 0.12s ease forwards;
}

@keyframes line-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.line-blank {
  display: block;
  min-height: 1.65em;
  animation: line-in 0.12s ease forwards;
}

/* Divider lines (━━━) */
.line-divider {
  color: var(--red);
  text-shadow: 0 0 8px var(--glow-red);
}

/* Large header text */
.line-header {
  color: var(--text-bright);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(238,224,216,0.25), 0 0 30px var(--glow-red);
}

/* Dimmed system text */
.line-dim {
  color: var(--text-dim);
}

/* Boot check lines */
.line-boot {
  color: var(--text);
  text-shadow: 0 0 6px var(--glow-text);
}

/* Important / standout */
.line-bright {
  color: var(--text-bright);
  text-shadow: 0 0 10px rgba(238,224,216,0.2);
}

/* User-entered command (echoed back) */
.line-cmd {
  color: var(--red-bright);
  text-shadow: 0 0 8px var(--glow-red);
}

/* Command output text */
.line-output {
  color: var(--text);
  text-shadow: 0 0 6px var(--glow-text);
  padding-left: 2ch;
}

/* Error output */
.line-error {
  color: var(--red-bright);
  text-shadow: 0 0 8px var(--glow-red);
  padding-left: 2ch;
}

/* Mask file — ASCII art display */
.line-mask {
  display: block;
  white-space: pre;
  color: var(--text-dim);
  font-size: 0.72em;
  line-height: 1.25;
  padding-left: 0;
  letter-spacing: 0;
  animation: line-in 0.06s ease forwards;
}

/* ----------------------------------------------------------------
   INPUT ROW
   ---------------------------------------------------------------- */
.terminal-input-row {
  display: none; /* shown by JS after boot */
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  padding-top: 0.15rem;
  position: relative;
  z-index: 2;
}

.prompt-context {
  color: var(--text);
  flex-shrink: 0;
  user-select: none;
  white-space: nowrap;
  transition: color 0.25s;
}

.prompt-char {
  color: var(--red);
  font-size: 1rem;
  text-shadow: 0 0 10px var(--glow-red);
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
  margin-left: 0.5ch;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  caret-color: var(--red-bright);
  text-shadow: 0 0 8px rgba(238,224,216,0.2);
}

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 600px) {
  html, body          { font-size: 12px; }
  .terminal-screen    { padding: 1rem; }
  .chrome-title       { font-size: 0.52rem; letter-spacing: 0.15em; }
}
