/**
 * Universe Background Layer — Zentix 2026
 * Positions the canvas behind all page content.
 */

/* Fixed canvas layer */
#universe-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}

/* Make body transparent so the canvas shows through */
body {
  background: transparent !important;
}

/* Dark mode body class — toggled by JS or prefers-color-scheme */
html {
  background: #050510; /* Prevents flash of white on dark mode */
}

@media (prefers-color-scheme: light) {
  html {
    background: #f8fafc;
  }
}

/* All sections should have semi-transparent backgrounds so the universe shows subtly */
section:not(.hero):not(.f-hero):not(.f-whatsapp-showcase):not(.f-register):not(.f-agentic-showcase):not([style*="background:"]):not([style*="background:"]) {
  background: transparent;
}

/* Cards: glassmorphism so stars peek through */
.feature-card,
.pricing-card,
.f-feature-card {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

@media (prefers-color-scheme: dark) {
  .feature-card,
  .pricing-card,
  .f-feature-card {
    background: rgba(15, 20, 40, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
  }
}

/* ═══════════════════════════════════════════════════════
   Class-based theme overrides (JS toggle — overrides system preference)
   ═══════════════════════════════════════════════════════ */

/* Light theme: force light background */
html.light-theme {
  background: #f0f2f8 !important;
}

body.light-theme .feature-card,
body.light-theme .pricing-card,
body.light-theme .f-feature-card,
body.light-mode .feature-card,
body.light-mode .pricing-card,
body.light-mode .f-feature-card {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Dark theme: force dark background */
html.dark-mode {
  background: #050510 !important;
}

body.dark-mode .feature-card,
body.dark-mode .pricing-card,
body.dark-mode .f-feature-card {
  background: rgba(15, 20, 40, 0.72) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
}

/* ═══════════════════════════════════════════════════════
   Dashboard attribute-based overrides (data-dashboard-theme)
   ───────────────────────────────────────────────────────
   The dashboard JS sets body[data-dashboard-theme] instead of
   html.dark-mode.  These rules ensure the background obeys
   the attribute regardless of prefers-color-scheme.
   ═══════════════════════════════════════════════════════ */

html:has(body[data-dashboard-theme="dark"]) {
  background: #050510 !important;
}

html:has(body[data-dashboard-theme="light"]) {
  background: #f0f2f8 !important;
}
