/* Demo Landing Page Stylesheet */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 40%);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.8);
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

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

.btn-portal {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid var(--accent-violet);
  color: var(--text-primary);
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-portal:hover {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px var(--accent-violet);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(85vh - 80px);
  padding: 4rem 2rem;
  position: relative;
}

.badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 2rem;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 850;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 900px;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 3rem;
}

.cta-group {
  display: flex;
  gap: 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-pink));
  border: none;
  color: var(--text-primary);
  padding: 0.8rem 2rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -10px var(--accent-pink);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 0.8rem 2rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 6rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

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

/* Floating Helper Alert for local testing */
.test-alert {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--accent-cyan);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  max-width: 320px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.test-alert h4 {
  color: var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.test-alert p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.test-alert a {
  color: #fff;
  text-decoration: underline;
  font-weight: bold;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 15px 2px rgba(6, 182, 212, 0.2);
  }
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-portal-subtle {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Hamburger button styling */
.nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.nav-hamburger:hover {
  opacity: 0.8;
}

/* Mobile Menu Drawer Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 25, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer Content */
.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: #0b0f19;
  border-left: 1px solid var(--glass-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}
.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.mobile-menu-close:hover {
  color: var(--text-primary);
}

/* Mobile links */
.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.mobile-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.2s;
}
.mobile-nav-links a:hover {
  color: var(--text-primary);
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1.5rem;
  }
  .nav-links, .nav-actions {
    display: none !important;
  }
  .nav-hamburger {
    display: flex;
  }
  .hero {
    min-height: auto;
    padding: 4rem 1.5rem 2rem 1.5rem;
  }
  .hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  .hero p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }
  .cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    gap: 0.75rem;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .features-grid {
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }
  .feature-card {
    padding: 1.5rem;
  }
  .test-alert {
    display: none; /* Hide on mobile to keep clean widget experience */
  }
}

/* SPA Pages base rules */
.spa-page {
  display: none;
  animation: fadeSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.spa-page.active-page {
  display: block;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sub-page Header styling */
.page-header {
  text-align: center;
  padding: 4rem 1.5rem 2rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin: 1rem 0;
  background: linear-gradient(135deg, #fff 30%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.25;
}
.page-header p {
  font-size: 1.15rem;
  color: #94a3b8;
  line-height: 1.6;
}

/* Detailed Features view styles */
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 4rem 4rem 4rem;
}
.detail-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}
.detail-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.15);
}
.detail-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.detail-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #f8fafc;
}
.detail-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Pricing Section layout styles */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 4rem 4rem 4rem;
  align-items: stretch;
}
.pricing-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}
.pricing-card.premium {
  background: rgba(139, 92, 246, 0.04);
  border: 2px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 20px 45px -15px rgba(139, 92, 246, 0.25);
  transform: scale(1.03);
}
.pricing-card:hover:not(.premium) {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}
.pricing-card.premium:hover {
  transform: scale(1.05) translateY(-4px);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}
.pricing-tier {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}
.pricing-price {
  font-size: 2.75rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 1rem;
}
.pricing-price span {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
}
.pricing-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 2rem;
  line-height: 1.4;
}
.pricing-features {
  list-style: none;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pricing-features li {
  font-size: 0.9rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-features li::before {
  content: "✓";
  color: #10b981;
  font-weight: bold;
}
.pricing-btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

/* Documentation panel layouts */
.docs-layout {
  display: flex;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 4rem 4rem 4rem;
}
.docs-sidebar {
  width: 250px;
  flex-shrink: 0;
}
.docs-sidebar ul {
  list-style: none;
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.docs-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}
.docs-nav-link:hover {
  background: rgba(255, 255, 255, 0.02);
  color: #f8fafc;
}
.docs-nav-link.active {
  background: rgba(139, 92, 246, 0.08);
  color: #a78bfa;
  border-left-color: #8b5cf6;
  font-weight: 600;
}
.docs-content {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 2.5rem;
  border-radius: 1rem;
}
.docs-section {
  display: none;
  animation: fadeSec 0.3s ease forwards;
}
.docs-section.active-section {
  display: block;
}
@keyframes fadeSec {
  from { opacity: 0; }
  to { opacity: 1; }
}
.docs-section h2 {
  font-size: 1.75rem;
  color: #f8fafc;
  margin-bottom: 1rem;
  font-weight: 700;
}
.docs-section p {
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.code-block {
  background: #060913;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem;
  border-radius: 0.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  color: #e2e8f0;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.code-block code {
  white-space: pre;
}
.docs-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #94a3b8;
}
.docs-section ul li code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  color: #e2e8f0;
}

@media (max-width: 1024px) {
  .details-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 2rem;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    padding: 2rem;
  }
  .pricing-card.premium {
    transform: none;
  }
  .pricing-card.premium:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
  }
  .docs-sidebar {
    width: 100%;
  }
  .docs-sidebar ul {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .docs-nav-link {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .docs-nav-link.active {
    border-bottom-color: #8b5cf6;
  }
}

@media (max-width: 640px) {
  .details-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}
}
