@font-face {
  font-family: "PokemonSolid";
  src: url("fonts/Pokemon Solid.woff");
}

@font-face {
  font-family: "PokemonStroke";
  src: url("fonts/Pokemon Hollow.woff");
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

#scaler {
  position: absolute;
  width: 1920px;
  height: 1080px;
}

#stage {
  position: relative;
  height: 100%;
  width: 100%;
}

.silhouette {
  filter: brightness(0) saturate(100%) invert(17%) sepia(95%) saturate(7125%) hue-rotate(192deg) brightness(95%) contrast(94%) drop-shadow(-5px 2px 0 #00375c) drop-shadow(-12px 8px rgba(0, 0, 51, .25));
}

#correctMessage {
  position: absolute;
  left: 1200px;
  top: 500px;
  width: 1000px;
  height: 375px;
  font-size: 90px;
  color: #00ff88;
  transition: opacity 0.3s ease;
  opacity: 0;
  z-index: 10;
}

#correctMessage.visible {
  opacity: 1;
}

.pokemon-font {
  font-family: "PokemonSolid";
  font-size: 90px;
  color: #ffca02;
}

.pokemon-font-stroke{
  font-family: "PokemonStroke";
  font-size: 90px;
  color: #3c65ac;
}

.pokemon-font-stroke-shadow{
  font-family: "PokemonSolid";
  font-size: 90px;
  color: #ffca02;
  -webkit-text-stroke: 8px #3c65ac;
}

.char {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.char.overlap {
  position: relative;
  z-index: 2;
}

.pokemon-wrapper {
  position: absolute;
  left: 1300px;
  bottom: 70px;
  width: 1000px;
  height: 300px;
  -webkit-text-stroke: 3px #3c65ac;
  transform: scale(1.2);
  z-index: 10;
}

.pokemon-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none; /* wichtig, damit nur der originale Text interaktiv ist */
    filter:
    drop-shadow(-3px 3px 0 #28497f)
    drop-shadow(-2px 3px 0 #28497f)
    drop-shadow(-1px 2px 0 #28497f);
}

.pokemon-font-stroke-shadow .char {
  z-index: 3;
}
.pokemon-font-stroke .char {
  z-index: 2;
}
.pokemon-font .char {
  z-index: 1;
}

/* „Vordrängeln“ für überlappende Buchstaben */
.char.overlap {
  z-index: 5 !important;
}

.badge-unlock {
  animation: pop-in 0.5s ease-out, fade-out 1s ease-in 4s forwards;
}

@keyframes pop-in {
  0% { transform: scale(0.8) translateX(-50%); opacity: 0; }
  100% { transform: scale(1) translateX(-50%); opacity: 1; }
}

@keyframes fade-out {
  to { opacity: 0; transform: scale(0.95) translateX(-50%); }
}

.intro-overlay {
  position: absolute;
  width: 100%;
  z-index: 9999;
  pointer-events: none;
}

#pokemon {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scaleX(-1);
  opacity: 0;
  z-index: 1;
}

.bild-wrapper {
  position: absolute;
  top: 400px;
  left:400px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 700px;
  height: 700px;
  z-index: 1;
}

/** INTRO TEXT **/
#introContainer {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#introContainer.hidden {
  display: none;
}

#introText {
  font-size: 7rem;
  font-weight: bold;
  color: #FFD700;
  text-align: center;
}

/** BADGE ANIMATION **/
.badge-animation {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 9999;
}

.badge-wrapper {
  position: relative;
  display: inline-block;
}

.badge-img {
  width: 200px;
  transform-style: preserve-3d;
  transform-origin: center;
  filter: brightness(0) saturate(100%) invert(100%) 
          drop-shadow(0 0 50px #fff) drop-shadow(0 0 10px #fff);
}

.animate-badge {
  animation: badgeFlip 2s ease-out forwards;
}

@keyframes badgeFlip {
  0%   { transform: scale(0.1) rotateY(0deg); filter: brightness(0) saturate(100%) invert(100%) drop-shadow(0 0 50px #fff) drop-shadow(0 0 10px #fff)}
  50%  { transform: scale(1.5) rotateY(2520deg); filter: brightness(0) saturate(100%) invert(100%) drop-shadow(0 0 50px #fff) drop-shadow(0 0 10px #fff)} /* 7x Flip */
  75%  {filter: brightness(600%) drop-shadow(0 0 50px #fff) drop-shadow(0 0 10px #fff)}
  100% { transform: scale(1) rotateY(3240deg); filter: none; } /* 9x Flip + Glow aus */
}

/* Video der Sterne */
.badge-stars {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Text-Einblendung */
.badge-text {
  margin-top: 20px;
  font-size: 1.5rem;
  color: #FFD700;
  font-weight: bold;
  opacity: 0;
  transform: translateY(20px);
  animation: textFade 1s ease forwards;
  animation-delay: 2.5s;
}

@keyframes textFade {
  to { opacity: 1; transform: translateY(0); }
}
