:root {
  --size: 180px;
  --cycle: 15s;
}

/* CONTENEDOR CENTRAL */
.fractal-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  perspective: 800px;
}

/* ESFERA FRACTAL */
.fractal-simbolo {
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  background: conic-gradient(
    from 0deg,
    #6b4b27,
    #d2a860,
    #5b3d20,
    #e1b96e,
    #6b4b27
  );
  box-shadow:
    0 0 35px rgba(255, 220, 180, 0.35),
    inset 0 0 25px rgba(110, 70, 20, 0.3);
  animation:
    spin 24s linear infinite,
    pulso-unificado 6s ease-in-out infinite;
  filter: brightness(1.05) contrast(1.08) saturate(1.15);
  transform-style: preserve-3d;
  background-color: transparent;
}

/* ILUMINACIÓN CENTRAL: sol interno con latido y microprofundidad */
.fractal-simbolo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 250, 220, 0.14) 0%,
    rgba(255, 230, 160, 0.08) 35%,
    rgba(255, 210, 100, 0.04) 60%,
    transparent 80%
  );
  filter: blur(6px) brightness(1.05);
  mix-blend-mode: screen;
  animation:
    pulso-unificado 6s ease-in-out infinite,
    sol-orbitante 18s ease-in-out infinite,
    microzoom 18s ease-in-out infinite;
  pointer-events: none;
  transform-origin: center center;
}

/* SÍMBOLOS ORBITALES */
.fractal-simbolo span {
  position: absolute;
  font-family: "Cinzel", serif;
  font-size: 3.8rem;
  color: #fff9e2;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.7);
  transform-origin: center center;
  text-shadow:
    0 0 6px rgba(255, 235, 180, 0.9),
    0 0 22px rgba(200, 140, 60, 0.7),
    0 0 6px rgba(70, 35, 10, 0.9); /* sombra interna ámbar oscuro */
  animation: ciclo-luz var(--cycle) linear infinite;
  filter: brightness(1);
}

/* POSICIONES ORBITALES */
.fractal-simbolo span:nth-child(1) { top: 12%; left: 50%; animation-delay: 0s; }
.fractal-simbolo span:nth-child(2) { top: 50%; left: 88%; animation-delay: 3s; }
.fractal-simbolo span:nth-child(3) { top: 88%; left: 50%; animation-delay: 6s; }
.fractal-simbolo span:nth-child(4) { top: 50%; left: 12%; animation-delay: 9s; }
.fractal-simbolo span:nth-child(5) { top: 50%; left: 50%; animation-delay: 12s; }

/* --- ANIMACIONES --- */

/* Rotación continua */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Pulso general sincronizado (borde + símbolos + brillo) */
@keyframes pulso-unificado {
  0%, 100% {
    box-shadow:
      0 0 30px rgba(255, 230, 200, 0.25),
      inset 0 0 25px rgba(110, 70, 20, 0.3);
    filter: brightness(1.0);
  }
  50% {
    box-shadow:
      0 0 60px rgba(255, 245, 210, 0.55),
      inset 0 0 35px rgba(140, 90, 40, 0.45);
    filter: brightness(1.25);
  }
}

/* Oscilación solar autónoma (latido lento e independiente) */
@keyframes sol-orbitante {
  0%   { background: radial-gradient(circle at 50% 50%, rgba(255,250,220,0.14), rgba(255,230,160,0.08) 35%, rgba(255,210,100,0.04) 60%, transparent 80%); }
  25%  { background: radial-gradient(circle at 53% 47%, rgba(255,250,220,0.15), rgba(255,230,160,0.09) 35%, rgba(255,210,100,0.05) 60%, transparent 80%); }
  50%  { background: radial-gradient(circle at 47% 53%, rgba(255,250,220,0.13), rgba(255,230,160,0.08) 35%, rgba(255,210,100,0.04) 60%, transparent 80%); }
  75%  { background: radial-gradient(circle at 51% 49%, rgba(255,250,220,0.14), rgba(255,230,160,0.08) 35%, rgba(255,210,100,0.04) 60%, transparent 80%); }
  100% { background: radial-gradient(circle at 50% 50%, rgba(255,250,220,0.14), rgba(255,230,160,0.08) 35%, rgba(255,210,100,0.04) 60%, transparent 80%); }
}

/* Microzoom: leve profundidad rítmica del sol interno */
@keyframes microzoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Ciclo de aparición de símbolos */
@keyframes ciclo-luz {
  0% {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.7);
    filter: brightness(0.8);
  }
  10% {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1.2);
    filter: brightness(1.35);
  }
  22% {
    transform: translate(-50%, -50%) scale(1.05);
    filter: brightness(1.15);
  }
  30% {
    opacity: 0;
    visibility: visible;
    transform: translate(-50%, -50%) scale(0.9);
    filter: brightness(1);
  }
  31%, 100% {
    opacity: 0;
    visibility: hidden;
  }
}
/* Microzoom con modulación de saturación y brillo */
@keyframes microzoom {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1) saturate(1);
  }
  50% {
    transform: scale(1.03);
    filter: brightness(1.15) saturate(1.25);
  }
}
