:root {
  --bg: #060911;
  --bg-2: #0a1020;
  --panel: #0d1526;
  --panel-2: #111b31;
  --line: #1c2942;
  --line-2: #263756;
  --text: #e9eefb;
  --muted: #8b9cbd;
  --dim: #5d6d8c;
  --brand: #6d5efc;
  --brand-2: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 14px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .55);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.hidden { display: none !important; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 100px; text-transform: uppercase; letter-spacing: .4px; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.online, .badge.active { color: var(--green); background: rgba(52,211,153,.1); }
.badge.waiting { color: var(--amber); background: rgba(251,191,36,.1); }
.badge.offline, .badge.ended { color: var(--dim); background: rgba(93,109,140,.1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; letter-spacing: .1px;
  transition: .18s ease; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #8b5cf6);
  color: #fff; box-shadow: 0 10px 30px rgba(109, 94, 252, .35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(109, 94, 252, .48); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-soft { background: rgba(109,94,252,.14); color: #c7c2ff; border-color: rgba(109,94,252,.3); }
.btn-soft:hover { background: rgba(109,94,252,.22); }
.btn-danger { background: rgba(248,113,113,.12); color: #fca5a5; border-color: rgba(248,113,113,.3); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ---------- landing nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(6, 9, 17, .72);
  border-bottom: 1px solid rgba(28, 41, 66, .7);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.3px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(109,94,252,.45);
}
.logo-mark svg { width: 17px; height: 17px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 720px;
  background:
    radial-gradient(50% 50% at 30% 20%, rgba(109,94,252,.28), transparent 70%),
    radial-gradient(45% 45% at 75% 15%, rgba(34,211,238,.16), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(38,55,86,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(38,55,86,.22) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: #b9b4ff; background: rgba(109,94,252,.12); border: 1px solid rgba(109,94,252,.3);
  padding: 6px 12px; border-radius: 100px; margin-bottom: 22px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
h1.hero-title { font-size: clamp(40px, 5vw, 62px); line-height: 1.02; letter-spacing: -2.2px; margin: 0 0 20px; font-weight: 800; }
.grad { background: linear-gradient(100deg, #a5b4fc, var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17.5px; color: var(--muted); max-width: 520px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 16px; font-size: 12.5px; color: var(--dim); }
.hero-stats { display: flex; gap: 34px; margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-stats b { display: block; font-size: 24px; letter-spacing: -.6px; }
.hero-stats span { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .8px; }

/* ---------- product mock ---------- */
.mock {
  position: relative; border-radius: 16px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #0c1425, #080d18);
  box-shadow: var(--shadow);
}
.mock-top { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); border-radius: 16px 16px 0 0; }
.tl { width: 9px; height: 9px; border-radius: 50%; background: #2a3a58; }
.tl.r { background: #f87171; } .tl.y { background: #fbbf24; } .tl.g { background: #34d399; }
.mock-url { margin-left: 8px; font-size: 11px; color: var(--dim); background: #0a1120; border: 1px solid var(--line); padding: 3px 10px; border-radius: 6px; }
.mock-body { display: grid; grid-template-columns: 1fr 172px; min-height: 310px; border-radius: 0 0 16px 16px; overflow: hidden; }
.mock-screen { position: relative; padding: 14px; }
.mock-desktop {
  height: 100%; min-height: 280px; border-radius: 10px; border: 1px solid #22314e;
  background:
    radial-gradient(60% 80% at 20% 10%, #1c2a4a, transparent 70%),
    linear-gradient(160deg, #0e1a30, #0a1222 60%, #0d1830);
  position: relative; overflow: hidden;
}
.win {
  position: absolute; border-radius: 8px; border: 1px solid #2a3a5c; background: rgba(13,21,38,.92);
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.win.a { left: 26px; top: 32px; width: 58%; height: 58%; }
.win.b { right: 22px; bottom: 24px; width: 46%; height: 46%; }
.win-bar { height: 22px; border-bottom: 1px solid #22314e; display: flex; align-items: center; gap: 4px; padding: 0 8px; }
.win-bar i { width: 5px; height: 5px; border-radius: 50%; background: #33456a; display: block; }
.win-lines { padding: 12px; display: grid; gap: 7px; }
.win-lines i { height: 6px; border-radius: 3px; background: #1d2b47; display: block; }
.win-lines i:nth-child(1) { width: 62%; background: #2b3f66; }
.win-lines i:nth-child(2) { width: 84%; }
.win-lines i:nth-child(3) { width: 45%; }
.win-lines i:nth-child(4) { width: 70%; }
.mock-side { border-left: 1px solid var(--line); background: rgba(255,255,255,.015); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mock-side .tag { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.mock-chip { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: #b7c5e0; background: #0c1526; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
.mock-chip .dot { width: 5px; height: 5px; }
.mock-chat { margin-top: auto; display: grid; gap: 6px; }
.bubble { font-size: 9.5px; padding: 6px 8px; border-radius: 7px; max-width: 95%; }
.bubble.them { background: #17233c; color: #b9c8e4; }
.bubble.us { background: rgba(109,94,252,.25); color: #d5d0ff; margin-left: auto; }
.mock-float {
  position: absolute; left: -16px; bottom: -16px; z-index: 3;
  background: #0d1526; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 18px 44px rgba(0,0,0,.6); font-size: 11px;
}
.mock-float b { display: block; font-size: 12px; }

/* ---------- sections ---------- */
.section { padding: 84px 0; position: relative; }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #8b83ff; margin-bottom: 10px; }
h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -1.2px; line-height: 1.1; margin: 0 0 12px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 15.5px; margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature {
  background: linear-gradient(180deg, rgba(17,27,49,.72), rgba(10,16,32,.6));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: .2s ease; position: relative; overflow: hidden;
}
.feature:hover { border-color: var(--line-2); transform: translateY(-2px); background: linear-gradient(180deg, rgba(22,34,60,.8), rgba(10,16,32,.7)); }
.feature .ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(109,94,252,.12); border: 1px solid rgba(109,94,252,.25); color: #b9b4ff; margin-bottom: 14px;
}
.feature .ico svg { width: 18px; height: 18px; }
.feature h3 { font-size: 14.5px; margin: 0 0 6px; letter-spacing: -.1px; }
.feature p { font-size: 12.8px; color: var(--muted); margin: 0; line-height: 1.55; }

.compare { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.compare table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); background: rgba(255,255,255,.02); }
.compare td:nth-child(2), .compare td:nth-child(3), .compare th:nth-child(2), .compare th:nth-child(3) { text-align: center; width: 170px; }
.compare tr:last-child td { border-bottom: none; }
.compare .yes { color: var(--green); font-weight: 700; }
.compare .no { color: #4b5b78; }
.compare .hl { background: rgba(109,94,252,.06); }
.price-tag { font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.strike { color: var(--dim); text-decoration: line-through; font-weight: 500; font-size: 13px; margin-left: 4px; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; position: relative; }
.plan.pop { border-color: rgba(109,94,252,.55); box-shadow: 0 0 0 1px rgba(109,94,252,.2), 0 24px 60px rgba(109,94,252,.12); }
.plan .badge-pop { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; background: linear-gradient(135deg, var(--brand), #8b5cf6); padding: 4px 12px; border-radius: 100px; }
.plan h3 { font-size: 15px; margin: 0 0 4px; }
.plan .price { font-size: 38px; font-weight: 800; letter-spacing: -1.6px; margin: 12px 0 2px; }
.plan .price span { font-size: 13px; color: var(--dim); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; font-size: 12.8px; color: var(--muted); }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li::before { content: "✓"; color: var(--green); font-weight: 800; font-size: 12px; margin-top: 1px; }

.cta-band {
  border: 1px solid var(--line-2); border-radius: 20px; padding: 48px;
  background:
    radial-gradient(70% 130% at 15% 0%, rgba(109,94,252,.28), transparent 60%),
    radial-gradient(60% 120% at 90% 100%, rgba(34,211,238,.14), transparent 60%),
    var(--panel);
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { color: var(--muted); margin: 0; }

.footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--dim); font-size: 12.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }

/* ---------- auth ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-art {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(60% 60% at 30% 25%, rgba(109,94,252,.25), transparent 70%),
    radial-gradient(50% 50% at 80% 80%, rgba(34,211,238,.12), transparent 70%),
    #080d18;
  border-right: 1px solid var(--line);
}
.auth-art::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(38,55,86,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(38,55,86,.2) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 80% at 40% 40%, #000, transparent 80%);
}
.auth-art > * { position: relative; z-index: 2; }
.auth-quote { font-size: 24px; letter-spacing: -.6px; line-height: 1.35; max-width: 440px; font-weight: 600; }
.auth-quote span { color: var(--brand-2); }
.auth-points { display: grid; gap: 12px; margin-top: 24px; font-size: 13px; color: var(--muted); }
.auth-points div { display: flex; gap: 9px; align-items: center; }
.auth-points i { width: 18px; height: 18px; border-radius: 50%; background: rgba(52,211,153,.12); color: var(--green); display: grid; place-items: center; font-style: normal; font-size: 10px; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-box { width: min(390px, 100%); }
.auth-box h1 { font-size: 26px; letter-spacing: -.8px; margin: 22px 0 6px; }
.auth-box p.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: #b3c1dc; margin-bottom: 6px; }
.input {
  width: 100%; background: #0a1120; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 11px 13px; color: var(--text); font-size: 14px; outline: none; transition: .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109,94,252,.16); }
.input::placeholder { color: #4f6080; }
.auth-note { margin-top: 18px; font-size: 12px; color: var(--dim); text-align: center; }
.alert { border-radius: 9px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 14px; display: none; }
.alert.show { display: block; }
.alert.err { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: #fca5a5; }
.alert.ok { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); color: #6ee7b7; }

/* ---------- join ---------- */
.join-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; background:
  radial-gradient(60% 50% at 50% 0%, rgba(109,94,252,.2), transparent 70%), var(--bg); }
.join-card { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.join-code { font-size: 34px; letter-spacing: 8px; font-weight: 800; text-align: center; padding: 16px; background: #0a1120; border: 1px dashed var(--line-2); border-radius: 12px; margin: 18px 0; }
.join-steps { display: grid; gap: 12px; margin: 22px 0; }
.step { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.step .num { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; background: rgba(109,94,252,.16); border: 1px solid rgba(109,94,252,.3); color: #c7c2ff; display: grid; place-items: center; font-size: 11px; }
.step b { color: #c3d0e8; }
.codebox { position: relative; background: #070d18; border: 1px solid var(--line); border-radius: 9px; padding: 12px 74px 12px 13px; font-size: 11.5px; overflow-wrap: anywhere; white-space: pre-wrap; color: #9fb2d4; }
.copy { position: absolute; right: 8px; top: 8px; }
.hint { font-size: 12px; color: var(--dim); line-height: 1.5; }
.notice { font-size: 12px; color: var(--dim); border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }

/* ---------- toast ---------- */
#toast { position: fixed; bottom: 22px; right: 22px; z-index: 999; display: grid; gap: 8px; }
.toast { background: #131f36; border: 1px solid var(--line-2); border-left: 3px solid var(--brand); border-radius: 9px; padding: 11px 15px; font-size: 13px; box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: slideIn .25s ease; }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 64px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .compare { overflow-x: auto; }
  .compare table { min-width: 620px; }
  .cta-band { padding: 30px; }
}
