/* ============================================================
   THEME — change these few values to restyle everything.
   Try --fg: #ffb000 for an amber screen, or #66ccff for blue.
   ============================================================ */
:root {
  --bg:     #050805;                 /* screen background        */
  --fg:     #33ff77;                 /* phosphor text color      */
  --fg-dim: rgba(51, 255, 119, .45); /* faded text (boot lines)  */
  --glow:   rgba(51, 255, 119, .55); /* the "bloom" around text  */
  --font:   'Courier New', 'DejaVu Sans Mono', monospace;
  --size:   16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

/* The CRT "monitor" — a search bar sits on top of the green screen */
.crt {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%; /*min(900px, 94vw);*/
  height: 100% /*min(620px, 88vh);*/
  background: var(--bg);
  border-radius: 14px;
  padding: 24px 30px 28px;
  overflow: hidden;
  color: var(--fg);
  font-size: var(--size);
  line-height: 1.5;
  text-shadow: 0 0 6px var(--glow);
  box-shadow:
    0 0 40px rgba(51, 255, 119, .10),
    inset 0 0 90px rgba(0, 0, 0, .9);
}

/* Scanlines */
.crt::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, .25) 2px 3px
  );
}

/* Vignette */
.crt::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(ellipse at center,
              transparent 55%, rgba(0, 0, 0, .55) 100%);
}

/* Search bar */
.searchbar {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--fg-dim);
}
.searchbar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font: inherit;
  text-shadow: 0 0 6px var(--glow);
  caret-color: var(--fg);
}
.searchbar input::placeholder { color: var(--fg-dim); }

/* Text area */
.screen {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  animation: flicker 3s infinite;
}
.screen::-webkit-scrollbar { width: 0; }

.prompt { color: var(--fg); }
.dim    { color: var(--fg-dim); }

/* Highlight for matched text inside search snippets */
.hit { background: var(--fg); color: var(--bg); text-shadow: none; }

/* Clickable lines (menu items, breadcrumb, back link, results) */
.link {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}
.link:hover, .link:active {
  background: var(--fg);
  color: var(--bg);
  text-shadow: none;
}

/* Blinking block cursor */
.cursor {
  display: inline-block;
  width: .55em; height: 1.05em;
  background: var(--fg);
  box-shadow: 0 0 6px var(--glow);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink   { 50% { opacity: 0; } }
@keyframes flicker {
  0%, 92%, 94%, 100% { opacity: 1;   }
  93%                { opacity: .86; }
  97%                { opacity: .93; }
}

@media (prefers-reduced-motion: reduce) {
  .screen, .cursor { animation: none; }
}
