* { box-sizing: border-box; }
:root {
  --bg-page: #020617;
  --bg-header: #020617;
  --bg-hero: radial-gradient(circle at top left, #1d4ed8 0, #020617 45%, #020617 100%);
  --bg-section: #ffffff;
  --bg-card: #f9fafb;
  --bg-stat: #020617;
  --border-soft: #1f2937;
  --border-light: #e5e7eb;
  --text-main: #0f172a;
  --text-on-dark: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --accent-strong: #1d4ed8;
  --color-accent: #4f8cff;
  --color-accent-strong: #5fe1ff;
  --color-text: #e5e7eb;
  --color-text-soft: #cbd5f5;
  --color-text-muted: #9ca3af;
  --color-surface: #0b0f19;
  --radius-lg: 14px;
  --radius-md: 10px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-on-dark);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-header);
}

/* show only logo in header */
/* header nav {
  display: none;
} */

.logo {
  font-size: 20px;
  font-weight: 700;
  color: #e5e7eb;
  letter-spacing: 0.04em;
}

nav a {
  margin-left: 18px;
  font-size: 14px;
  color: #cbd5f5;
  opacity: 0.9;
}

nav a:hover {
  opacity: 1;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
}
/* -------------------------
   Hero Section
-------------------------- */
.hero {
  padding: 40px 20px 36px;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-on-dark);
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 32px;
  margin: 0 0 10px;
}

.hero-sub {
  max-width: 720px;
  font-size: 16px;
  margin-bottom: 20px;
  color: #cbd5f5;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 16px;
}

.stat-box {
  flex: 1 1 220px;
  background: var(--bg-stat);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 14px 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #e5e7eb;
}

.stat-label {
  font-size: 13px;
  color: #9ca3af;
}

.control-box {
  margin-top: 16px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 14px 16px 12px;
}

.control-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #e5e7eb;
}

.control-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag-pill {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 4px 10px;
  font-size: 12px;
  color: #e5e7eb;
  white-space: nowrap;
}

.cta-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 22px;
  margin: 24px 0 4px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.cta-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}
.hero-chat__bubble {
  border-radius: 14px;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-bottom: 0.7rem;
}

.hero-chat__bubble--user {
  background: rgba(255, 255, 255, 0.06);
}

.hero-chat__bubble--ai {
  background: var(--color-accent-soft);
  border: 1px solid rgba(95, 225, 255, 0.5);
}

/* -------------------------
   Sectionsss
-------------------------- */
.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-section);
  color: var(--text-main);
}

.section h2 {
  margin-top: 0;
  font-size: 24px;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.section h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  background: var(--accent);
  border-radius: 999px;
  margin-top: 6px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.card {
  flex: 1 1 300px;
  border: 1px solid var(--border-light);
  padding: 20px;
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.card h3 {
  margin-top: 0;
  font-size: 18px;
}

/* -------------------------
   Detailed Troubleshooting Section
-------------------------- */
.details-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}

.details-col {
  flex: 1 1 320px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 16px 18px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.details-col h3 {
  margin-top: 0;
  font-size: 18px;
}

.details-list {
  padding-left: 18px;
  margin: 8px 0 0;
}

.details-list li {
  margin-bottom: 6px;
}
/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero__inner,
  .section__inner--two-col,
  .coverage__grid,
  .how__steps,
  .cases__grid,
  .testimonials__grid,
  .cta-banner__inner,
  .footer__inner,
  .grid-2,
  .grid-3,
  .funnels__grid,
  .why-us__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__visual {
    justify-content: flex-start;
    margin-top: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .header__nav {
    display: none; /* simple mobile treatment */
  }

  .hero {
    padding-top: calc(var(--header-height) + 1.5rem);
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .section {
    padding: var(--space-lg) 0 var(--space-xl);
  }

  .page-hero {
    padding-top: calc(var(--header-height) + 1.5rem);
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.7rem;
  }

  .container {
    padding: 0 1.1rem;
  }
}

/* =======================================
   ENHANCED AI PANEL STYLES
====================================== */
.ai-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100%;
  background: #080b11;
  border-left: 1px solid rgba(255,255,255,0.08);
  box-shadow: -6px 0 20px rgba(0,0,0,0.5);
  transition: right 0.28s cubic-bezier(0.45, 0, 0.25, 1);
  z-index: 99999;
  display: flex;
  flex-direction: column;
}

.ai-panel.open {
  right: 0;
}

.ai-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 99990;
}

.ai-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

.ai-panel-header {
  padding: 1rem;
  background: linear-gradient(to right,#0d121c,#111827);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-panel-header h3 {
  margin: 0;
  color: #5fe1ff;
  font-size: 1.1rem;
}

.ai-close-btn {
  border: none;
  background: none;
  font-size: 2rem;
  color: #aaa;
  cursor: pointer;
  transition: color .2s;
}

.ai-close-btn:hover {
  color: #fff;
}

.ai-chat-window {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.ai-bubble {
  max-width: 85%;
  padding: .7rem 1rem;
  border-radius: 12px;
  font-size: .94rem;
  line-height: 1.35;
}
/* Flowchart / related preview blur + transition styles */
.flowchart-wrapper,
.related-wrapper {
  transition: filter 280ms ease, transform 280ms ease, opacity 240ms ease;
  will-change: filter, transform, opacity;
}

/* Blurred (locked) appearance */
.flowchart-wrapper.blurred,
.related-wrapper.blurred {
  filter: blur(6px) saturate(0.9) contrast(0.95);
  transform: scale(.985);
  opacity: 0.93;
  pointer-events: none; /* prevent clicks while locked */
}

/* Unblurred (unlocked) appearance */
.flowchart-wrapper.unblurred,
.related-wrapper.unblurred {
  filter: none;
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

/* Small styling for paywall box and buttons */
.paywall-box {
  margin-top: 12px;
  padding: 16px;
  background: rgba(22, 32, 58, 0.92); /* Deep navy to match theme */
  border: 1px solid rgba(95, 225, 255, 0.35); /* Neon cyan border */
  border-radius: 10px;
  text-align: center;
  color: var(--color-text); /* High contrast text */
  box-shadow: 0 0 18px rgba(95, 225, 255, 0.15); /* Soft glow */
}

.paywall-box p {
  color: var(--color-text-soft);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}


.ai-bubble-user {
  background: rgba(255,255,255,0.12);
  align-self: flex-end;
}

.ai-bubble-ai {
  background: rgba(95,225,255,0.12);
  border: 1px solid rgba(95,225,255,0.35);
  align-self: flex-start;
  animation: fadeIn .25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-timestamp {
  align-self: center;
  font-size: .75rem;
  color: #888;
  margin-bottom: .5rem;
}

.ai-typing {
  display: flex;
  gap: .3rem;
  padding: .8rem 1.2rem;
}

.ai-typing.hidden {
  display: none;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #5fe1ff;
  border-radius: 50%;
  animation: typingBlink 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }

@keyframes typingBlink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

.ai-cta-btn {
  margin-top: .6rem;
  display: inline-block;
  padding: .55rem .9rem;
  font-size: .8rem;
  border-radius: 6px;
  background: rgba(79,140,255,0.20);
  color: #5fe1ff;
  border: 1px solid #4f8cff;
  cursor: pointer;
  transition: background .2s;
  margin-right: 0.4rem;
}

.ai-cta-btn:hover {
  background: rgba(79,140,255,0.35);
}

.ai-input-bar {
  padding: .75rem;
  display: flex;
  gap: .5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: #0c1017;
}

.ai-input-bar input {
  flex: 1;
  padding: .7rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #eee;
}

.ai-send-btn {
  padding: .75rem 1.3rem;
  border-radius: 6px;
  border: none;
  background: linear-gradient(135deg,#4f8cff,#5fe1ff);
  color: #000;
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 480px) {
  .ai-panel {
    width: 100%;
    right: -100%;
  }
}
/* === Fullscreen Backdrop === */
#loginPopupBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  z-index: 99999;
}

#loginPopupBackdrop.show {
  opacity: 1;
  visibility: visible;
}

/* === Centered Dark Futuristic Modal === */
#loginPopup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 440px;
  max-width: 92%;
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  z-index: 100000;
}

#loginPopup.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Inside content */
.login-popup-content {
  padding: 2rem;
  color: var(--color-text);
}

/* Close button */
.login-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 26px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-text-muted);
  transition: 0.2s;
}

.login-close-btn:hover {
  color: var(--color-accent-strong);
}

/* Form Inputs matching UI */
.login-popup-content input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: .9rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-text);
}

.login-popup-content input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

/* Buttons */
.login-popup-content .auth-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-strong));
  border: none;
  color: #000;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: .5rem;
  transition: 0.2s;
}

.login-popup-content .auth-btn:hover {
  transform: translateY(-2px);
}

/* Switch link */
.login-popup-content .switch-link {
  font-size: .85rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 1rem;
}

.login-popup-content .switch-link span {
  color: var(--color-accent);
  cursor: pointer;
}

.otp-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0.8rem 0 1rem;
}

.otp-box input.otp-input {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; /* Keep slight rounding for premium feel */
  text-align: center;
  font-size: 1.25rem;
  color: var(--color-text);
  transition: 0.2s ease;
}

.otp-box input.otp-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.35);
}

.ai-logout-btn {
  margin-right: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  border: 1px solid #4f8cff;
  background: rgba(79,140,255,0.18);
  color: #5fe1ff;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
}

.ai-logout-btn:hover {
  background: rgba(79,140,255,0.35);
  border-color: #5fe1ff;
}

.sso-wrapper {
  text-align: center;
  margin-top: 1.4rem;
}

.sso-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.7rem;
}

.sso-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.sso-icon {
  width: 28px;
  height: 28px;
  cursor: pointer;
  opacity: 0.85;
  transition: 0.2s;
}
.sso-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}
.terms-row a {
  color: #4da3ff;   /* or your theme primary color */
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
}

.terms-row a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.terms-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.8rem;

  /* Ensures checkbox + label stay together */
  white-space: nowrap;
}

.terms-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

.terms-row label {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.2;
}

.auth-title,
.auth-subtext {
  text-align: center;
}
.flowchart-preview-box {
  max-height: 180px;
  /* only small portion  visible */
  overflow: hidden;
  /* hide rest */
  background: #ffffff;
  color: #000; /* ensure text is black */
}
.related-preview-box {
  max-height: 120px;
  overflow: hidden;
  background: #f4f6ff;
  color: #000; /* black text for readability */
  padding: 10px;
  border-radius: 6px;
  margin-top: 12px;
}

.blurred {
  filter: blur(6px);
  opacity: 0.55;
  pointer-events: none;
}

.ai-clear-btn {
  margin-right: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  border: 1px solid #4f8cff;
  background: rgba(79, 140, 255, 0.18);
  color: #5fe1ff;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
}

.ai-cta-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ai-select {
  padding: 10px;
  border-radius: 6px;
  background: rgba(79, 140, 255, 0.18);
  color: #5fe1ff;
  border: 1px solid #4f8cff;
  font-size: 14px;
  cursor: pointer;
}

/* loading overlay used when navigating to flowchart */
#aiLoadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  visibility: hidden;
  pointer-events: none;
}
#aiLoadingOverlay.visible {
  visibility: visible;
  pointer-events: auto;
}
#aiLoadingOverlay .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 🔵 On focus / open */
.ai-select:focus {
  outline: none;
  background: rgba(79, 140, 255, 0.32);
  border-color: #5fe1ff;
}

/* 🟦 When value selected */
.ai-select:not([disabled]):has(option:checked:not([disabled])) {
  background: rgba(79, 140, 255, 0.45);
}

/* 🔒 Disabled dropdown */
.ai-select:disabled {
  background: rgba(120, 120, 120, 0.25);
  color: #9aa0a6;
  border-color: #666;
  cursor: not-allowed;
}

/* ⬇️ Option list background (Chrome/Edge)  */
.ai-select option {
  background: #0b1220;
  color: #e0f2ff;
}