:root {
  --bg: #0b0b0b;
  --bg-deep: #070707;
  --fg: #f5f5f5;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  --accent: #7cff3a;
  --glow: rgba(124, 255, 58, 0.25);
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-rim: 0 0 30px rgba(255, 255, 255, 0.06);
  --shadow-occlusion: 0 25px 60px rgba(0, 0, 0, 0.55);
  --panel-glow: 0 0 80px rgba(124, 255, 58, 0.08);
  --font: "SF Pro Text", "SF Pro Display", -apple-system, "Segoe UI", Inter, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  letter-spacing: 0.01em;
}

body {
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(124, 255, 58, 0.06), transparent 40%),
    var(--bg);
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.light-field {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(124, 255, 58, 0.07), transparent 50%);
  mix-blend-mode: screen;
  opacity: 0.8;
  z-index: 1;
  pointer-events: none;
}

.depth-plane {
  position: absolute;
  inset: 8vh 6vw;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-occlusion);
  opacity: 0.22;
  z-index: 2;
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.06'/></svg>");
  mix-blend-mode: soft-light;
  z-index: 2;
  pointer-events: none;
}

.summon-bar {
  position: absolute;
  top: 24px;
  left: 32px;
  right: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.summon-bar.ready {
  opacity: 1;
  transform: translateY(0);
}

.logo {
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-shadow: var(--shadow-rim);
  position: relative;
}

.logo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 24px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 24px var(--glow);
  opacity: 0.4;
}

.summon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.summon:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--glow);
}

.summon-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow);
}

.nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 7, 0.92);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 400ms ease;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-panel {
  position: absolute;
  top: 12vh;
  right: 10vw;
  width: min(380px, 80vw);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-close {
  align-self: flex-end;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 10px 16px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: border-color 250ms ease, color 250ms ease;
}

.nav-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-links a {
  text-decoration: none;
  color: var(--fg);
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 250ms ease, transform 250ms ease;
}

.nav-links a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.mode {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: 120px 8vw 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-shadow: var(--shadow-rim);
}

.mode-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.primary-input {
  width: min(640px, 90vw);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  box-shadow: var(--panel-glow);
}

.primary-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 18px;
  text-shadow: var(--shadow-rim);
}

.primary-input button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 8px 14px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: border-color 250ms ease, color 250ms ease;
}

.primary-input button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mode-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.mode-actions button {
  background: transparent;
  border: none;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 11px;
  cursor: pointer;
  transition: color 250ms ease;
}

.mode-actions button:hover {
  color: var(--accent);
}

.chat-stream {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
}

.chat-line {
  font-size: 18px;
  line-height: 1.5;
  color: var(--fg);
  text-shadow: var(--shadow-rim);
}

.chat-stream::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -24px;
  width: 40%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.reader {
  max-width: 780px;
  line-height: 1.6;
  font-size: 18px;
}

.reader h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.reader p {
  margin-bottom: 16px;
  color: var(--fg);
}

.listing {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 700px;
}

.listing a {
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 250ms ease;
}

.listing a::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin-right: 10px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.listing a:hover {
  color: var(--accent);
}

.boot {
  position: absolute;
  inset: 0;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  opacity: 1;
  pointer-events: none;
}

.boot.hidden {
  opacity: 0;
  transition: opacity 800ms ease;
}

.boot-silhouette {
  position: absolute;
  width: 60%;
  height: 60%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 160px rgba(255, 255, 255, 0.04);
  opacity: 0.15;
}

.boot-signal {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 24px var(--glow);
  opacity: 0;
}

@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .mode {
    padding: 100px 6vw 70px;
  }

  .nav-panel {
    top: 16vh;
    right: 8vw;
  }

  .chat-stream {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
