* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
    url("sanary.jpg") center center / cover no-repeat;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-heart {
  position: absolute;
  bottom: -30px;
  opacity: 0.22;
  animation: riseBg linear infinite;
  filter: blur(0.2px);
}

@keyframes riseBg {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  15% {
    opacity: 0.22;
  }
  100% {
    transform: translateY(-120vh) scale(1.25);
    opacity: 0;
  }
}

.box {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.24);
  padding: 24px;
  text-align: center;
  position: relative;
  z-index: 2;
  animation: fadeUp 0.7s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1, h2 {
  margin-top: 0;
  color: #1f1f1f;
}

p {
  color: #5a5a5a;
  line-height: 1.5;
  margin-bottom: 0;
}

input,
button {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 16px;
  margin-top: 12px;
  box-sizing: border-box;
}

input {
  border: 1px solid #e0d7dc;
  background: rgba(255,255,255,0.9);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: #cf6f94;
  box-shadow: 0 0 0 4px rgba(207,111,148,0.14);
}

button {
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
}

button:hover,
button:active {
  transform: translateY(-1px);
  opacity: 0.97;
}

.primary-btn {
  background: linear-gradient(135deg, #d85f90, #c94f83);
  color: white;
  box-shadow: 0 12px 24px rgba(201,79,131,0.22);
}

.secondary-btn {
  background: linear-gradient(135deg, #234465, #1a3350);
  color: white;
  box-shadow: 0 12px 24px rgba(26,51,80,0.2);
}

.buy-btn {
  background: linear-gradient(135deg, #d37c5d, #c96a4b);
  color: white;
  display: none;
  box-shadow: 0 12px 24px rgba(201,106,75,0.22);
}

.hidden {
  display: none !important;
}

.hint {
  margin-top: 14px;
  font-size: 15px;
  color: #8b6070;
  font-weight: 600;
}

.error {
  margin-top: 12px;
  color: #c94b67;
  font-weight: 700;
  min-height: 24px;
}

.success-text p {
  color: #000000 !important; /* Schwarzer Text */
  font-family: 'Helvetica Neue', Arial, sans-serif; /* Schöne, moderne Schriftart */
  font-weight: normal; /* Weniger dick */
  font-size: 18px; /* Angenehme Schriftgröße */
  line-height: 1.6; /* Bessere Lesbarkeit */
}

.continue-btn {
  margin-top: 22px;
}

.book-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
  margin-bottom: 18px;
  background: #eee;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.shop-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8e8ef;
  color: #b14f74;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.availability {
  margin-top: 16px;
  background: linear-gradient(135deg, #f8efe8, #f7e6dd);
  color: #7a4a37;
  border-radius: 18px;
  padding: 15px 16px;
  font-weight: 700;
  display: none;
  animation: softPop 0.35s ease;
}

.payment {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  color: #b04d70;
  display: none;
  animation: softPop 0.35s ease;
}

.final-message {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 800;
  color: #c23d68;
  line-height: 1.35;
  min-height: 64px;
}

@keyframes softPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.burst-heart {
  position: fixed;
  bottom: -30px;
  pointer-events: none;
  z-index: 5;
  animation: burstUp linear forwards;
  text-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

@keyframes burstUp {
  0% {
    transform: translateY(0) translateX(0) scale(0.9) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform:
      translateY(-120vh)
      translateX(var(--drift-x))
      scale(var(--scale))
      rotate(var(--rotate));
    opacity: 0;
  }
}

.heart-input-wrapper {
  position: relative;
  width: 180px;
  height: 160px;
  margin: 18px auto 6px;
}

.heart-shape {
  position: absolute;
  width: 100px;
  height: 100px;
  background: #f8dce6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%) rotate(-45deg);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(200, 80, 120, 0.25);
}

.heart-shape::before,
.heart-shape::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: #f8dce6;
  border-radius: 50%;
}

.heart-shape::before {
  top: -50px;
  left: 0;
}

.heart-shape::after {
  top: 0;
  left: 50px;
}

.heart-input-wrapper input {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 95px;
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #b84a72;
  outline: none;
  z-index: 2;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.heart-input-wrapper input::placeholder {
  color: rgba(180, 70, 110, 0.6);
  font-weight: 600;
  font-size: 14px;
}

.heart-input-wrapper:focus-within .heart-shape {
  transform: translate(-50%, -42%) rotate(-45deg) scale(1.05);
}

/* ❤️ Pulsieren */
@keyframes heartBeat {
  0%   { transform: translate(-50%, -42%) rotate(-45deg) scale(1); }
  25%  { transform: translate(-50%, -42%) rotate(-45deg) scale(1.15); }
  50%  { transform: translate(-50%, -42%) rotate(-45deg) scale(0.95); }
  75%  { transform: translate(-50%, -42%) rotate(-45deg) scale(1.2); }
  100% { transform: translate(-50%, -42%) rotate(-45deg) scale(1); }
}

/* ✨ Leuchten */
@keyframes heartGlow {
  0%   { box-shadow: 0 8px 25px rgba(200,80,120,0.25); }
  50%  { box-shadow: 0 0 40px rgba(255,100,160,0.6); }
  100% { box-shadow: 0 8px 25px rgba(200,80,120,0.25); }
}

/* Aktiv-Zustand */
.heart-shape {
  position: absolute;
  width: 100px;
  height: 100px;
  background: #f8dce6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%) rotate(-45deg);
  border-radius: 18px;
  box-shadow:
    0 8px 25px rgba(200, 80, 120, 0.25),
    inset -6px -6px 10px rgba(255, 255, 255, 0.35),
    inset 8px 8px 14px rgba(180, 70, 110, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  transform-style: preserve-3d;
}

.heart-shape::before,
.heart-shape::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: inherit;
  border-radius: 50%;
}

.heart-shape::before {
  top: -50px;
  left: 0;
}

.heart-shape::after {
  top: 0;
  left: 50px;
}

.heart-input-wrapper:focus-within .heart-shape {
  transform: translate(-50%, -42%) rotate(-45deg) scale(1.05);
}

.heart-active,
.heart-active::before,
.heart-active::after {
  background: linear-gradient(145deg, #ff7aa5, #d93b70) !important;
}

.heart-active {
  animation:
    heart3DBeat 1.25s ease-in-out forwards,
    heartFlash 0.9s ease-in-out 2;
  box-shadow:
    0 18px 40px rgba(201, 60, 112, 0.4),
    0 0 45px rgba(255, 90, 150, 0.45),
    inset -10px -10px 16px rgba(255,255,255,0.28),
    inset 12px 12px 18px rgba(120, 10, 50, 0.18);
}

@keyframes heart3DBeat {
  0% {
    transform: translate(-50%, -42%) rotate(-45deg) scale(1);
  }
  18% {
    transform: translate(-50%, -42%) rotate(-47deg) scale(1.18);
  }
  34% {
    transform: translate(-50%, -42%) rotate(-43deg) scale(1.04);
  }
  52% {
    transform: translate(-50%, -42%) rotate(-48deg) scale(1.34);
  }
  70% {
    transform: translate(-50%, -42%) rotate(-44deg) scale(1.22);
  }
  100% {
    transform: translate(-50%, -42%) rotate(-45deg) scale(2.35);
  }
}

@keyframes heartFlash {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
  100% {
    filter: brightness(1);
  }
}

.screen-shake {
  animation: subtleShake 0.55s ease-in-out;
}

@keyframes subtleShake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(1px, -1px); }
  40% { transform: translate(-1px, 1px); }
  60% { transform: translate(1px, 1px); }
  80% { transform: translate(-1px, 0); }
  100% { transform: translate(0, 0); }
}

/* 💓 realistischeres Pochen */
@keyframes heartBeatStrong {
  0%   { transform: translate(-50%, -42%) rotate(-45deg) scale(1); }
  20%  { transform: translate(-50%, -42%) rotate(-45deg) scale(1.2); }
  40%  { transform: translate(-50%, -42%) rotate(-45deg) scale(0.95); }
  60%  { transform: translate(-50%, -42%) rotate(-45deg) scale(1.25); }
  100% { transform: translate(-50%, -42%) rotate(-45deg) scale(1); }
}

/* ✨ stärkeres Leuchten */
@keyframes heartGlowStrong {
  0%   { box-shadow: 0 8px 25px rgba(200,80,120,0.3); }
  50%  { box-shadow: 0 0 60px rgba(255,80,140,0.9); }
  100% { box-shadow: 0 8px 25px rgba(200,80,120,0.3); }
}

/* ❤️ dunklere Farbe */
.heart-active,
.heart-active::before,
.heart-active::after {
  background: #e2557c !important;
}

/* 📱 ganz leichte Bildschirmbewegung */
.screen-shake {
  animation: subtleShake 0.5s ease-in-out;
}

@keyframes subtleShake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
  100% { transform: translate(0, 0); }
}

#musicBtn {
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.9;
}

.babe {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 1px;

  background: linear-gradient(45deg, #ff1744, #ff4f87, #ff1744);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: babeGlow 2.5s ease-in-out infinite,
             babePulse 0.53s ease-in-out infinite;

  text-shadow:
    0 0 10px rgba(255, 23, 68, 0.4),
    0 0 20px rgba(255, 23, 68, 0.3),
    0 0 40px rgba(255, 23, 68, 0.2);
}

@keyframes babeGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes babePulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.box {
  transition: all 0.6s ease;
  opacity: 1;
}

.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

body {
  animation: appFadeIn 1.2s ease forwards;
}

@keyframes appFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.02);
    filter: blur(6px);
  }
  60% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 1;
  }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 23, 68, 0.08), transparent 70%);
  animation: heartbeatBg 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes heartbeatBg {
  0%   { transform: scale(1); opacity: 0.6; }
  50%  { transform: scale(1.04); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0.6; }
}

.box {
  opacity: 0;
  transform: translateY(10px);
  animation: contentFadeIn 0.8s ease forwards;
  animation-delay: 0.6s;
}

@keyframes contentFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.burst-heart {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  left: 50vw;
  top: 50vh;
}

.big-heart {
  position: fixed;
  transform: translate(-50%, -50%) scale(0);
  font-size: 80px;
  animation: bigHeartReveal 1s ease-out forwards;
  z-index: 999;
}

.small-heart {
  position: fixed;
  font-size: 22px;
  opacity: 0;
  animation: smallHeartReveal 2.4s ease-out forwards;
  z-index: 998;
}

@keyframes smallHeartReveal {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
    opacity: 0;
  }
}

@keyframes bigHeartReveal {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes smallHeartReveal {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
    opacity: 0;
  }
}

#answerInput {
  text-align: center;
  font-size: 18px;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("lock.png") center center / cover no-repeat;
  transform: scale(1.04);
}

.login-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* dunkelt leicht ab */
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(90vw, 380px);
  padding: 28px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
  text-align: center;
}

.login-card h1 {
  margin: 0 0 10px;
  color: white;
  font-size: 30px;
}

.login-card p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.login-card input {
  width: 100%;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  outline: none;
  font-size: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
}

.login-card .primary-btn {
  width: 100%;
  margin-top: 6px;
}

#loginError {
  margin-top: 12px;
  min-height: 20px;
  color: #ffd2dc;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}

.login-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

#appContent {
  display: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}

#appContent.show {
  opacity: 1;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("lock.png") center center / cover no-repeat;
  transform: scale(1);
  transition: transform 1.4s ease, opacity 1.2s ease;
}

.login-screen.fade-out::before {
  transform: scale(1.06);
  opacity: 0.7;
}


html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

input,
textarea,
select,
button {
  font-size: 16px;
}

.box {
  margin: 0 auto;
}

html {
  background: #000;
}

body::after {
  content: "";
  display: block;
  height: env(safe-area-inset-bottom);
}

input,
textarea,
select,
button {
  font-size: 16px;
}
