/* Reusable styles for the animated “speaking sun” visualizer */
.speaking-sun {
  --speak: 0;
  position: relative;
  width: clamp(180px, 24vw, 280px);
  aspect-ratio: 1;
  margin: 2.5rem auto 1rem;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 24px rgba(0, 191, 255, .35));
}
.speaking-sun .sun-core {
  position: relative;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,205,255,.95), rgba(0,120,255,.55) 60%, rgba(0,205,255,.18) 100%);
  box-shadow:
    0 0 calc(18px + 40px * var(--speak)) rgba(0, 180, 255, .55),
    inset 0 0 calc(8px + 18px * var(--speak)) rgba(0, 255, 255, .7);
  animation: sun-rotate 16s linear infinite;
  z-index: 2;
}
.speaking-sun .sun-core::before,
.speaking-sun .sun-core::after {
  content: '';
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg,
      rgba(0,255,255,0) 0 55deg,
      rgba(56,205,255,.45) 70deg,
      rgba(0,255,255,0) 110deg,
      rgba(0,255,255,0) 180deg,
      rgba(56,205,255,.35) 205deg,
      rgba(0,255,255,0) 250deg,
      rgba(0,255,255,0) 360deg);
  mix-blend-mode: screen;
  filter: blur(2px);
  opacity: calc(.15 + .45 * var(--speak));
}
.speaking-sun .sun-core::before { animation: corona 9s linear infinite; }
.speaking-sun .sun-core::after  { animation: corona 6s linear infinite reverse; opacity: calc(.10 + .40 * var(--speak)); }

.speaking-sun .sun-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 195, 255, .22);
  transform: scale(calc(1 + var(--speak) * .22));
  opacity: calc(.35 + .40 * var(--speak));
  animation: sun-pulse 1.9s ease-out infinite;
  z-index: 1;
}
.speaking-sun .sun-ring.ring-thought {
  border-color: rgba(148, 163, 184, 0.32);
  transform: scale(1.12);
  opacity: 0;
  animation: none;
  transition: opacity 0.35s ease;
  z-index: 0;
}
.speaking-sun.thinking .sun-ring.ring-thought {
  opacity: 1;
  animation: sun-thought-spin 6.5s linear infinite;
}
.speaking-sun .sun-ring.ring2 { border-color: rgba(0, 225, 255, .18); animation-delay: .95s; }

.speaking-sun.is-speaking .sun-ring:not(.ring-thought) {
  animation-duration: 1.1s;
}
.speaking-sun.is-listening .sun-ring:not(.ring-thought) {
  border-color: rgba(34, 211, 238, 0.35);
  animation-duration: 1.6s;
}
.speaking-sun.is-idle .sun-ring:not(.ring-thought) {
  animation-duration: 2.4s;
  opacity: calc(.30 + .25 * var(--speak));
}

@keyframes sun-pulse {
  0%   { transform: scale(1); opacity: .28; }
  50%  { transform: scale(calc(1.10 + var(--speak) * .28)); opacity: calc(.35 + .35 * var(--speak)); }
  100% { transform: scale(1); opacity: .22; }
}
@keyframes sun-rotate { 0% { transform: rotate(0deg) } 100% { transform: rotate(360deg) } }
@keyframes corona { to { transform: rotate(360deg) } }
@keyframes sun-thought-spin {
  0% { transform: scale(1.12) rotate(0deg); }
  100% { transform: scale(1.12) rotate(360deg); }
}
