/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root{
  --bg: #0a0f0a;          /* near-black */
  --fg: #b8ffb8;          /* phosphor green text */
  --fg-dim: #78d178;      /* dim prompts */
  --accent: #00ff7f;      /* bright green accents */
  --scanline: rgba(255,255,255,0.03);
  --shadow: 0 20px 50px rgba(0,0,0,0.5);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* layout */
  --maxw: clamp(320px, 90vw, 780px);
  --pad: 20px;
}

html, body { height: 100%; }
body.crt {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  display: grid;
  place-items: center;
}

/* Terminal frame */
.terminal {
  width: var(--maxw);
  box-shadow: var(--shadow);
  border: 1px solid #0d1f0d;
  border-radius: 10px;
  overflow: hidden;
  background: #060b06;
}

/* Title bar */
.terminal-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #0f160f;
  border-bottom: 1px solid #0d1f0d;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; opacity: 0.9; }
.dot-red { background: #f25f5c; }
.dot-yellow { background: #ffe066; }
.dot-green { background: #2ecc71; }
.terminal-title { margin-left: auto; font-size: 0.85rem; color: var(--fg-dim); }

/* Screen */
.screen {
  position: relative;
  padding: var(--pad);
  background: radial-gradient(ellipse at center, #081108 0%, #060b06 60%, #050905 100%);
}

/* CRT effects (subtle) */
.screen::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0.2;
}
.scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 2px,
    var(--scanline) 3px, var(--scanline) 4px
  );
  pointer-events: none;
}

/* Prompt + Haiku */
.prompt {
  color: var(--fg-dim);
  margin-bottom: 10px;
}
.haiku {
  display: grid;
  gap: 6px;
  line-height: 1.6;
  font-size: clamp(1rem, 2.8vw, 1.25rem);
  text-shadow: 0 0 6px rgba(0, 255, 127, 0.25);
  filter: saturate(1.2);
  min-height: 5.5em; /* keep area steady across haikus */
}

/* Blinking cursor */
.cursor {
  width: 10px; height: 18px; margin-top: 8px;
  background: var(--accent);
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Controls */
.controls {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
}
.btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease-in-out, transform 0.02s ease-in-out, box-shadow 0.15s;
  box-shadow: 0 0 0 rgba(0,255,127,0);
}
.btn:hover { background: rgba(0,255,127,0.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid #97ffc8;
  outline-offset: 3px;
  box-shadow: 0 0 18px rgba(0,255,127,0.25);
}

.link {
  color: var(--fg-dim);
  text-underline-offset: 3px;
}
.link:hover { color: var(--fg); }

/* Motion sensitivity */
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .btn { transition: none; }
}

/* (keep everything from the previous CSS I sent)
   Remove the .link styles since we're not using the Return home link
   and add the tiny prompt glow (optional) */

.prompt {
  color: var(--fg-dim);
  margin-bottom: 10px;
  text-shadow: 0 0 6px rgba(0, 255, 127, 0.12);
}

/* Optional: focus ring for the whole screen so users know space works */
.screen:focus-visible {
  outline: 2px solid #97ffc8;
  outline-offset: 4px;
}
