:root {
  --bg: #0b0e14;
  --surface: #131722;
  --surface-2: #1a1f2e;
  --border: #262c3d;
  --text: #eef1f8;
  --text-dim: #97a0b5;
  --accent: #6c5ce7;
  --accent-hover: #7d6ff5;
  --accent-soft: rgba(108, 92, 231, 0.15);
  --success: #2ecc71;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.nav .logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.nav .logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--text-dim); }
.nav-links a { text-decoration: none; color: inherit; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 90px 0 60px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(108, 92, 231, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 10px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(108, 92, 231, 0.6);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: #3a4258; }

/* ---------- Feature grid ---------- */
.features {
  padding: 40px 0 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 16px; }
.feature-card p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ---------- Pricing / CTA card ---------- */
.cta-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  margin-bottom: 90px;
}
.cta-card h2 { margin: 0 0 10px; font-size: 26px; }
.cta-card p { color: var(--text-dim); margin: 0 0 28px; }

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ==========================================================
   Support widget
   ========================================================== */
.support-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(108, 92, 231, 0.7);
  z-index: 999;
  transition: transform 0.15s ease;
}
.support-launcher:hover { transform: scale(1.06); }
.support-launcher svg { width: 26px; height: 26px; }
.support-launcher .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg);
  display: none;
}
.support-launcher.has-update .dot { display: block; }

.support-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.55);
}
.support-panel.open { display: flex; }

.support-header {
  background: var(--accent);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.support-header .title { font-weight: 700; font-size: 15px; }
.support-header .subtitle { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.support-header button {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.support-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Pre-chat form */
.support-form { display: flex; flex-direction: column; gap: 12px; }
.support-form label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: block;
}
.support-form input,
.support-form textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.support-form input:focus,
.support-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.support-form small { color: var(--text-dim); font-size: 12px; }
.support-intro { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }

/* Chat bubbles */
.msg {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13.5px;
  color: #fff;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-admin {
  align-self: flex-start;
  background: var(--surface-2);
  color: #fff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-time {
  font-size: 10.5px;
  opacity: 0.6;
  margin-top: 4px;
}
.ticket-banner {
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
  padding: 6px 0 2px;
}
.ticket-banner b { color: var(--text); }

.support-footer {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.support-footer textarea {
  flex: 1;
  resize: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  max-height: 90px;
}
.support-footer textarea:focus { outline: none; border-color: var(--accent); }
.support-footer button {
  background: var(--accent);
  border: none;
  color: #fff;
  width: 42px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.support-footer button:hover { background: var(--accent-hover); }
.support-footer button:disabled { opacity: 0.5; cursor: default; }

.status-line {
  font-size: 12px;
  color: #ff6b6b;
  padding: 0 15px;
  min-height: 16px;
}
