:root {
  color-scheme: dark;
  --bg: #0b0b12;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.16);
  --text: #f6f2ff;
  --muted: #b9adc9;
  --accent: #b9a3ff;
  --accent-2: #82f0cf;
  --danger: #ff7a90;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(140, 111, 255, 0.30), transparent 32rem),
    radial-gradient(circle at 84% 18%, rgba(130, 240, 207, 0.16), transparent 28rem),
    linear-gradient(135deg, #080810, #13101e 52%, #090b13);
  color: var(--text);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card-strong), var(--card));
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.hero { padding: clamp(28px, 6vw, 64px); }
.eyebrow {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
h1 {
  margin: 18px 0 14px;
  max-width: 920px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}
h1 span { color: var(--accent); }
.lede {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.7;
}
code {
  color: var(--accent-2);
  background: rgba(130, 240, 207, 0.08);
  border: 1px solid rgba(130, 240, 207, 0.18);
  border-radius: 8px;
  padding: 0.1em 0.35em;
}
.controls { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
button, input {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
}
button {
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .18s ease, opacity .18s ease, border-color .18s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(255,255,255,.34); }
button:disabled { cursor: not-allowed; opacity: .46; }
.primary { background: linear-gradient(135deg, #8569ff, #b9a3ff); color: #080810; }
.secondary { background: rgba(255, 255, 255, 0.06); }
.status-row { display: flex; align-items: center; gap: 10px; margin-top: 24px; color: var(--muted); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #777; box-shadow: 0 0 0 6px rgba(255,255,255,.04); }
.dot.connected { background: var(--accent-2); box-shadow: 0 0 0 6px rgba(130,240,207,.14); }
.dot.error { background: var(--danger); box-shadow: 0 0 0 6px rgba(255,122,144,.14); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.panel { padding: 26px; min-height: 320px; }
h2 { margin: 0 0 18px; font-size: 1rem; letter-spacing: -0.02em; }
.text-form { display: flex; gap: 10px; }
input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  background: rgba(255,255,255,.06);
  outline: none;
}
.text-form button { background: rgba(185,163,255,.18); }
.hint { color: var(--muted); margin-top: 18px; line-height: 1.6; }
.log {
  height: 232px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .86rem;
  color: #d9d0e8;
}
.log-line { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.log-line:last-child { border-bottom: 0; }
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .text-form { flex-direction: column; }
}
