/* ==========================================================================
   aeonme.com — Space Station Terminal
   ========================================================================== */

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

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #020a14;
  font-family: 'Courier New', 'IBM Plex Mono', 'JetBrains Mono', 'Fira Code',
               'SF Mono', 'Menlo', monospace;
}

/* --- Starfield ---------------------------------------------------------- */
#starfield-canvas {
  position: fixed; inset: 0; z-index: 0;
}

/* --- Terminal Window ---------------------------------------------------- */
#terminal {
  position: relative; z-index: 50;
  width: 92%; max-width: 900px;
  height: 85vh;
  margin: 5vh auto;
  background: rgba(2, 10, 26, 0.94);
  border: 1px solid rgba(60, 150, 240, 0.2);
  border-radius: 6px;
  box-shadow:
    0 0 30px rgba(40, 130, 220, 0.08),
    0 0 80px rgba(30, 100, 200, 0.04),
    inset 0 0 40px rgba(20, 80, 180, 0.03);
  display: flex; flex-direction: column;
  font-size: 14px; line-height: 1.5;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}
#terminal.active { opacity: 1; }

/* --- Header ------------------------------------------------------------- */
.terminal-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(30, 90, 190, 0.06);
  border-bottom: 1px solid rgba(50, 140, 230, 0.12);
  font-size: 12px;
  user-select: none; flex-shrink: 0;
}
.header-spacer { flex: 1; }

/* --- Earth Signal Indicator --------------------------------------------- */
.earth-signal {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: 3px;
}

.sig-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ff6b6b;
  box-shadow: 0 0 6px rgba(255, 107, 107, 0.6);
  animation: sig-blink 2s ease-in-out infinite;
  transition: background 0.5s, box-shadow 0.5s;
}
.sig-dot.lost {
  background: #333;
  box-shadow: none;
  animation: none;
}

.sig-label {
  color: rgba(255, 150, 140, 0.7);
  font-size: 9px;
  letter-spacing: 1px;
}

.sig-strength {
  color: #ff6b6b;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1.5px;
}

@keyframes sig-blink {
  0%, 85%, 100% { opacity: 1; }
  88%, 92% { opacity: 0.15; }
  90% { opacity: 0.05; }
  95% { opacity: 0.4; }
}

/* Occasionally drop the signal entirely */
@keyframes sig-drop {
  0%, 94%, 100% { opacity: 1; }
  95%, 97% { opacity: 0.05; }
  96% { opacity: 0; }
}

.header-divider {
  color: rgba(50, 140, 230, 0.12);
  font-size: 14px;
}

.status-indicators { display: flex; gap: 6px; }

.stat {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: rgba(110, 170, 230, 0.5);
  letter-spacing: 0.5px;
}
.stat::after { content: attr(data-label); }

.stat-light {
  width: 6px; height: 6px; border-radius: 1px;
  background: #333;
}
.stat-light.on {
  background: #6bcb77;
  box-shadow: 0 0 4px rgba(107, 203, 119, 0.5);
}

.terminal-header .title { opacity: 0.4; font-size: 11px; }

/* --- Output Area -------------------------------------------------------- */
#output-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
  font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  color: #a0d0f8;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(50, 140, 230, 0.1) transparent;
}
/* Terminal output scrollbar — futuristic glow */
#output-area::-webkit-scrollbar { width: 5px; }
#output-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-left: 1px solid rgba(50, 140, 230, 0.06);
}
#output-area::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(60, 150, 230, 0.25), rgba(30, 100, 200, 0.15));
  border-radius: 3px;
  box-shadow: inset 0 0 4px rgba(80, 160, 240, 0.2);
}
#output-area::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(80, 170, 250, 0.4), rgba(40, 120, 220, 0.25));
}

/* Boot screen scrollbar — matching theme */
#boot-output::-webkit-scrollbar { width: 5px; }
#boot-output::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-left: 1px solid rgba(50, 140, 230, 0.04);
}
#boot-output::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(60, 150, 230, 0.2), rgba(30, 100, 200, 0.1));
  border-radius: 3px;
}
#boot-output::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(80, 170, 250, 0.35), rgba(40, 120, 220, 0.2));
}

/* --- Output Lines ------------------------------------------------------- */
.output-line { color: #a0d0f8; min-height: 1.5em; }
#output-area .output-line.error { color: #ff6b6b; }
.output-line.dim { color: rgba(120, 170, 220, 0.42); }
.output-line.bright {
  color: #d0e8ff;
  text-shadow: 0 0 5px rgba(70, 150, 230, 0.5), 0 0 15px rgba(50, 120, 210, 0.25);
}
.output-line.ascii-art {
  color: #88c8f0; line-height: 1.15;
  text-shadow: 0 0 3px rgba(60, 140, 220, 0.35), 0 0 8px rgba(40, 110, 190, 0.15);
}
#output-area .output-line.ok { color: #6bcb77; }
#output-area .output-line.warn { color: #ffb347; }
#output-area .output-line.critical { color: #ff6b6b; }
#output-area .output-line.info { color: #50a8f0; }
.output-line a { color: #50a8f0; text-decoration: underline; }
.output-line a:hover { color: #b8dfff; }

/* --- Input Line --------------------------------------------------------- */
#input-line {
  display: flex; align-items: center;
  padding: 8px 16px;
  border-top: 1px solid rgba(50, 140, 230, 0.07);
  flex-shrink: 0;
}
#input-line .prompt {
  color: #50a0e8; white-space: pre;
  text-shadow: 0 0 3px rgba(40, 120, 220, 0.4);
  user-select: none;
}
#cmd-input {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: #a0d0f8;
  font-family: inherit; font-size: inherit; line-height: inherit;
  caret-color: #60b8f0;
  min-width: 0;
}
#cmd-input::selection { background: rgba(40, 130, 220, 0.3); color: #d0e8ff; }

/* --- Boot Screen -------------------------------------------------------- */
#boot-screen {
  position: fixed; inset: 0; z-index: 100;
  background: #020a14;
  color: #a0d0f8;
  font-family: inherit; font-size: 14px; line-height: 1.5;
  display: flex; flex-direction: column;
  padding: 5vh 5vw;
  cursor: default;
  transition: opacity 0.6s ease;
}
#boot-output {
  flex: 1; overflow-y: auto;
  font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  text-shadow: 0 0 3px rgba(60, 130, 200, 0.35), 0 0 8px rgba(30, 90, 160, 0.12);
}
#boot-status {
  display: flex; align-items: center; gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(50, 120, 200, 0.08);
}
#boot-skip-hint {
  font-size: 11px;
  color: rgba(100, 150, 210, 0.3);
  opacity: 0;
  animation: fadeInHint 3s ease 2s forwards;
}
@keyframes fadeInHint { to { opacity: 1; } }
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Boot screen colors */
.boot-ok { color: #6bcb77; }
.boot-warn { color: #ffb347; }
.boot-error { color: #ff6b6b; }
.boot-dim { color: rgba(120, 170, 220, 0.5); }

/* --- Mobile ------------------------------------------------------------- */
@media (max-width: 900px) {
  #terminal { width: 96%; height: 90vh; margin: 3vh auto; font-size: 13px; }
}
@media (max-width: 768px) {
  #terminal {
    width: 100%; height: 100vh; height: 100dvh;
    margin: 0; border-radius: 0; border: none; box-shadow: none;
    font-size: 12px;
  }
  .terminal-header { padding: 6px 10px; font-size: 10px; }
  #output-area { padding: 8px 10px; font-size: 12px; line-height: 1.4; }
	  #boot-screen { font-size: 12px; }
	  #boot-output { font-size: 12px; line-height: 1.4; }
  #cmd-input { font-size: 16px; }
  #input-line { font-size: 13px; padding: 6px 10px; }
}
@media (max-width: 400px) {
  .terminal-header .title { display: none; }
  #input-line .prompt { font-size: 11px; }
}
