:root {
  color-scheme: dark;
  --bg: #050608;
  --fg: #e8e2d4;
  --muted: #6f7783;
  --line: #1b222b;
  --cyan: #62d7e6;
  --pink: #e34d87;
  --accent: #f0d35f;
  --violet: #8f6dff;
  --screen: rgba(7, 8, 11, 0.94);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(98, 215, 230, 0.1), transparent 32%),
    linear-gradient(245deg, rgba(227, 77, 135, 0.1), transparent 38%),
    radial-gradient(ellipse at 50% 16%, rgba(240, 211, 95, 0.08), transparent 36rem),
    linear-gradient(180deg, #09090d 0%, #060508 48%, #030406 100%),
    var(--bg);
  color: var(--fg);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.22;
  background:
    radial-gradient(circle, rgba(232, 226, 212, 0.14) 1px, transparent 1px),
    linear-gradient(rgba(98, 215, 230, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 215, 230, 0.03) 1px, transparent 1px);
  background-size: 28px 28px, 112px 112px, 112px 112px;
  animation: grid-drift 22s linear infinite;
}

body::after {
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 42% 20%, rgba(240, 211, 95, 0.08), transparent 24rem),
    radial-gradient(circle at center, transparent 52%, rgba(0, 0, 0, 0.38));
  opacity: 0.42;
  mix-blend-mode: overlay;
}

button,
input {
  font: inherit;
}

.poop-snow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 3.5rem 2rem;
}

.terminal {
  width: min(100%, 980px);
  min-height: calc(100vh - 7rem);
  margin: 0 auto;
  position: relative;
}

.terminal::before {
  position: absolute;
  top: -4rem;
  left: -3rem;
  z-index: -1;
  width: min(52rem, 80vw);
  height: 24rem;
  background:
    linear-gradient(110deg, rgba(240, 211, 95, 0.16), transparent 42%),
    linear-gradient(245deg, rgba(227, 77, 135, 0.13), transparent 48%),
    linear-gradient(0deg, rgba(98, 215, 230, 0.1), transparent 58%);
  filter: blur(72px);
  opacity: 0.62;
  content: "";
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.terminal-output {
  width: 100%;
  min-width: 0;
  max-width: 78ch;
  padding: 0;
  color: #f0eadc;
  text-shadow: 0 0 18px rgba(231, 229, 223, 0.2);
}

.terminal-output p {
  margin: 0 0 0.26rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  animation: line-in 180ms ease-out both;
}

.ascii {
  color: transparent;
  background: linear-gradient(92deg, var(--accent) 0%, #f5b24f 34%, var(--pink) 76%, #f4d8ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 0.95rem;
  line-height: 1.15;
  white-space: pre;
  filter:
    drop-shadow(0 0 12px rgba(240, 211, 95, 0.34))
    drop-shadow(0 0 28px rgba(227, 77, 135, 0.16));
}

.boot {
  color: var(--cyan);
  text-shadow:
    0 0 12px rgba(98, 215, 230, 0.34),
    0 0 34px rgba(98, 215, 230, 0.12);
}

.rule {
  width: min(100%, 36rem);
  height: 1px;
  margin: 0.65rem 0 0.75rem;
  background: linear-gradient(90deg, rgba(98, 215, 230, 0.45), rgba(240, 211, 95, 0.22), transparent);
  box-shadow: 0 0 22px rgba(98, 215, 230, 0.16);
}

.command {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(240, 211, 95, 0.22);
}

.terminal-input {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 78ch;
  gap: 0.35rem;
  margin-top: 0.4rem;
  padding: 0;
}

.prompt {
  color: var(--cyan);
  flex: none;
  white-space: nowrap;
  text-shadow:
    0 0 12px rgba(98, 215, 230, 0.32),
    0 0 34px rgba(98, 215, 230, 0.12);
  animation: prompt-glow 2.8s ease-in-out infinite;
}

.terminal-input input {
  width: 1ch;
  min-width: 1ch;
  max-width: 42ch;
  flex: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  caret-color: transparent;
  text-shadow: 0 0 12px rgba(245, 243, 238, 0.16);
}

.poop-cursor {
  display: inline-block;
  flex: none;
  width: 1.25rem;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  filter: saturate(1.25) drop-shadow(0 0 8px rgba(240, 211, 95, 0.32));
  animation: blink 1s steps(1, end) infinite;
}

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

@keyframes line-in {
  from {
    transform: translateY(2px);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes prompt-glow {
  50% {
    text-shadow:
      0 0 16px rgba(98, 215, 230, 0.44),
      0 0 44px rgba(98, 215, 230, 0.16);
  }
}

@keyframes grid-drift {
  to {
    background-position: 28px 28px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 13px;
  }

  .shell {
    min-height: 100svh;
    padding: 1.25rem 1rem;
  }

  .terminal {
    min-height: calc(100svh - 2.5rem);
  }

  .ascii {
    font-size: 0.62rem;
    line-height: 1.1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .terminal-output p,
  .prompt,
  .poop-cursor {
    animation: none;
  }
}
