/* Standalone black terminal easter-egg page (not part of the main site chrome). */

:root {
  --term-bg: #000;
  --term-text: #d6f3ff;
  --term-accent: #4fd7ff;
}

html, body {
  margin: 0;
  height: 100%;
}

body.terminal-page {
  background: var(--term-bg);
  color: var(--term-text);
  font-family: 'Consolas', 'Courier New', monospace;
  cursor: text;
}

.terminal-screen {
  height: 100vh;
  width: 100vw;
  padding: 32px;
  overflow-y: auto;
  box-sizing: border-box;
  font-size: 1.05rem;
  line-height: 1.6;
}

.terminal-output-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-link {
  color: var(--term-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terminal-dir {
  cursor: pointer;
}

.terminal-exec {
  cursor: pointer;
}

.terminal-media {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 16px;
}

.terminal-image {
  max-width: 260px;
  max-height: 220px;
  border: 1px solid rgba(79, 215, 255, 0.35);
  border-radius: 6px;
}

.terminal-media-caption {
  flex-basis: 100%;
  color: var(--term-text);
  opacity: 0.85;
  margin: 4px 0 0;
}


.terminal-link:hover,
.terminal-link:focus-visible {
  color: #fff;
}

.terminal-line {
  display: flex;
  flex-wrap: wrap;
}

.terminal-prompt {
  color: var(--term-accent);
  font-weight: 600;
  white-space: pre;
}

.terminal-typed {
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-cursor {
  display: inline-block;
  animation: term-blink 1s step-end infinite;
}

@keyframes term-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.terminal-hidden-input {
  position: fixed;
  top: -200px;
  left: -200px;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: none;
  background: transparent;
  pointer-events: none;
}

/* ---------- nano-style guestbook editor ---------- */

.nano-editor {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  background: var(--term-bg);
  color: var(--term-text);
  font-family: 'Consolas', 'Courier New', monospace;
}

.nano-editor:not([hidden]) {
  display: flex;
}

.nano-titlebar {
  display: flex;
  justify-content: center;
  gap: 10px;
  background: var(--term-accent);
  color: #001522;
  font-weight: 700;
  padding: 6px 16px;
}

.nano-textarea {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  background: var(--term-bg);
  color: var(--term-text);
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.6;
  padding: 16px 20px;
}

.nano-savebar,
.nano-status {
  padding: 6px 20px;
  border-top: 1px solid rgba(79, 215, 255, 0.25);
}

.nano-shortcuts {
  display: flex;
  gap: 24px;
  background: var(--term-accent);
  color: #001522;
  padding: 6px 16px;
  font-size: 0.95rem;
}

.nano-key {
  font-weight: 700;
  margin-right: 4px;
}

/* ---------- vim-style modal editor ---------- */

.vim-editor {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  background: var(--term-bg);
  color: var(--term-text);
  font-family: 'Consolas', 'Courier New', monospace;
  outline: none;
  cursor: text;
}

.vim-editor:not([hidden]) {
  display: flex;
}

.vim-buffer {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-size: 1.05rem;
  line-height: 1.6;
  white-space: pre;
}

.vim-line {
  min-height: 1.6em;
  display: flex;
}

.vim-linenum {
  flex: 0 0 auto;
  color: rgba(214, 243, 255, 0.4);
  margin-right: 10px;
  white-space: pre;
}

.vim-linenum-current {
  color: var(--term-accent);
}

.vim-line-content {
  flex: 1;
  white-space: pre;
}

/* ---------- :syntax on token colors ---------- */

.vim-syn-keyword {
  color: #ff79c6;
  font-weight: 600;
}

.vim-syn-string {
  color: #f1fa8c;
}

.vim-syn-comment {
  color: #6b8a99;
  font-style: italic;
}

.vim-syn-number {
  color: #bd93f9;
}

.vim-syn-tag {
  color: var(--term-accent);
  font-weight: 600;
}

.vim-syn-attr {
  color: #50fa7b;
}

.vim-syn-variable {
  color: #ffb86c;
}

.vim-syn-preproc {
  color: #8be9fd;
}

.vim-cursor-block {
  background: var(--term-accent);
  color: #001522;
}

.vim-cursor-replace {
  background: #ff6b6b;
  color: #230000;
}

.vim-cursor-insert {
  background: rgba(79, 215, 255, 0.35);
}

.vim-selected {
  background: rgba(79, 215, 255, 0.25);
}

.vim-statusline {
  display: flex;
  justify-content: space-between;
  background: var(--term-accent);
  color: #001522;
  font-weight: 600;
  padding: 2px 16px;
  font-size: 0.95rem;
}

.vim-cmdline {
  padding: 2px 20px;
  min-height: 1.4em;
  font-size: 1rem;
}

/* ---------- htop-style process viewer ---------- */

.htop-viewer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  background: #0a0a0a;
  color: var(--term-text);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  outline: none;
}

.htop-viewer:not([hidden]) {
  display: flex;
}

.htop-header {
  padding: 10px 16px 6px;
  border-bottom: 1px solid rgba(79, 215, 255, 0.25);
}

.htop-meters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-bottom: 6px;
}

.htop-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: pre;
}

.htop-meter-label {
  color: rgba(214, 243, 255, 0.6);
  width: 4ch;
}

.htop-bar {
  color: #001522;
  background: #0f2733;
  border: 1px solid rgba(79, 215, 255, 0.35);
  border-radius: 3px;
  padding: 0 4px;
  white-space: pre;
}

.htop-bar-fill-low { color: #50fa7b; }
.htop-bar-fill-mid { color: #f1fa8c; }
.htop-bar-fill-high { color: #ff6b6b; }

.htop-sysline {
  color: rgba(214, 243, 255, 0.75);
}

.htop-tablewrap {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
}

.htop-tableheader {
  background: var(--term-accent);
  color: #001522;
  font-weight: 700;
  white-space: pre;
  padding: 2px 4px;
  position: sticky;
  top: 0;
}

.htop-row {
  white-space: pre;
  padding: 1px 4px;
}

.htop-row-you {
  color: #fff;
  font-weight: 700;
}

.htop-footer {
  display: flex;
  gap: 18px;
  background: var(--term-accent);
  color: #001522;
  font-weight: 600;
  padding: 4px 16px;
  font-size: 0.9rem;
}

.htop-footer-key {
  color: #001522;
  background: #0a2430;
  border-radius: 2px;
  padding: 0 4px;
  margin-right: 4px;
  font-weight: 700;
}
