:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --text-primary: #f0f0f5;
  --text-secondary: #9494a8;
  --text-muted: #5e5e72;
  --accent: #00e5a0;
  --accent-dim: rgba(0, 229, 160, 0.12);
  --accent-glow: rgba(0, 229, 160, 0.25);
  --border: rgba(255, 255, 255, 0.06);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === HERO === */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
  position: relative;
  background: 
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(0, 229, 160, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(100, 80, 255, 0.04) 0%, transparent 60%),
    var(--bg-primary);
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 32px;
  border: 1px solid rgba(0, 229, 160, 0.15);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--text-primary);
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.hero-btn-primary {
  display: inline-block;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: opacity 0.2s, transform 0.15s;
}

.hero-btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.hero-btn-secondary {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.hero-btn-secondary:hover { color: var(--text-primary); }

.hero-stats {
  display: flex;
  gap: 40px;
  align-items: center;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* === PROBLEM === */
.problem {
  padding: 120px 40px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problem-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.problem-left h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  position: sticky;
  top: 120px;
}

.problem-item {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.problem-item:first-child {
  padding-top: 0;
}

.problem-item:last-child {
  border-bottom: none;
}

.problem-icon {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 8px;
  margin-top: 4px;
}

.problem-text h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.problem-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* === SERVICES === */
.services {
  padding: 120px 40px;
}

.services-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}

.services-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  transition: background 0.2s, border-color 0.2s;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 229, 160, 0.12);
}

.service-card.card-large {
  grid-column: 1 / -1;
  background: 
    radial-gradient(ellipse 50% 70% at 90% 50%, rgba(0, 229, 160, 0.05) 0%, transparent 70%),
    var(--bg-card);
}

.card-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 4px 12px;
  background: var(--accent-dim);
  display: inline-block;
  border-radius: 6px;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* === HOW === */
.how {
  padding: 120px 40px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-inner {
  max-width: 700px;
  margin: 0 auto;
}

.how-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.how-step {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 24px;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  flex-shrink: 0;
}

.step-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0.3;
}

.step-content {
  padding: 24px 0 48px;
}

.step-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* === CLOSING === */
.closing {
  padding: 140px 40px;
  text-align: center;
  position: relative;
  background: 
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0, 229, 160, 0.04) 0%, transparent 70%),
    var(--bg-primary);
}

.closing-inner {
  max-width: 750px;
  margin: 0 auto;
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.closing-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

.closing-cta {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  margin-bottom: 40px;
  transition: opacity 0.2s, transform 0.15s;
}

.closing-cta:hover { opacity: 0.88; transform: translateY(-2px); }

.closing-verticals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.vertical-tag {
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}

.vertical-tag:hover {
  border-color: rgba(0, 229, 160, 0.2);
  color: var(--accent);
}

/* === FOOTER === */
.site-footer {
  padding: 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero {
    padding: 100px 24px 60px;
    min-height: auto;
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

  .stat-divider {
    display: none;
  }

  .problem {
    padding: 80px 24px;
  }

  .problem-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .problem-left h2 {
    position: static;
  }

  .services {
    padding: 80px 24px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card.card-large {
    grid-column: auto;
  }

  .how {
    padding: 80px 24px;
  }

  .closing {
    padding: 80px 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-cta {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bg-primary);
  background: var(--accent);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.15s;
}

.nav-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.2s;
}

@media (max-width: 768px) {
  .site-nav { padding: 0 24px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
    align-items: stretch;
  }

  .nav-links.open { display: flex; }

  .nav-link, .nav-cta {
    padding: 14px 24px;
    border-radius: 0;
    font-size: 1rem;
    background: none;
    color: var(--text-secondary);
  }

  .nav-cta { color: var(--accent); }
}

/* ============================================================
   PRICING PAGE
   ============================================================ */
.pricing-hero {
  padding: 140px 40px 60px;
  background:
    radial-gradient(ellipse 70% 50% at 30% 40%, rgba(0, 229, 160, 0.06) 0%, transparent 60%),
    var(--bg-primary);
}

.pricing-hero-inner {
  max-width: 700px;
}

.pricing-section {
  padding: 40px 40px 100px;
}

.pricing-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative;
  transition: border-color 0.2s;
}

.plan-card:hover {
  border-color: rgba(0, 229, 160, 0.15);
}

.plan-featured {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 229, 160, 0.07) 0%, transparent 70%),
    var(--bg-card);
  border-color: rgba(0, 229, 160, 0.2);
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0, 229, 160, 0.06);
}

.plan-badge-top {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

.plan-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.plan-price {
  margin-bottom: 16px;
}

.price-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.price-per {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.plan-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

.plan-features {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-features li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.feat-check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.plan-cta {
  display: block;
  text-align: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.plan-cta:hover { opacity: 0.85; transform: translateY(-1px); }

.plan-cta-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.plan-cta-secondary {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 160, 0.15);
}

.pricing-note {
  margin-top: 40px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing-note-link {
  color: var(--accent);
  text-decoration: none;
}

.pricing-note-link:hover { text-decoration: underline; }

/* FAQ */
.faq-section {
  padding: 80px 40px 120px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.faq-inner {
  max-width: 700px;
  margin: 0 auto;
}

.faq-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; }

.faq-item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.faq-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .plan-featured { transform: none; }
  .pricing-hero { padding: 120px 24px 50px; }
  .pricing-section { padding: 32px 24px 80px; }
  .faq-section { padding: 60px 24px 80px; }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-hero {
  padding: 140px 40px 60px;
  background:
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(0, 229, 160, 0.05) 0%, transparent 60%),
    var(--bg-primary);
}

.contact-hero-inner { max-width: 700px; }

.contact-section {
  padding: 40px 40px 120px;
}

.contact-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: start;
}

/* Form */
.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  resize: vertical;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235e5e72' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(0, 229, 160, 0.4);
}

.form-group input:disabled,
.form-group textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-submit {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 4px;
}

.form-submit:hover { opacity: 0.88; transform: translateY(-1px); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.form-success {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(0, 229, 160, 0.07);
  border: 1px solid rgba(0, 229, 160, 0.18);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 8px;
}

.success-icon {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.form-success strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.form-success p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-error {
  background: rgba(255, 80, 80, 0.07);
  border: 1px solid rgba(255, 80, 80, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #ff6b6b;
}

/* Sidebar */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 8px;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-icon {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.sidebar-item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .contact-hero { padding: 120px 24px 50px; }
  .contact-section { padding: 32px 24px 80px; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 28px 24px; }
  .contact-sidebar { flex-direction: row; flex-wrap: wrap; gap: 24px; }
  .sidebar-item { flex: 1; min-width: 200px; }
}

/* ============================================================
   CHATBOT WIDGET
   ============================================================ */
#bf-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  font-family: var(--font-body);
}

#bf-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(0, 229, 160, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

#bf-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 229, 160, 0.5);
}

.bf-pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #ff5757;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  animation: bf-pulse 2s ease-in-out infinite;
}

@keyframes bf-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

#bf-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 360px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 160, 0.05);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

#bf-panel.bf-open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.bf-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.bf-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.bf-header-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.bf-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bf-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: bf-pulse 2s ease-in-out infinite;
}

#bf-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  min-height: 120px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#bf-messages::-webkit-scrollbar { width: 4px; }
#bf-messages::-webkit-scrollbar-track { background: transparent; }
#bf-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.bf-msg {
  max-width: 88%;
  animation: bf-in 0.18s ease;
}

@keyframes bf-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bf-msg p {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
}

.bf-msg-bot { align-self: flex-start; }
.bf-msg-user { align-self: flex-end; }

.bf-msg-bot p {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.bf-msg-user p {
  background: var(--accent);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

/* Typing indicator */
.bf-typing {
  align-self: flex-start;
}

.bf-typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  margin: 10px 4px 10px 14px;
  animation: bf-bounce 1.2s ease-in-out infinite;
}

.bf-typing span:first-child { animation-delay: 0ms; margin-left: 14px; }
.bf-typing span:nth-child(2) { animation-delay: 160ms; margin-left: 0; }
.bf-typing span:last-child { animation-delay: 320ms; margin-left: 0; margin-right: 14px; }

@keyframes bf-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.bf-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

#bf-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

#bf-input::placeholder { color: var(--text-muted); }
#bf-input:focus { border-color: rgba(0, 229, 160, 0.35); }
#bf-input:disabled { opacity: 0.5; }

#bf-send {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent);
  border: none;
  color: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
  align-self: center;
}

#bf-send:hover { opacity: 0.85; }
#bf-send:disabled { opacity: 0.4; cursor: not-allowed; }

.bf-footer-note {
  padding: 8px 16px 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg-secondary);
}

.bf-footer-note a {
  color: var(--accent);
  text-decoration: none;
}

.bf-footer-note a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  #bf-widget { bottom: 20px; right: 16px; }
  #bf-panel { width: calc(100vw - 32px); right: 0; }
}