/* Efeitos de fundo do perfil (estilo guns.lol) */

.fx-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.stage .card {
  position: relative;
  z-index: 1;
}

.stage-meta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

/* —— Fundo borrado —— */
.fx-blur .bg {
  filter: saturate(1.05) brightness(0.55) blur(10px);
  transform: scale(1.08);
}

/* —— Noite —— */
.fx-night .bg {
  filter: saturate(0.55) brightness(0.28) contrast(1.05);
}

.fx-night .fx-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 28% 42%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 48% 12%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 66% 55%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 82% 28%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 90% 70%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 35% 78%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(20, 40, 90, 0.55), transparent 70%),
    linear-gradient(180deg, rgba(4, 8, 24, 0.45), rgba(2, 4, 14, 0.55));
  animation: fxTwinkle 4s ease-in-out infinite alternate;
}

@keyframes fxTwinkle {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

/* —— Aurora —— */
.fx-aurora .fx-layer::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 50% 35% at 20% 30%, rgba(80, 255, 180, 0.35), transparent 60%),
    radial-gradient(ellipse 45% 40% at 75% 25%, rgba(120, 100, 255, 0.4), transparent 55%),
    radial-gradient(ellipse 55% 30% at 50% 55%, rgba(40, 200, 255, 0.28), transparent 60%),
    radial-gradient(ellipse 40% 35% at 30% 70%, rgba(255, 80, 180, 0.22), transparent 55%);
  filter: blur(28px) saturate(1.4);
  animation: fxAurora 14s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

@keyframes fxAurora {
  from { transform: translate(-4%, -2%) rotate(-4deg) scale(1.05); }
  to { transform: translate(5%, 3%) rotate(5deg) scale(1.12); }
}

/* —— Plasma —— */
.fx-plasma .fx-layer::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 0, 128, 0.45), transparent 40%),
    radial-gradient(circle at 70% 35%, rgba(0, 200, 255, 0.4), transparent 42%),
    radial-gradient(circle at 50% 70%, rgba(180, 0, 255, 0.35), transparent 45%),
    radial-gradient(circle at 20% 75%, rgba(255, 120, 0, 0.25), transparent 40%);
  filter: blur(40px) saturate(1.6);
  animation: fxPlasma 10s linear infinite;
  mix-blend-mode: screen;
  opacity: 0.85;
}

@keyframes fxPlasma {
  0% { transform: rotate(0deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1.1); }
}

/* —— Dither —— */
.fx-dither .fx-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.55;
  animation: fxDither 0.35s steps(2) infinite;
}

.fx-dither .bg {
  filter: saturate(1.2) contrast(1.15) brightness(0.5);
}

@keyframes fxDither {
  0% { transform: translate(0, 0); }
  100% { transform: translate(1px, -1px); }
}

/* —— TV antiga (CRT) —— */
.fx-crt .fx-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.18) 0px,
      rgba(0, 0, 0, 0.18) 1px,
      transparent 2px,
      transparent 3px
    );
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.fx-crt .fx-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.45) 100%);
  animation: fxCrtFlicker 3.5s infinite;
  pointer-events: none;
}

.fx-crt .bg {
  filter: saturate(0.85) contrast(1.2) brightness(0.52);
  animation: fxCrtShake 0.2s infinite;
}

@keyframes fxCrtFlicker {
  0%, 100% { opacity: 0.35; }
  40% { opacity: 0.5; }
  42% { opacity: 0.15; }
  44% { opacity: 0.55; }
  80% { opacity: 0.4; }
}

@keyframes fxCrtShake {
  0%, 100% { transform: scale(1.02) translate(0, 0); }
  50% { transform: scale(1.02) translate(0.3px, -0.2px); }
}

/* —— Neve / Chuva: partículas via canvas (effects.js) —— */
.fx-layer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
