/* ============================================================
   pvachek.dev terminal — clean reimplementation of the
   cookielab.dev "logic" (web as an interactive shell).
   No build, no dependencies. Edit colors in :root.
   ============================================================ */

:root {
  --bg: #000;
  --fg: #eee;
  --accent: #ff0;          /* prompt, links, highlights */
  --muted: #888;
  --line: #333;            /* divider under each row (original used #eee) */
  --pad: 0.6rem;
  --prompt-w: 5.2rem;      /* left padding reserving room for the prompt */
}

* { box-sizing: border-box; }

html, body, #screen, .App { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.4rem;
  overflow: hidden;
}

/* --- Terminal screen --- */
.App {
  width: 100%;
  outline: none;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.log { flex: 0 0 auto; }

.Line {
  border-bottom: 1px solid var(--line);
  position: relative;
}

.Line .input,
.Line .output {
  max-width: 100%;
  padding: var(--pad);
}

.Line .input {
  padding-left: calc(var(--prompt-w) + var(--pad));
  white-space: pre-wrap;
  word-break: break-word;
}

/* Echoed prompt in front of every submitted command */
.Line .input::before {
  content: "pavel $";
  color: var(--accent);
  position: absolute;
  left: var(--pad);
  top: var(--pad);
}

.Line .output { max-width: 80em; }
.Line .output h3 { font-size: inherit; font-weight: 700; margin: 0 0 0.2em; }
.Line .output p { margin: 0.2em 0; }
.Line .output ul { list-style: none; padding: 0; margin: 0.2em 0; width: 100%; }
.Line .output ul > li::before { content: "* "; color: var(--muted); }

.Line .error { color: var(--accent); }

code {
  border: 1px solid var(--muted);
  border-radius: 4px;
  padding: 1px 4px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Live input row --- */
.Input {
  display: flex;
  align-items: baseline;
  position: relative;
  width: 100%;
  z-index: 10;
  padding: var(--pad);
}

.prompt {
  color: var(--accent);
  flex: 0 0 auto;
  margin-right: 0.5rem;
  white-space: nowrap;
}

.cli {
  flex: 1 1 auto;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--fg);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  outline: none;
  padding: 0;
  caret-color: var(--accent);
}

/* --- Seasonal background easter egg (snow + tree) --- */
.snowfall {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: none;               /* toggled on by script.js */
}

.tree-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: none;               /* toggled on by script.js */
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.tree-background.on,
.snowfall.on { display: block; }
.tree-background.on { display: flex; }

.tree {
  height: 40vh;
  width: auto;
  margin-bottom: 8vh;
  opacity: 0.25;
  fill: var(--fg);
}

@media (min-width: 720px)  { .tree { height: 55vh; } }
@media (min-width: 1450px) { .tree { height: 70vh; } }

@media (prefers-reduced-motion: reduce) {
  .snowfall { display: none !important; }
}
