/* Modo bajo rendimiento */

/* Interruptor en el desplegable de temas */
.perf-mode-item {
  border-top: 1px solid var(--pl-border, rgba(255, 255, 255, 0.14));
  margin-top: 0.3rem;
  padding-top: 0.3rem;
}

.perf-mode-btn {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  white-space: nowrap;
}

.perf-mode-estado {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0.65;
}

.perf-mode-btn[aria-pressed="true"] .perf-mode-estado {
  color: #7ef7d0;
  opacity: 1;
}

/* Lo que apaga */

/* 1. Animaciones y transiciones */
body.perf-low *,
body.perf-low *::before,
body.perf-low *::after {
  animation: none !important;
  transition: none !important;
}

/* 2. Desenfoques */
body.perf-low * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 3. Sombras grandes y difusas */
body.perf-low .quiz-card,
body.perf-low .members-card,
body.perf-low .activity-card,
body.perf-low .panel-card,
body.perf-low .player-card,
body.perf-low .summary-card,
body.perf-low .engine-card,
body.perf-low .work-card,
body.perf-low .signal-card,
body.perf-low .contact-box {
  box-shadow: var(--perf-shadow, 0 2px 8px rgba(0, 0, 0, 0.35)) !important;
}

/* 4. Fondo animado */
body.perf-low .site-bg,
body.perf-low #starfield,
body.perf-low #ambient-particles,
body.perf-low .bg-orb,
body.perf-low .engine-bg,
body.perf-low .hero-spark,
body.perf-low #cursor-glow,
body.perf-low .hall-estrella-capa,
body.perf-low .hall-chispas,
body.perf-low .hall-haz {
  display: none !important;
}

/* Fondo sólido de respaldo */
body.perf-low {
  background: var(--pl-bg, #07030f);
}

/* 5. Transform en hover */
body.perf-low .quiz-card:hover,
body.perf-low .members-card:hover,
body.perf-low .activity-card:hover,
body.perf-low .engine-card:hover,
body.perf-low .work-card:hover,
body.perf-low .btn-primary:hover,
body.perf-low .btn-secondary:hover {
  transform: none !important;
}

/* 6. Degradados sobre texto */
body.perf-low .hall-cifra,
body.perf-low .hall-rango b {
  background-image: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--m-cla, #fff) !important;
}

/* "Reducir movimiento" del sistema */
@media (prefers-reduced-motion: reduce) {
  body:not(.perf-low) *,
  body:not(.perf-low) *::before,
  body:not(.perf-low) *::after {
    animation: none !important;
    transition: none !important;
  }
  body:not(.perf-low) * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}
