/* ==========================================================================
   Minimalist Deep Dark Background
   Ultra-deep luxury obsidian black with subtle atmospheric ambient tints
   ========================================================================== */
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: #030405;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Lock root viewport scroll cleanly when Bootstrap modal opens (prevents double scrollbar) */
html:has(body.modal-open) {
  overflow: hidden !important;
}

/* 1. Deep Obsidian Base Gradient Canvas */
.mesh-bg-canvas {
  position: fixed;
  inset: -10%;
  width: 120%;
  height: 120%;
  z-index: -4;
  pointer-events: none;
  contain: strict;
  will-change: transform;
  background-color: #020304;
  background-image:
    radial-gradient(ellipse 65% 75% at 20% 105%,
      rgba(0, 220, 203, 0.25) 0%,
      rgba(0, 181, 197, 0.12) 35%,
      rgba(0, 90, 85, 0.04) 60%,
      transparent 75%),
    radial-gradient(ellipse 60% 75% at 82% 100%,
      rgba(141, 240, 60, 0.22) 0%,
      rgba(55, 190, 80, 0.10) 35%,
      rgba(20, 100, 45, 0.04) 60%,
      transparent 75%),
    linear-gradient(135deg,
      #010203 0%,
      #020405 50%,
      #010302 100%);
  animation: none !important;
}

[data-theme="brand-mint"] .mesh-bg-canvas {
  background-color: #EEF9E5;
  background-image:
    radial-gradient(1000px 550px at 50% -5%, rgba(79, 192, 154, 0.35) 0%, rgba(0, 169, 201, 0.18) 45%, rgba(238, 249, 229, 0) 75%),
    radial-gradient(900px 500px at 90% 40%, rgba(141, 240, 60, 0.25) 0%, rgba(238, 249, 229, 0) 65%),
    radial-gradient(850px 500px at 10% 70%, rgba(0, 169, 201, 0.2) 0%, rgba(238, 249, 229, 0) 65%);
}

/* 2. Three.js Background Canvas */
.three-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  opacity: 0.92;
  will-change: transform;
  transform: translateZ(0);
}

[data-theme="brand-mint"] .three-bg-canvas {
  opacity: 0.45;
}

/* 3. Deep Atmospheric Ambient Blooms (Subtle, deeply toned down) */
.mesh-glow-wrap {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  will-change: transform;
}

.ambient-glow {
  position: absolute;
  pointer-events: none;
  filter: blur(100px);
  -webkit-filter: blur(100px);
  transform: translateZ(0);
  animation: none !important;
}

/* Subtle Cyan/Teal Ambient Glow (Bottom-Left) */
.ambient-glow-teal,
.ambient-glow-1 {
  width: 780px;
  height: 660px;
  background: radial-gradient(circle at 45% 45%,
      rgba(0, 220, 203, 0.35) 0%,
      rgba(0, 181, 197, 0.18) 40%,
      rgba(0, 90, 85, 0.05) 65%,
      transparent 80%);
  bottom: -15%;
  left: -8%;
  opacity: 0.35;
  border-radius: 50%;
  animation: none !important;
}

/* Subtle Lime-Green Ambient Glow (Bottom-Right) */
.ambient-glow-lime,
.ambient-glow-2 {
  width: 820px;
  height: 700px;
  background: radial-gradient(circle at 55% 50%,
      rgba(141, 240, 60, 0.32) 0%,
      rgba(16, 185, 129, 0.18) 40%,
      rgba(20, 90, 45, 0.05) 65%,
      transparent 80%);
  bottom: -16%;
  right: -8%;
  opacity: 0.32;
  border-radius: 50%;
  animation: none !important;
}

/* Deep Emerald/Mint Static Bridge (Center Bottom) */
.ambient-glow-mint {
  width: 900px;
  height: 480px;
  background: radial-gradient(ellipse at center,
      rgba(16, 185, 129, 0.22) 0%,
      rgba(79, 192, 154, 0.12) 35%,
      transparent 75%);
  bottom: -5%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.28;
  border-radius: 50%;
  animation: none !important;
}

/* Upper Cyan Shimmer */
.ambient-glow-cyan {
  width: 600px;
  height: 420px;
  background: radial-gradient(circle,
      rgba(0, 220, 203, 0.18) 0%,
      rgba(0, 120, 140, 0.06) 45%,
      transparent 70%);
  top: 4%;
  left: 25%;
  opacity: 0.25;
  border-radius: 50%;
  animation: none !important;
}

/* Light Mode Adaptations */
[data-theme="brand-mint"] .ambient-glow-teal,
[data-theme="brand-mint"] .ambient-glow-1 {
  background: radial-gradient(circle, rgba(79, 192, 154, 0.45) 0%, rgba(0, 169, 201, 0.25) 50%, transparent 70%);
  opacity: 0.8;
}

[data-theme="brand-mint"] .ambient-glow-lime,
[data-theme="brand-mint"] .ambient-glow-2 {
  background: radial-gradient(circle, rgba(141, 240, 60, 0.4) 0%, transparent 70%);
  opacity: 0.75;
}

[data-theme="brand-mint"] .ambient-glow-mint {
  background: radial-gradient(ellipse at center, rgba(79, 192, 154, 0.35) 0%, transparent 70%);
  opacity: 0.65;
}

[data-theme="brand-mint"] .ambient-glow-cyan {
  background: radial-gradient(circle, rgba(0, 169, 201, 0.32) 0%, transparent 70%);
  opacity: 0.6;
}

/* Glassmorphism Utility */
.glass-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
}
