/**
 * Nbulai — performance-light CSS overrides (targeted, not global kill-switch)
 */

html.performance-light .cosmic-hero__aurora-ribbon {
  animation-duration: 28s !important;
  opacity: 0.35;
  filter: blur(18px);
}

html.performance-light .cosmic-hero__gas {
  opacity: calc(var(--gas-opacity, 0.2) * 0.55);
  filter: blur(28px);
}

html.performance-light .cosmic-hero__haze {
  opacity: calc(var(--haze-opacity, 0.25) * 0.6);
}

html.performance-light .cosmic-hero__nebula,
html.performance-light .cosmic-hero__nebula-accent {
  animation-duration: 60s !important;
  opacity: 0.45;
}

html.performance-light .cosmic-hero__wormhole-ring,
html.performance-light .cosmic-hero__wormhole-core,
html.performance-light .cosmic-hero__wormhole-spiral {
  animation: none !important;
}

html.performance-light .cosmic-hero__black-hole-disk,
html.performance-light .cosmic-hero__black-hole-glow {
  animation: none !important;
}

html.performance-light .cosmic-hero__ufo {
  animation-duration: 48s !important;
}

html.performance-light .cosmic-hero__ufo-lights span {
  animation: none !important;
  opacity: 0.65;
}

html.performance-light .cosmic-hero__planet {
  animation-duration: 48s !important;
}

html.performance-light .energy-echo-ray {
  display: none !important;
}

html.performance-light .energy-echo-wave {
  animation-duration: 0.55s !important;
  opacity: 0.55;
}

html.performance-light #cosmic-cover.energy-echo-shimmer::after {
  animation-duration: 0.5s !important;
  opacity: 0.35;
}

html.performance-light .nav-button {
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

html.performance-light .performance-toggle {
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

html.performance-light #cooking-hub::before,
html.performance-light .cooking-glitter {
  animation: none !important;
  opacity: 0.35;
}

.performance-toggle {
  position: fixed;
  left: clamp(12px, 2vw, 24px);
  bottom: calc(clamp(12px, 2vw, 24px) + env(safe-area-inset-bottom, 0px));
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  border: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(5, 10, 28, 0.46);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 22px rgba(94, 238, 255, 0.12);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.performance-toggle strong {
  color: rgba(94, 238, 255, 0.95);
  font-weight: 700;
}

.performance-toggle:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 28px rgba(94, 238, 255, 0.2);
}

.performance-toggle:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(94, 238, 255, 0.35),
    0 12px 30px rgba(0, 0, 0, 0.34);
}

@media (max-width: 760px) {
  .performance-toggle {
    left: clamp(10px, 2vw, 16px);
    bottom: calc(clamp(10px, 2vw, 16px) + env(safe-area-inset-bottom, 0px));
    padding: 7px 11px;
    font-size: 0.64rem;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .performance-toggle:hover {
    transform: none;
  }
}
