* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background: radial-gradient(circle at 50% 20%, #271443 0%, #150e1f 100%);
  color: #f5f3ff;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: env(safe-area-inset-top, 1rem) 1.25rem
    env(safe-area-inset-bottom, 1.25rem);
  overflow: hidden;
  position: relative;
}

/* Transparentes Hintergrund-Logo */
#bg-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 1000px;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

/* Oben fixierter Fortschrittsbereich */
.top-bar {
  width: 100%;
  max-width: 460px;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
  z-index: 1;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(168, 85, 247, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c084fc, #ec4899);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-label {
  font-size: 0.8rem;
  color: #d8b4fe;
  text-align: right;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Zentraler Inhaltsbereich */
.content-area {
  width: 100%;
  max-width: 460px;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  min-height: 0;
  z-index: 1;
}

/* Text-Schritte */
.text-box {
  font-size: 1.25rem;
  line-height: 1.6;
  text-align: center;
  color: #faf5ff;
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  animation: popIn 0.3s ease-out;
  white-space: pre-line; /* Unterstützt \n Zeilenumbrüche */
}

/* Medien-Schritte (Bild / Video) */
.media-wrapper {
  width: fit-content;
  height: 100%;
  max-height: 62dvh;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(13, 7, 20, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(168, 85, 247, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: popIn 0.3s ease-out;
}

.media-element {
  width: 100%;
  height: 100%;
  max-height: 62dvh;
  object-fit: contain;
  display: block;
}

/* Unten fixierte Button-Leiste */
.bottom-bar {
  width: 100%;
  max-width: 460px;
  padding-bottom: 2.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  z-index: 1;
}

/* Zurück-Button */
.prev-btn {
  flex: 1;
  padding: 0.7rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition:
    transform 0.1s ease,
    background-color 0.15s ease,
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.prev-btn:active {
  transform: scale(0.97);
  background: rgba(168, 85, 247, 0.25);
}

/* Verstecken beim ersten Schritt */
.prev-btn.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Weiter-Button */
.next-btn {
  flex: 2;
  padding: 0.6rem 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
  transition:
    transform 0.1s ease,
    box-shadow 0.15s ease,
    background 0.2s ease;
}

.next-btn:active {
  transform: scale(0.97);
  background: linear-gradient(135deg, #9333ea, #6d28d9);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
