/* ══════════════════════════════════════════
   ABENDSPAZIERGANG AM MEER — STYLESHEET
   eCARDINO-VORLAGE (Muschel & Perlen-Edition)
   Responsive: Desktop + Handy 1:1
   Basisgröße: 1080×1920 px (skaliert via Viewport)
══════════════════════════════════════════ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 20px 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family, Arial, sans-serif);
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Hintergrund: eine bildfüllende Ebene, durchgehend ohne Bruch */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("bg.jpg");    /* Hintergrundbild — Abendstimmung am Meer */
  background-repeat: no-repeat;
  background-color: #221405;          /* Fallback: warmes Dunkelbraun, falls bg.jpg fehlt */
  background-size: cover;
  background-position: var(--bg-fokus, center);  /* per config (hintergrundFokus) gesteuert */
  filter: brightness(0.9);
  z-index: -1;
}

/* ── APP WRAPPER ── */
#app {
  width: 90%;
  max-width: 420px;
  background: var(--color-background, rgba(40, 26, 10, 0.72));
  border-radius: 20px;
  border: 1px solid rgba(232,179,74,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 16px 30px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* ── MUSIK (an/aus-Knopf) ── */
#music-btn {
  position: absolute;
  top: 12px;
  left: 14px;
  background: none;
  border: none;
  color: #eccb86;
  cursor: pointer;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(232,179,74,0.6));
  transition: transform 0.2s, filter 0.2s, color 0.3s;
  z-index: 5;
}
#music-btn svg,
#moon-deko svg {
  width: 22px;
  height: 22px;
  display: block;
}
#music-btn:hover {
  transform: scale(1.15);
}
#music-btn.spielt {
  color: var(--color-lantern, #ffd9a0);
  filter: drop-shadow(0 0 12px rgba(255,217,160,0.9));
  animation: music-pulse 1.6s ease-in-out infinite;
}
@keyframes music-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}

/* ── MOND (Dekoration) ── */
#moon-deko {
  position: absolute;
  top: 12px;
  right: 14px;
  color: #fdf2da;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(253,242,218,0.7));
  z-index: 5;
}

/* ── PERLEN-REIHE (klickbare Navigation) ── */
#navi-row {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin: 14px 0 7px;
}
#navi-label {
  font-size: 9px;
  color: #ffffff;
  letter-spacing: 2.5px;
  text-align: center;
  margin: 14px 0 22px;
}
.navi-perle {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #6b5633, #3a2c16 70%);
  border: 1px solid rgba(232,179,74,0.35);
  transition: transform 0.3s ease, box-shadow 0.5s ease, background 0.5s ease, border-color 0.5s ease;
}
.navi-perle:hover {
  transform: scale(1.25);
}
/* Perle erglüht */
.navi-perle.an {
  background: radial-gradient(circle at 35% 28%, #ffffff, #f4e9d6 45%, #d9c2a0 80%, #b3946a);
  border-color: rgba(255,236,200,0.9);
  box-shadow: 0 0 10px rgba(255,228,180,0.85), 0 0 22px rgba(255,228,180,0.4);
  animation: perlen-schimmer 3s ease-in-out infinite;
}
@keyframes perlen-schimmer {
  0%, 100% { box-shadow: 0 0 10px rgba(255,228,180,0.85), 0 0 22px rgba(255,228,180,0.4); }
  50%      { box-shadow: 0 0 6px  rgba(255,228,180,0.55), 0 0 13px rgba(255,228,180,0.22); }
}

/* ── BÜHNE ── */
#stage {
  width: 100%;
  position: relative;
  background: rgba(6, 12, 26, 0.35);
  border: 1.5px solid #54401f;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.7);
}

/* Konfetti-Canvas */
#konfetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  display: none;
}

/* ── STATION (Inhalt) ── */
#station {
  position: relative;
  width: 100%;
  min-height: 560px;   /* alle Stationen gleich hoch — bemessen am RSVP-Formular */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 5;
}
#station.visible {
  opacity: 1;
  transform: translateY(0);
}

.station-emoji {
  font-size: var(--font-size-emoji, 44px);
  margin-bottom: 14px;
  filter: drop-shadow(0 0 8px rgba(232,179,74,0.4));
}
.station-title {
  font-size: var(--font-size-title, 18px);
  color: var(--color-main, #e8b34a);
  font-weight: bold;
  margin-bottom: 12px;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(232,179,74,0.4);
}
.station-text {
  font-size: var(--font-size-text, 15px);
  color: var(--color-text, #e3d2ae);
  line-height: 1.8;
  width: 100%;
  max-width: 100%;
  padding: 0 5px;
}
.station-highlight {
  color: var(--color-light, #fdf2da);
  font-size: var(--font-size-highlight, 16px);
  margin: 10px 0;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(253,242,218,0.3);
}

/* big — großer heller Kursiv-Text in Highlight/Text */
.station-text .big,
.station-highlight .big {
  display: inline-block;
  font-size: 1.15em;
  color: var(--color-light, #fdf2da);
  font-style: italic;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(253,242,218,0.3);
}

/* ── POLAROID (Foto der Gastgeber) ── */
.polaroid {
  background: #fdfdfb;
  padding: 10px 10px 14px;
  border-radius: 3px;
  max-width: 235px;
  margin: 8px auto 4px;
  transform: rotate(-2.5deg);
  box-shadow: 0 6px 18px rgba(0,0,0,0.55), 0 0 14px rgba(232,179,74,0.25);
}
.polaroid img {
  display: block;
  width: 100%;
  border-radius: 2px;
}
.polaroid-caption {
  font-family: 'Segoe Script', 'Bradley Hand', cursive;
  color: #2b3a55;
  font-size: 13px;
  margin-top: 9px;
  line-height: 1.4;
}

/* ── COPYRIGHT ── */
#copyright {
  margin-top: 16px;
  font-size: 10px;
  color: #ffffff;
  letter-spacing: 1px;
  text-align: center;
}

/* ══════════════════════════════════════════
   MUSCHEL-DECKBLATT — Start-Erlebnis
══════════════════════════════════════════ */
#start-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 14, 4, 0.7);
  transition: opacity 0.8s ease 1.4s;
}
#start-overlay.an {
  opacity: 0;
  pointer-events: none;
}
/* Deckblatt: solange die Muschel zu ist, bleibt die Karte unsichtbar */
#app {
  transition: opacity 1.0s ease 0.8s;
}
#app.verdeckt {
  opacity: 0;
}
#start-szene {
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Große Perle als Deckblatt — von Anfang an sichtbar, lädt zum Antippen ein */
#start-perle {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff, #f6ecd9 42%, #ddc6a4 78%, #b3946a);
  box-shadow: 0 0 30px rgba(255,232,190,0.85), 0 0 70px rgba(255,232,190,0.4), inset 0 4px 8px rgba(255,255,255,0.6);
  animation: perlen-schimmer 3s ease-in-out infinite;
  transition: transform 1.0s ease, opacity 0.9s ease;
}

/* Beim Antippen: Perle leuchtet kurz auf und verblasst sanft */
#start-overlay.an #start-perle {
  transform: scale(1.35);
  opacity: 0;
  box-shadow: 0 0 60px rgba(255,232,190,1), 0 0 120px rgba(255,232,190,0.7);
}

/* Texte unter der Muschel */
#start-text {
  margin-top: 14px;
  font-size: 18px;
  font-weight: bold;
  color: var(--color-light, #fdf2da);
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(253,242,218,0.4);
}
#start-hinweis {
  margin-top: 10px;
  font-size: 9px;
  color: #ffffff;
  letter-spacing: 2.5px;
  animation: start-puls 2s ease-in-out infinite;
}
@keyframes start-puls {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* ══════════════════════════════════════════
   RSVP-FORMULAR
══════════════════════════════════════════ */
.rsvp-form {
  width: 100%;
  max-width: 100%;
  text-align: left;
  margin-top: 8px;
  padding: 0 4px;
}
.rsvp-intro {
  font-size: 13px;
  color: var(--color-text, #e3d2ae);
  text-align: center;
  margin-bottom: 10px;
}
.rsvp-label {
  display: block;
  font-size: 11px;
  color: var(--color-main, #e8b34a);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 8px 0 4px;
}
.rsvp-input {
  width: 100%;
  padding: 7px 10px;
  background: rgba(40,26,10,0.6);
  border: 1px solid rgba(232,179,74,0.4);
  border-radius: 6px;
  color: var(--color-light, #fdf2da);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.rsvp-input:focus {
  border-color: var(--color-main, #e8b34a);
  box-shadow: 0 0 8px rgba(232,179,74,0.3);
}
.rsvp-textarea {
  resize: none;
  min-height: 50px;
  font-family: inherit;
}
.rsvp-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.rsvp-radio {
  flex: 1;
  min-width: 0;
  position: relative;
  cursor: pointer;
}
.rsvp-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rsvp-radio span {
  display: block;
  text-align: center;
  padding: 8px 10px;
  background: rgba(40,26,10,0.6);
  border: 1px solid rgba(232,179,74,0.4);
  border-radius: 6px;
  color: var(--color-light, #fdf2da);
  font-size: 13px;
  transition: all 0.2s;
}
.rsvp-radio:hover span {
  border-color: var(--color-main, #e8b34a);
  background: rgba(232,179,74,0.1);
}
.rsvp-radio input:checked + span {
  background: linear-gradient(180deg, #fdf2da, #e8b34a);
  color: #2e2009;
  border-color: #fdf2da;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(232,179,74,0.5);
}
.rsvp-submit {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #fdf2da, #e8b34a, #b9852f);
  border: none;
  border-radius: 8px;
  color: #2e2009;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 0 12px rgba(232,179,74,0.5);
  transition: transform 0.1s, box-shadow 0.2s;
}
.rsvp-submit:hover {
  box-shadow: 0 0 18px rgba(232,179,74,0.8);
}
.rsvp-submit:active {
  transform: scale(0.98);
}
/* Zweiter Sende-Knopf (Modus "beides"): ruhige Umriss-Variante */
.rsvp-submit-zweit {
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(232,179,74,0.6);
  color: #f0e0bd;
  box-shadow: none;
}
.rsvp-submit-zweit:hover {
  border-color: var(--color-main, #e8b34a);
  background: rgba(232,179,74,0.1);
  box-shadow: none;
}

/* ══════════════════════════════════════════
   RESPONSIVE — Desktop + Handy 1:1
   Basisgröße: 1080×1920 px
══════════════════════════════════════════ */
@media (max-width: 400px) {
  #app             { width: 84%; padding: 14px 10px 16px; }
  #moon-deko       { top: 10px; right: 10px; }
  #music-btn       { top: 10px; left: 10px; }
  #music-btn svg, #moon-deko svg { width: 19px; height: 19px; }

  /* Start-Laterne mobil */
  #start-perle     { width: 96px; height: 96px; }
  #start-text      { font-size: 15px; margin-top: 20px; }
  #start-hinweis   { font-size: 8px; }
  #navi-row        { gap: 14px; margin-bottom: 6px; }
  #navi-label      { font-size: 8px; margin: 9px 0 13px; }
  .navi-perle      { width: 11px; height: 11px; }
  #station         { min-height: 400px; padding: 16px 12px; }
  .station-emoji   { font-size: 34px; margin-bottom: 10px; }
  .station-title   { font-size: 15px; margin-bottom: 8px; letter-spacing: 0.5px; }
  .station-text    { font-size: 14px; max-width: 100%; line-height: 1.75; }
  .station-highlight{ font-size: 14px; }
  .polaroid        { max-width: 205px; }
  #copyright       { font-size: 9px; margin-top: 10px; }

  /* RSVP-Formular mobil */
  .rsvp-intro      { font-size: 12px; margin-bottom: 8px; }
  .rsvp-label      { font-size: 10px; margin: 6px 0 3px; }
  .rsvp-input      { font-size: 12px; padding: 6px 8px; }
  .rsvp-textarea   { min-height: 44px; }
  .rsvp-radio span { font-size: 12px; padding: 7px 6px; }
  .rsvp-group      { gap: 6px; }
  .rsvp-submit     { font-size: 13px; padding: 9px; margin-top: 10px; }
}

@media (max-width: 360px) {
  .station-title   { font-size: 14px; }
  .station-text    { font-size: 13px; }
  .station-highlight{ font-size: 13px; }
  #station         { min-height: 380px; }
  .polaroid        { max-width: 185px; }

  /* RSVP-Formular ganz schmal */
  .rsvp-radio span { font-size: 11px; padding: 6px 4px; }
  .rsvp-input      { font-size: 12px; }
}
