:root {
  --bg: #0a0d10;
  --panel: #11161c;
  --panel-top: #171d25;
  --text: #d7e0ea;
  --muted: #8a98a8;
  --line: #24303c;
  --accent: #7ee787;
  --accent-dim: #56d364;
  --glow: rgba(126, 231, 135, 0.42);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --max-width: 860px;
  --radius: 22px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", "SFMono-Regular", "Consolas", monospace;
  text-shadow: 0 0 8px rgba(126, 231, 135, 0.08);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.18;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(126, 231, 135, 0.05) 0%,
      transparent 18%,
      transparent 82%,
      rgba(126, 231, 135, 0.04) 100%
    );
  opacity: 0.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-shadow: 0 0 10px rgba(126, 231, 135, 0.3);
}

a:hover {
  color: var(--text);
}

.screen-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(126, 231, 135, 0.08), transparent 55%),
    radial-gradient(circle at 50% 0%, rgba(86, 211, 100, 0.07), transparent 30%);
}

.terminal-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.terminal-window {
  width: min(100%, var(--max-width));
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.terminal-window::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 4px
    );
  opacity: 0.09;
}

.terminal-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(126, 231, 135, 0.08),
    inset 0 0 28px rgba(126, 231, 135, 0.06),
    0 0 26px rgba(86, 211, 100, 0.08);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-top);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.terminal-dots span:first-child {
  background: #ff5f56;
}

.terminal-dots span:nth-child(2) {
  background: #ffbd2e;
}

.terminal-dots span:nth-child(3) {
  background: #27c93f;
}

.terminal-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.terminal-body {
  position: relative;
  padding: 24px 20px 28px;
  line-height: 1.8;
  font-size: 0.98rem;
  color: #d9fbe0;
}

.terminal-body p,
.output-list {
  margin: 0 0 10px;
}

.live-block {
  margin-top: 18px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(126, 231, 135, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(126, 231, 135, 0.03);
  box-shadow: inset 0 0 20px rgba(126, 231, 135, 0.04);
}

.boot-line {
  color: var(--accent-dim);
  opacity: 0.9;
}

.prompt {
  color: var(--accent);
  margin-right: 10px;
  text-shadow: 0 0 12px var(--glow);
}

.output {
  padding-left: 24px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.output-list {
  padding-left: 48px;
  color: var(--text);
}

.output-list li::marker {
  color: var(--accent-dim);
}

.links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 24px;
  margin-bottom: 10px;
}

.links a,
.typed-text,
.live-output {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(126, 231, 135, 0.24);
}

.live-line {
  display: flex;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 6px;
  min-height: 1.8em;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  margin-left: 4px;
  vertical-align: middle;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(126, 231, 135, 0.6);
  animation: blink 1s steps(1, end) infinite;
}

.typed-text {
  white-space: pre-wrap;
}

.live-output {
  min-height: 1.8em;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .terminal-shell {
    padding: 12px;
    align-items: start;
  }

  .terminal-window {
    width: 100%;
    border-radius: 18px;
  }

  .terminal-header {
    gap: 10px;
    padding: 12px 14px;
  }

  .terminal-title {
    font-size: 0.82rem;
  }

  .terminal-body {
    padding: 18px 14px 22px;
    font-size: 0.92rem;
    line-height: 1.7;
  }

  .output,
  .links {
    padding-left: 18px;
  }

  .output-list {
    padding-left: 36px;
  }

  .live-block {
    padding: 12px 10px 10px;
  }

  .cursor {
    width: 9px;
  }
}

@media (max-width: 420px) {
  .terminal-shell {
    padding: 8px;
  }

  .terminal-window {
    border-radius: 16px;
  }

  .terminal-header {
    padding: 11px 12px;
  }

  .terminal-body {
    padding: 16px 12px 18px;
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .output,
  .links {
    padding-left: 14px;
  }

  .output-list {
    padding-left: 30px;
  }

  .live-line {
    margin-top: 10px;
  }
}

@keyframes blink {
  0%,
  48% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}
