:root {
  --bg: #0a0812;
  --purple: #9d7bea;
  --purple-dim: #7c5cbf;
  --purple-soft: #c4b5fd;
  --text: #e4e0ef;
  --muted: #8b849c;
  --glass: rgba(12, 10, 20, 0.88);
  --border: rgba(157, 123, 234, 0.22);
  --font-display: "Syne", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
}

#graph-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: grab;
  touch-action: none;
}

#graph-canvas.is-grabbing { cursor: grabbing; }

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 20%, rgba(10, 8, 18, 0.72) 100%);
}

.hud {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  padding: 1rem 1.25rem;
  pointer-events: none;
}

.hud__status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  color: var(--muted);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
}

.intro-block {
  position: fixed;
  left: 50%;
  top: 0;
  z-index: 30;
  width: min(280px, calc(100vw - 2.5rem));
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  cursor: grab;
  user-select: none;
  text-align: center;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.intro-block:active { cursor: grabbing; }

.intro-block.is-vortex {
  border-color: rgba(196, 181, 253, 0.38);
  box-shadow:
    0 0 48px rgba(157, 123, 234, 0.2),
    0 0 120px rgba(91, 67, 148, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.45);
  animation: vortex-pulse 3.2s ease-in-out infinite;
}

@keyframes vortex-pulse {
  0%, 100% {
    border-color: rgba(196, 181, 253, 0.32);
    box-shadow:
      0 0 40px rgba(157, 123, 234, 0.16),
      0 0 100px rgba(91, 67, 148, 0.06),
      0 16px 48px rgba(0, 0, 0, 0.45);
  }
  50% {
    border-color: rgba(196, 181, 253, 0.52);
    box-shadow:
      0 0 56px rgba(157, 123, 234, 0.28),
      0 0 140px rgba(91, 67, 148, 0.12),
      0 16px 48px rgba(0, 0, 0, 0.45);
  }
}

.intro-block__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--purple-soft);
  margin-bottom: 0.55rem;
}

.intro-block__line {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  line-height: 1.55;
  color: rgba(228, 224, 239, 0.76);
}

.intro-block__line + .intro-block__line { margin-top: 0.2rem; }

.intro-block__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.intro-block__btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--purple-soft);
  padding: 0.58rem 1rem;
  border: 1px solid var(--purple-dim);
  border-radius: 999px;
  background: rgba(124, 92, 191, 0.12);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.intro-block__btn--ghost {
  background: transparent;
  border-color: rgba(157, 123, 234, 0.28);
  color: rgba(196, 181, 253, 0.82);
}

.intro-block__btn--ghost:hover {
  border-color: var(--purple-soft);
  background: rgba(124, 92, 191, 0.12);
}

.intro-block__btn:hover {
  border-color: var(--purple-soft);
  background: rgba(124, 92, 191, 0.24);
}

@media (max-width: 640px) {
  .intro-block { width: min(240px, calc(100vw - 1.5rem)); padding: 1rem; }
  .hud { padding: 0.85rem 1rem; }
}
