:root {
  --bg: #000000;
  --crt-green: #2798f5;
  --crt-green-dim: rgba(9, 152, 245, 0.45);
  --crt-border: rgba(9, 152, 245, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  background: var(--bg);
  overflow-x: hidden;
  font-family: "Courier New", Courier, monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0.05) 1px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0) 4px
    );
  opacity: 0.18;
  mix-blend-mode: soft-light;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.015) 30%,
      rgba(0, 0, 0, 0.16) 68%,
      rgba(0, 0, 0, 0.44) 100%
    );
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #000;
}

.site-header {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 32px 24px 0;
}

.site-logo {
  max-width: 200px;
  width: 100%;
  margin-top: 40px;
  height: auto;
  filter:
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.60))
    drop-shadow(0 0 14px rgba(255, 255, 255, 0.24))
    drop-shadow(0 0 28px rgba(255, 255, 255, 0.10));
  animation: logoFlicker 2.8s infinite alternate;
}

.terminal-box {
  flex: 1;
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 40px 24px;
  margin-bottom: 50px;
  transform: perspective(1000px) rotateX(1.5deg);
  filter: drop-shadow(0 0 10px rgba(140, 255, 155, 0.08))
          drop-shadow(0 0 28px rgba(140, 255, 155, 0.05));
}

.headline {
  color: white;
  font-size: clamp(12px, 2vw, 19px);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-align: center;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.85),
    0 0 14px rgba(255, 255, 255, 0.35),
    0 0 28px rgba(255, 255, 255, 0.15);
  animation: textFlicker 2.8s infinite alternate;
}

.fake-caret.hidden {
  display: none;
}

.crt-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: min(820px, 100%);
  min-height: 72px;
  padding: 0 22px;
  border: 1px solid var(--crt-border);
  border-radius: 12px;
  background:
    linear-gradient(
      to bottom,
      rgba(12, 28, 14, 0.94),
      rgba(5, 14, 7, 0.98)
    );
  overflow: hidden;
  box-shadow:
    inset 0 0 24px rgba(140, 255, 155, 0.06),
    inset 0 -10px 24px rgba(0, 0, 0, 0.42),
    0 0 14px rgba(140, 255, 155, 0.09),
    0 0 36px rgba(140, 255, 155, 0.05);
}

.crt-input-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 1px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0) 4px
    );
  opacity: 0.32;
}

.crt-input-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 255, 255, 0.03) 0%,
      rgba(255, 255, 255, 0.01) 40%,
      rgba(0, 0, 0, 0.14) 78%,
      rgba(0, 0, 0, 0.22) 100%
    );
}

.prompt {
  position: relative;
  z-index: 2;
  margin-right: 14px;
  color: white;
  font-size: 18px;
  line-height: 1;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.85),
    0 0 12px rgba(255, 255, 255, 0.32);
}

.crt-input {
  position: relative;
  z-index: 2;
  flex: 1;
  height: 70px;
  border: 0;
  outline: none;
  background: transparent;
  color: white;
  font-size: clamp(22px, 2.2vw, 22px);
  line-height: 1;
  letter-spacing: 0.04em;
  font-family: inherit;
  text-shadow:
    0 0 3px rgba(255, 255, 255, 0.95),
    0 0 10px rgba(255, 255, 255, 0.35);
  caret-color: transparent;
}

.fake-caret {
  position: absolute;
  z-index: 3;
  left: 58px;
  top: 50%;
  width: 11px;
  height: 34px;
  transform: translateY(-50%);
  background: white;
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.95),
    0 0 16px rgba(255, 255, 255, 0.38);
  animation: blinkCaret 1s steps(1, end) infinite;
  pointer-events: none;
}

.assistant-output {
  width: min(820px, 100%);
  min-height: 80px;
  overflow: hidden;
  color: white;
  font-size: clamp(14px, 1.6vw, 20px);
  line-height: 1.5;
  padding: 14px 18px;
  border: 1px solid var(--crt-border);
  border-radius: 12px;
  background: rgba(5, 14, 7, 0.82);
  box-shadow: inset 0 0 14px rgba(140, 255, 155, 0.06);
  white-space: pre-wrap;
  opacity: 0;
}

.hidden-form {
  display: none;
}

@keyframes blinkCaret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes logoFlicker {
  0%   { opacity: 0.958; }
  2%   { opacity: 0.916; }
  4%   { opacity: 0.972; }
  19%  { opacity: 0.937; }
  21%  { opacity: 0.986; }
  60%  { opacity: 0.965; }
  100% { opacity: 0.993; }
}

@keyframes textFlicker {
  0% { opacity: 0.94; }
  2% { opacity: 0.88; }
  4% { opacity: 0.96; }
  19% { opacity: 0.91; }
  21% { opacity: 0.98; }
  60% { opacity: 0.95; }
  100% { opacity: 0.99; }
}

@media (max-width: 640px) {
  .crt-input-wrap {
    min-height: 62px;
    padding: 0 18px;
  }

  .prompt {
    font-size: 24px;
    margin-right: 10px;
  }

  .fake-caret {
    left: 48px;
    width: 9px;
    height: 28px;
  }
}
