/* ========== TOKENS ========== */
:root {
  --ambient: #0a1612;
  --hex-base: #a8b5af;
  --active: #3ad48a;
  --active-bright: #5fe0a3;
  --deep: #ffffff;
  --sage-light: #baedd3;
  --txt-mute: rgba(255, 255, 255, 0.6);
  --txt-soft: rgba(255, 255, 255, 0.78);
  --border-soft: rgba(255, 255, 255, 0.22);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ambient);
  color: var(--deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: crosshair;
}

/* ========== OVERLAY LAYERS ========== */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 0%, rgba(0, 0, 0, 0.18) 60%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 14%, transparent 78%, rgba(0, 0, 0, 0.55) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.85 0 0 0 0 0.78 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.overlay-root {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.overlay-root a,
.overlay-root button,
.overlay-root input { pointer-events: auto; }

/* ========== HEADER ========== */
.top-bar {
  position: absolute;
  top: 1.4rem;
  left: 1.75rem;
  right: 1.75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-text {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.logo-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
}

.status-row1 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
}

.status-row1 .online {
  color: var(--active);
  font-weight: 700;
}

.status-row2 {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.status-row2 .sep {
  color: rgba(255, 255, 255, 0.25);
  margin: 0 0.4rem;
}

.breathing-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--active);
  box-shadow: 0 0 12px rgba(58, 212, 138, 0.9), 0 0 4px rgba(58, 212, 138, 1);
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; }
}

.right-utils {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.follow-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.right-utils .label {
  color: rgba(255, 255, 255, 0.55);
}

.util-link {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.82);
  transition: color 220ms ease;
  text-decoration: none;
}

.util-link:hover { color: var(--sage-light); }

.remix-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 240ms ease;
  backdrop-filter: blur(8px);
}

.remix-btn:hover {
  border-color: rgba(58, 212, 138, 0.7);
  background: rgba(58, 212, 138, 0.08);
  color: var(--sage-light);
}

/* ========== CHAT PANEL ========== */
.chat-panel {
  position: absolute;
  left: 1.75rem;
  bottom: 4.6rem;
  width: 17rem;
}

.chat-tagline {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--txt-soft);
  margin: 0 0 1.1rem;
  max-width: 14rem;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 0.95rem;
  transition: border-color 240ms ease;
}

.chat-input-row:focus-within { border-color: rgba(58, 212, 138, 0.6); }

.chat-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--deep);
  font-family: inherit;
  font-size: 0.78rem;
  caret-color: var(--active);
}

.chat-input::placeholder { color: rgba(255, 255, 255, 0.5); }

.send-circle {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(58, 212, 138, 0.55);
  background: rgba(58, 212, 138, 0.08);
  color: var(--sage-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 220ms ease;
}

.send-circle:hover {
  background: rgba(58, 212, 138, 0.18);
  border-color: var(--active);
  color: var(--active-bright);
  box-shadow: 0 0 14px rgba(58, 212, 138, 0.4);
  transform: translate(1px, -1px);
}

.quick-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.quick-chip {
  padding: 0.32rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid rgba(186, 237, 211, 0.28);
  background: rgba(186, 237, 211, 0.04);
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 220ms ease;
  backdrop-filter: blur(6px);
}

.quick-chip:hover {
  border-color: rgba(58, 212, 138, 0.7);
  background: rgba(58, 212, 138, 0.12);
  color: var(--sage-light);
  transform: translateY(-1px);
}

/* ========== STAY CURIOUS ========== */
.stay-curious {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-soft);
}

.arrow-circle {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(58, 212, 138, 0.5);
  background: rgba(58, 212, 138, 0.08);
  color: var(--sage-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 220ms ease;
}

.arrow-circle:hover {
  background: rgba(58, 212, 138, 0.2);
  border-color: var(--active);
  box-shadow: 0 0 16px rgba(58, 212, 138, 0.5);
  transform: translateY(-2px);
}

/* ========== BOTTOM LEFT ========== */
.bottom-left {
  position: absolute;
  left: 1.75rem;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--txt-mute);
}

.bottom-left svg { opacity: 0.8; }

/* ========== SOCIAL ========== */
.bottom-right {
  position: absolute;
  right: 1.75rem;
  bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.icon-link {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  color: rgba(255, 255, 255, 0.7);
  transition: all 220ms ease;
}

.icon-link:hover {
  color: var(--sage-light);
  background: rgba(186, 237, 211, 0.08);
  filter: drop-shadow(0 0 10px rgba(58, 212, 138, 0.5));
  transform: translateY(-2px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 760px) {
  .top-bar {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    justify-items: center;
    text-align: center;
  }
  .right-utils { display: none; }
  .chat-panel {
    left: 1rem;
    right: 1rem;
    width: auto;
    bottom: 5rem;
  }
  .bottom-left { display: none; }
}

@media (max-width: 480px) {
  .logo-sub { display: none; }
  .status-row2 { font-size: 0.54rem; }
}
