/*
 * screensaver.css — Screensaver / idle scene styles
 * Responsibility: bouncing fluid bubble, idle hint text, brand watermark
 */

/* ── Brand watermark ── */
#idle-brand {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.12);
  font-size: clamp(11px, 1.8vw, 16px);
  font-weight: 600;
  letter-spacing: 0.40em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

/* ── Bouncing fluid bubble ── */
#junair-bubble {
  position: absolute;
  width: clamp(130px, 22vw, 210px);
  height: clamp(130px, 22vw, 210px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;

  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  background: radial-gradient(circle at 35% 35%,
      rgba(255, 255, 255, 0.50) 0%,
      rgba(255, 255, 255, 0.12) 40%,
      rgba(0, 229, 255, 0.28) 80%,
      rgba(0, 229, 255, 0.65) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset -8px -8px 16px rgba(255, 255, 255, 0.35),
    inset 8px 8px 20px rgba(0, 229, 255, 0.55),
    0 0 30px var(--glow-color, #00E5FF),
    0 0 55px rgba(0, 229, 255, 0.25);

  animation: morphBlob 8s ease-in-out infinite alternate;
  transition: box-shadow 0.5s ease, transform 0.15s ease;
  cursor: pointer;
}

#junair-bubble:active {
  transform: scale(0.93);
}

/* Logo image inside bubble */
#junair-bubble img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

/* Fallback emoji when image fails */
#junair-bubble .bubble-fallback {
  font-size: clamp(50px, 10vw, 80px);
  line-height: 1;
  pointer-events: none;
}

/* ── Pulsing glow ring ── */
#junair-bubble::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  border: 1px solid var(--glow-color, #00E5FF);
  opacity: 0;
  animation: pulseRing 2.5s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.95);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.30);
    opacity: 0;
  }
}

/* ── Blob morph keyframes (shared with orbit bubbles via import) ── */
@keyframes morphBlob {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }

  50% {
    border-radius: 50% 50% 30% 60% / 30% 70% 70% 40%;
  }

  75% {
    border-radius: 70% 30% 50% 50% / 60% 40% 60% 40%;
  }

  100% {
    border-radius: 40% 60% 60% 40% / 40% 60% 30% 70%;
  }
}

/* ── Idle hint text ── */
#idle-hint {
  position: absolute;
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(13px, 2vw, 18px);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  animation: pulseHint 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes pulseHint {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.8;
  }
}

/* Smooth spring transition to center stage */
#junair-bubble.active-center {
  top: 50% !important;
  left: 50% !important;
  width: clamp(200px, 36vw, 280px) !important;
  height: clamp(200px, 36vw, 280px) !important;
  transform: translate(-50%, -50%) scale(1) !important;
  transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 55px rgba(0, 229, 255, 0.65), inset 0 0 25px rgba(255, 255, 255, 0.4);
  z-index: 5;
}