/* ---------- Hintergrund mit Fade-In + Galaxie ---------- */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;

  /* Hintergrundbild */
  background: url("Galaxy.jpg") no-repeat center center fixed;
  background-size: cover;

  /* Start: unsichtbar, damit kein grauer Flash passiert */
  opacity: 0;
  transition: opacity 0.8s ease-out;

  /* Leichte Hintergrundbewegung */
  animation: panGalaxy 60s ease-in-out infinite alternate;
}

/* Sobald Bild + Seite geladen → sichtbar */
body.loaded {
  opacity: 1;
}

/* Sanfte Parallax-Animation für den Hintergrund */
@keyframes panGalaxy {
  0% {
    background-position: 50% 40%;
  }
  50% {
    background-position: 48% 60%;
  }
  100% {
    background-position: 52% 50%;
  }
}

/* ---------- Sterne-Ebene ---------- */

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0; /* unter der Karte, über dem Hintergrund */
}

/* jede .star ist ein eigener Punkt, keine Kachelung */
.star {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.4;
  animation: twinkle 3.5s ease-in-out infinite alternate;
}

/* feste Positionen – NICHT im Raster */
.star:nth-child(1)  { top: 10%; left: 18%; animation-delay: 0s; }
.star:nth-child(2)  { top: 18%; left: 70%; animation-delay: 0.5s; }
.star:nth-child(3)  { top: 28%; left: 8%;  animation-delay: 0.8s; }
.star:nth-child(4)  { top: 35%; left: 55%; animation-delay: 1.2s; }
.star:nth-child(5)  { top: 15%; left: 88%; animation-delay: 1.5s; }
.star:nth-child(6)  { top: 55%; left: 25%; animation-delay: 1.9s; }
.star:nth-child(7)  { top: 60%; left: 65%; animation-delay: 2.2s; }
.star:nth-child(8)  { top: 70%; left: 82%; animation-delay: 2.6s; }
.star:nth-child(9)  { top: 78%; left: 15%; animation-delay: 2.9s; }
.star:nth-child(10) { top: 50%; left: 90%; animation-delay: 3.1s; }
.star:nth-child(11) { top: 25%; left: 40%; animation-delay: 3.4s; }
.star:nth-child(12) { top: 48%; left: 48%; animation-delay: 3.7s; }

@keyframes twinkle {
  0%   { opacity: 0.1; transform: scale(0.8); }
  50%  { opacity: 0.9; transform: scale(1.5); }
  100% { opacity: 0.4; transform: scale(1); }
}

/* ---------- Weiße Karte ---------- */

.app {
  background: #ffffff;
  padding: 40px 32px;
  border-radius: 20px;
  width: 90%;
  max-width: 700px;
  text-align: center;

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.55),
    0 0 70px rgba(255, 255, 255, 0.12);

  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  z-index: 1; /* Karte über den Sternen */
}

.app:hover {
  transform: translateY(-6px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 90px rgba(255, 255, 255, 0.16);
}

/* ---------- Titel & Herzanimation ---------- */

h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px;
  color: #222;
}

.heart {
  display: inline-block;
  margin-left: 4px;
  animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {
  0%   { transform: scale(1); }
  20%  { transform: scale(1.25); }
  40%  { transform: scale(1); }
  60%  { transform: scale(1.18); }
  80%  { transform: scale(1); }
  100% { transform: scale(1); }
}

/* ---------- Untertitel ---------- */

.subtitle {
  margin-top: 4px;
  margin-bottom: 24px;
  font-size: 16px;
  color: #555;
}

/* ---------- Button ---------- */

button {
  margin-top: 8px;
  background: linear-gradient(135deg, #ff9aaf, #ff6b82);
  border: none;
  color: #ffffff;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

button:active {
  transform: scale(0.97);
}

/* ---------- Karte / gezogener Text ---------- */

#cardText {
  margin-top: 28px;
  font-size: 20px;
  font-weight: 500;
  color: #333;
  background: #fff6f8;
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid #ffd6df;
  min-height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Pop-Effekt beim Ziehen */
.show-card {
  animation: pop 0.35s ease-out forwards;
}

@keyframes pop {
  0% { transform: scale(0.8); opacity: 0; }
  70% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

/* ---------- Countdown ---------- */

#countdownText {
  margin-top: 18px;
  font-size: 14px;
  color: #333;
}
