/* =========================================================
   COSMIC EXPANSION WIDGET
   VERSION 2.0
   style.css
   ========================================================= */


/* ---------------------------------------------------------
   SEITE / EINBETTUNG
   --------------------------------------------------------- */

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
 
background: transparent;

body {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}


/* ---------------------------------------------------------
   WIDGET
   --------------------------------------------------------- */

#dark-energy-animation {
  width: min(500px, 100vw);
  aspect-ratio: 1 / 1;
  background:
  radial-gradient(
    circle at center,

    rgba(32, 36, 43, 1.00) 0%,
    rgba(32, 36, 43, 1.00) 65%,

    rgba(32, 36, 43, 0.96) 72%,
    rgba(32, 36, 43, 0.78) 82%,
    rgba(32, 36, 43, 0.42) 91%,
    rgba(32, 36, 43, 0.12) 97%,
    rgba(32, 36, 43, 0.00) 100%
  );
}

#universe {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}


/* ---------------------------------------------------------
   MEHRSCHICHTIGES ZENTRUM
   --------------------------------------------------------- */

#center-outer-glow,
#center-inner-glow {
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}

#center-outer-glow {
  animation: outerGlowPulse 6s ease-in-out infinite;
}

#center-inner-glow {
  animation: innerGlowPulse 4.5s ease-in-out infinite;
}

#center-core {
  fill: #fffdf0;
  pointer-events: none;

  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 6px rgba(255, 232, 160, 0.90))
    drop-shadow(0 0 13px rgba(255, 205, 100, 0.55));

  animation: corePulse 3.8s ease-in-out infinite;
}


/* ---------------------------------------------------------
   GALAXIEN
   Die konkrete Farbe wird später durch script.js gesetzt.
   --------------------------------------------------------- */

.galaxy {
  pointer-events: none;

  filter:
    drop-shadow(0 0 1.5px rgba(220, 232, 255, 0.45))
    drop-shadow(0 0 4px rgba(190, 210, 255, 0.20));

  will-change: transform, opacity;
}


/* ---------------------------------------------------------
   LICHTSPUREN
   Werden durch script.js erzeugt und aktualisiert.
   --------------------------------------------------------- */

.galaxy-trail {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  pointer-events: none;

  filter:
    drop-shadow(0 0 2px rgba(205, 220, 255, 0.18));

  will-change: opacity;
}


/* ---------------------------------------------------------
   ANIMATIONEN DES ZENTRUMS
   --------------------------------------------------------- */

@keyframes outerGlowPulse {

  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.55;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.82;
  }

}


@keyframes innerGlowPulse {

  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.82;
  }

  50% {
    transform: scale(1.06);
    opacity: 1;
  }

}


@keyframes corePulse {

  0%,
  100% {
    opacity: 0.88;
  }

  50% {
    opacity: 1;
  }

}


/* ---------------------------------------------------------
   BARRIEREARMUT:
   Bei reduzierter Bewegung bleibt das Zentrum ruhig.
   Die spätere script.js berücksichtigt diese Einstellung
   zusätzlich für die Galaxienbewegung.
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  #center-outer-glow,
  #center-inner-glow,
  #center-core {
    animation: none;
  }

}


/* -----------------------------------------------------
   VOLLBILD-BUTTON
   ----------------------------------------------------- */

background:
  radial-gradient(
    circle at center,

    rgba(32, 36, 43, 1.00) 0%,
    rgba(32, 36, 43, 1.00) 65%,

    rgba(32, 36, 43, 0.96) 72%,
    rgba(32, 36, 43, 0.78) 82%,
    rgba(32, 36, 43, 0.42) 91%,
    rgba(32, 36, 43, 0.12) 97%,
    rgba(32, 36, 43, 0.00) 100%
  );
  
  
/* =====================================================
   iPHONE / iPAD PSEUDO-VOLLBILD
   ===================================================== */

.ios-fullscreen {

  position: fixed !important;

  top: 0;
  left: 0;

  width: 100vw !important;
  height: 100dvh !important;

  max-width: none !important;
  max-height: none !important;

  margin: 0 !important;

  z-index: 999999;

  background: #1d222b;

}


/* SVG füllt im Pseudo-Vollbild
   den verfügbaren Bildschirm aus. */

.ios-fullscreen #universe {

  width: 100% !important;
  height: 100% !important;

  display: block;

}


/* Verhindert Scrollen der Seite,
   solange Pseudo-Vollbild aktiv ist. */

body.ios-fullscreen-active {

  overflow: hidden !important;

  width: 100%;
  height: 100%;

}