:root {
  --bg: #0b0f10;
  --panel: #11181d;
  --panel-2: #0f1519;
  --text: #d7e4df;
  --muted: #8ba39a;
  --accent: #63e6be;
  --border: #1f2d28;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: radial-gradient(900px 420px at 15% -10%, #193026 0%, var(--bg) 50%);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.07;
  animation: scan 14s linear infinite;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 52px 18px;
}

.terminal {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
  animation: terminalFloat 6s ease-in-out infinite;
}

.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(99, 230, 190, 0.12), transparent 45%);
  mix-blend-mode: screen;
  opacity: 0.35;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.title {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.terminal-body {
  padding: 18px 16px 20px;
}

.terminal-body p {
  margin: 0;
  opacity: 0;
  transform: translateY(2px);
  animation: lineIn 300ms ease forwards;
}

.terminal-body p:nth-child(1) { animation-delay: 60ms; }
.terminal-body p:nth-child(2) { animation-delay: 120ms; }
.terminal-body p:nth-child(3) { animation-delay: 180ms; }
.terminal-body p:nth-child(4) { animation-delay: 240ms; }
.terminal-body p:nth-child(5) { animation-delay: 300ms; }
.terminal-body p:nth-child(6) { animation-delay: 360ms; }
.terminal-body p:nth-child(7) { animation-delay: 420ms; }
.terminal-body p:nth-child(8) { animation-delay: 480ms; }
.terminal-body p:nth-child(9) { animation-delay: 540ms; }
.terminal-body p:nth-child(10) { animation-delay: 600ms; }
.terminal-body p:nth-child(11) { animation-delay: 660ms; }
.terminal-body p:nth-child(12) { animation-delay: 720ms; }

.terminal-body p + p {
  margin-top: 2px;
}

.prompt {
  color: var(--accent);
  margin-right: 8px;
}

.output {
  color: var(--text);
}

.links {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-left: 20px;
}

a {
  color: #8cf7d5;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.cursor-line { margin-top: 10px !important; }

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  transform: translateY(2px);
  background: var(--accent);
  animation: blink 1s step-end infinite;
}

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

@keyframes lineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes terminalFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes scan {
  from { transform: translateY(-8px); }
  to { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .terminal-body p {
    opacity: 1;
    transform: none;
  }
}
