:root {
  --bg: #0a0e0a;
  --screen: #0b120b;
  --green: #33ff88;
  --green-dim: #1f9c53;
  --amber: #ffcf6b;
  --cyan: #57e6ff;
  --font: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

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

html, body {
  height: 100%;
}

body {
  background:
    radial-gradient(circle at 50% 40%, #10221a 0%, #060906 70%, #020302 100%);
  color: var(--green);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
}

/* CRT flicker on the whole screen */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.82; }
  94% { opacity: 1; }
  97% { opacity: 0.9; }
}

/* scanlines overlay */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.28) 3px,
    rgba(0, 0, 0, 0.28) 4px
  );
  z-index: 9;
  animation: flicker 6s infinite;
}

/* soft vignette glow */
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 200px 40px rgba(0, 0, 0, 0.85);
  z-index: 8;
}

.terminal {
  width: min(760px, 100%);
  background: var(--screen);
  border: 1px solid #163a26;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(51, 255, 136, 0.08),
    0 0 60px rgba(51, 255, 136, 0.12),
    0 24px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(#0f1a12, #0a120c);
  border-bottom: 1px solid #163a26;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.titlebar-name {
  margin-left: 10px;
  font-size: 12px;
  color: var(--green-dim);
  letter-spacing: 0.5px;
}

.screen {
  padding: 28px 28px 34px;
  text-shadow: 0 0 6px rgba(51, 255, 136, 0.55);
}

.ascii {
  color: var(--green);
  font-size: clamp(6px, 1.6vw, 11px);
  line-height: 1.05;
  white-space: pre;
  overflow-x: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 8px rgba(51, 255, 136, 0.35));
}

.boot {
  color: var(--green-dim);
  font-size: 13px;
  line-height: 1.7;
  min-height: 1.7em;
  margin-bottom: 18px;
  white-space: pre-wrap;
}
.boot .ok { color: var(--cyan); }

.links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--green);
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: all 0.15s ease;
  opacity: 0;
  transform: translateX(-6px);
}

.link.reveal {
  opacity: 1;
  transform: translateX(0);
}

.link .prompt { color: var(--green-dim); }
.link .cmd { color: var(--amber); text-shadow: 0 0 6px rgba(255, 207, 107, 0.5); }
.link .arrow {
  margin-left: auto;
  color: var(--green-dim);
  transform: translateX(-4px);
  opacity: 0;
  transition: all 0.15s ease;
}

.link:hover {
  border-color: var(--green-dim);
  background: rgba(51, 255, 136, 0.06);
  box-shadow: 0 0 18px rgba(51, 255, 136, 0.15);
}
.link:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}
.link:hover .cmd { text-shadow: 0 0 10px rgba(255, 207, 107, 0.9); }

.cursor-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--green);
}
.cursor-line .prompt { color: var(--green-dim); }

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.blink {
  animation: blink 1s step-end infinite;
  color: var(--green);
}

@media (max-width: 480px) {
  .screen { padding: 20px 16px 26px; }
  .link { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .scanlines { animation: none; }
  .blink { animation: none; }
  .link { opacity: 1; transform: none; }
}
