:root {
  --bg: #05060a;
  --fg: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.48);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #3ec4ff;
  --mint: #6ae3c1;
  --card: #0c1016;
  --bubble: #1c2838;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--fg); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
body { display: flex; flex-direction: column; height: 100dvh; }
#dots { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(62,196,255,0.14), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,0.35), transparent 28%, rgba(0,0,0,0.55));
}
.top {
  position: relative; z-index: 4; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 8px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.brand .lab { color: var(--accent); font-weight: 500; }
.mark {
  width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
  background: linear-gradient(135deg, #7dd8ff, #2a9de0);
  box-shadow: 0 0 16px rgba(62,196,255,0.7);
}
nav { display: flex; gap: 8px; }
.pill {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06); color: var(--fg); text-decoration: none;
  transition: border-color .2s, background .2s, box-shadow .2s, color .2s;
}
.pill svg { width: 16px; height: 16px; display: block; }
.pill:hover {
  border-color: rgba(62,196,255,0.45);
  background: rgba(62,196,255,0.12);
  box-shadow: 0 0 18px rgba(62,196,255,0.18);
}
.stage {
  position: relative; z-index: 3; flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 clamp(16px, 4vw, 48px) 14px;
}
.hero { text-align: center; flex-shrink: 0; margin: 2px 0 12px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(255,255,255,0.45);
}
.rule { width: 22px; height: 1px; background: var(--accent); box-shadow: 0 0 8px rgba(62,196,255,0.45); }
h1 {
  margin: 8px 0 0; font-size: clamp(36px, 4.6vw, 56px); line-height: 0.95;
  letter-spacing: -0.05em; font-weight: 800;
}
h1 .dot {
  display: inline-block; width: 0.18em; height: 0.18em; margin-left: 0.08em;
  background: var(--accent); box-shadow: 0 0 22px rgba(62,196,255,0.45); vertical-align: 0.08em;
}
.lead { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.desk {
  width: min(1180px, 100%);
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: 14px;
  animation: rise 0.9s 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.persona, .chat, .term {
  position: relative; border-radius: 24px; background: rgba(12,16,22,0.78);
  border: 1px solid var(--line); backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(62,196,255,0.06);
}
.persona { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 16px; min-height: 0; overflow: hidden; }
.circle {
  position: relative; width: 132px; height: 132px; padding: 0; border: 0; border-radius: 50%;
  overflow: hidden; cursor: pointer; background: #000;
  box-shadow: 0 0 0 2px rgba(62,196,255,0.35), 0 0 40px rgba(62,196,255,0.18);
}
.circle video { width: 100%; height: 100%; object-fit: cover; }
.circle .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,0.35); color: #fff; font-size: 22px;
}
.circle.on .play { opacity: 0; }
.persona h2 { margin: 16px 0 0; font-size: 20px; letter-spacing: -0.03em; }
.persona .sub { margin: 4px 0 0; font-size: 12px; color: var(--accent); }
.persona .bio { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.persona .demo {
  margin-top: auto; padding-top: 14px; font-size: 11px; color: rgba(255,255,255,0.38);
  font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0.02em;
}
.chat { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.chat-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(62,196,255,0.4); }
.chat-head strong { display: block; font-size: 14px; }
.chat-head span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.chat-head span.live { color: var(--accent); }
.thread {
  flex: 1; min-height: 0; overflow: auto; padding: 16px;
  background: radial-gradient(ellipse at 20% 0%, rgba(62,196,255,0.06), transparent 50%), #121820;
}
.row { display: flex; align-items: flex-end; gap: 8px; margin: 8px 0; }
.row img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.bubble {
  max-width: 78%; padding: 9px 13px; border-radius: 18px; font-size: 13.5px; line-height: 1.4;
  background: var(--bubble); color: #e8eef6;
}
.bubble.me { margin-left: auto; background: linear-gradient(180deg, #5ad0ff, #2a9de0); color: #041018; }
.bubble.her { border-bottom-left-radius: 5px; }
.dots { display: flex; gap: 4px; padding: 12px 14px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: bounce 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-4px); } }
.composer { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.composer input {
  flex: 1; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.06); color: var(--fg); padding: 0 16px; outline: none; font: inherit; font-size: 13px;
}
.composer input:focus { border-color: rgba(62,196,255,0.5); }
.composer button {
  width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer; font-size: 18px;
  background: linear-gradient(180deg, #5ad0ff, #2a9de0); color: #041018;
}
.composer button:disabled { opacity: 0.4; }
.term { padding: 18px 16px; display: flex; flex-direction: column; min-height: 0; }
.term-kicker { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.term-title { margin: 10px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.04em; }
.term-title.run { color: var(--accent); }
.term-live { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.term-live i { width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
.term-live i.run { background: var(--accent); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
#termLog {
  flex: 1; margin: 12px 0 0; overflow: auto; border-radius: 12px; background: rgba(0,0,0,0.4);
  padding: 10px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px;
  line-height: 1.55; color: #9ecb8c; white-space: pre-wrap;
}
@media (max-width: 900px) {
  .desk { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .persona { display: none; }
  .term { display: none; }
  .eyebrow { display: none; }
  h1 { font-size: clamp(28px, 8vw, 36px); margin-top: 2px; }
  .lead { font-size: 12.5px; margin-top: 4px; }
  .hero { margin: 0 0 6px; }
  .stage { padding: 0 12px calc(10px + env(safe-area-inset-bottom)); }
  .top { padding: max(8px, env(safe-area-inset-top)) 12px 6px; }
  .chat { min-height: 0; }
  .thread { min-height: 0; }
  .chat-head { padding: 10px 12px; }
  .composer { position: relative; padding-top: 22px; }
  .composer::after {
    content: "демо · до 12 сообщений";
    position: absolute; left: 16px; top: 4px;
    font-size: 10px; color: rgba(255,255,255,0.35);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
  }
}
