/* =========================================================
   Intro: Nachthimmel, Glow, Ball, die acht Typ-Icons und
   Funkelsterne – nach dem Vorbild des alten Loading-Screens
   (app-intro.css), nur dass am Ende die Konto-Wahl erscheint
   statt auszublenden.
   ========================================================= */

.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(77, 213, 204, 0.2), transparent 32%),
    radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(145deg, #071724 0%, #0d2b3d 48%, #06131f 100%);
  transition: opacity 0.5s ease;
}
.intro[hidden] {
  display: none;
}
.intro--weg {
  opacity: 0;
  pointer-events: none;
}

.intro__stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.6rem;
  padding: 1.5rem;
}

/* Der weiche Lichtkegel hinter dem Ball. */
.intro__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(190px, 42vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.26),
    rgba(255, 255, 255, 0.08) 38%,
    transparent 68%
  );
  filter: blur(18px);
  animation: introGlow 1.6s ease both;
}
@keyframes introGlow {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
}

/* ---------- Der Ball: fällt ein, schwebt dann ---------- */
.intro__ball {
  width: clamp(84px, 18vw, 128px);
  z-index: 2;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 26px rgba(121, 238, 226, 0.24));
  animation:
    introBall 1.1s cubic-bezier(0.18, 0.9, 0.2, 1) both,
    introSchweben 3.5s ease-in-out 1.1s infinite alternate;
}
@keyframes introBall {
  0% {
    opacity: 0;
    transform: scale(0.45) rotate(-18deg);
  }
  55% {
    opacity: 1;
    transform: scale(1.06) rotate(6deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}
@keyframes introSchweben {
  to {
    transform: translateY(-9px);
  }
}

/* ---------- Die acht Typ-Icons in Glas-Kreisen ---------- */
.intro__stern {
  position: absolute;
  z-index: 1;
  width: clamp(38px, 6vw, 62px);
  aspect-ratio: 1;
  padding: clamp(0.45rem, 1.1vw, 0.7rem);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 22px rgba(127, 236, 224, 0.34),
    0 14px 30px rgba(0, 0, 0, 0.22);
  animation:
    introStern 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    introSchweben 4.5s ease-in-out infinite alternate;
}
.intro__stern img {
  width: 100%;
  height: 100%;
}
@keyframes introStern {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.22);
  }
  60% {
    opacity: 0.95;
    transform: translateY(-2px) scale(1.08);
  }
  to {
    opacity: 0.92;
    transform: translateY(0) scale(1);
  }
}
/* Gestaffelt wie im Original: alle 0,3 s fliegt das nächste ein. */
.intro__stern--fire { top: 16%; left: 12%; animation-delay: 0.9s, 1.8s; }
.intro__stern--water { top: 13%; right: 16%; animation-delay: 1.2s, 2.1s; }
.intro__stern--electric { top: 36%; right: 7%; animation-delay: 1.5s, 2.4s; }
.intro__stern--grass { bottom: 18%; right: 14%; animation-delay: 1.8s, 2.7s; }
.intro__stern--psychic { bottom: 15%; left: 16%; animation-delay: 2.1s, 3s; }
.intro__stern--dragon { top: 38%; left: 6%; animation-delay: 2.4s, 3.3s; }
.intro__stern--ghost { top: 7%; left: 44%; animation-delay: 2.7s, 3.6s; }
.intro__stern--fairy { bottom: 6%; right: 42%; animation-delay: 3s, 3.9s; }

/* ---------- Funkelsterne mit Kreuz-Glanz ---------- */
.intro__funkel {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.72),
    0 0 22px rgba(126, 239, 228, 0.44);
  opacity: 0;
  animation: introFunkel 2.2s ease-in-out infinite;
}
.intro__funkel::before,
.intro__funkel::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  transform: translate(-50%, -50%);
}
.intro__funkel::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
@keyframes introFunkel {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.42) rotate(0deg);
  }
  42% {
    opacity: 0.72;
    transform: scale(1) rotate(18deg);
  }
  62% {
    opacity: 0.42;
    transform: scale(0.82) rotate(32deg);
  }
}
.intro__funkel--1 { top: 18%; left: 42%; animation-delay: 0.2s; }
.intro__funkel--2 { top: 29%; right: 32%; animation-delay: 0.5s; }
.intro__funkel--3 { top: 55%; right: 23%; animation-delay: 0.9s; }
.intro__funkel--4 { bottom: 25%; left: 36%; animation-delay: 1.2s; }
.intro__funkel--5 { top: 37%; left: 24%; animation-delay: 1.5s; }
.intro__funkel--6 { bottom: 18%; right: 39%; animation-delay: 1.7s; }
.intro__funkel--7 { top: 11%; right: 44%; animation-delay: 2s; }
.intro__funkel--8 { bottom: 36%; left: 12%; animation-delay: 2.4s; }

/* ---------- Wortmarke mit Lichtstreif ---------- */
.intro__mark {
  position: relative;
  z-index: 2;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.96);
  text-shadow:
    0 13px 34px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(255, 255, 255, 0.34),
    0 0 34px rgba(255, 138, 67, 0.22);
  animation: introAuf 0.7s ease 1.7s both;
}
.intro__mark::after {
  content: "POKÉDX";
  position: absolute;
  inset: 0;
  color: transparent;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.95) 48%,
    rgba(255, 162, 85, 0.72) 54%,
    transparent 68%
  );
  background-size: 320% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: introShine 2.6s ease 2.4s both;
}
@keyframes introShine {
  from {
    opacity: 0;
    background-position: 175% 0;
  }
  30% {
    opacity: 0.82;
  }
  to {
    opacity: 0;
    background-position: -80% 0;
  }
}

.intro__sub {
  z-index: 2;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  max-width: 30rem;
  animation: introAuf 0.6s ease 2.1s both;
}

@keyframes introAuf {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- Die Konto-Wahl: kommt bewusst erst zum Schluss ---------- */
.intro__karte {
  z-index: 2;
  width: min(340px, 100%);
  margin-top: 1rem;
  border-radius: 22px;
  padding: 1.2rem;
  display: grid;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 24px 60px rgba(0, 0, 0, 0.4);
  animation: introAuf 0.7s ease 3.4s both;
}
.intro__wahl {
  display: grid;
  gap: 0.6rem;
}
.intro__wahl[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .intro *,
  .intro__mark::after {
    animation: none !important;
  }
}
