/* ══════════════════════════════════════════
   ABENDSPAZIERGANG eCARD — STYLESHEET
   THEMA: GRIECHISCHE NACHT
   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;
}

/* Hintergrundbild */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: #0a1426;          /* Fallback: tiefes Nachtblau, falls bg.jpg fehlt */
  background-image: url("bg.jpg");    /* Hintergrundbild — Santorini bei Nacht */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

/* ── APP WRAPPER ── */
#app {
  width: 90%;
  max-width: 420px;
  background: var(--color-background, rgba(10, 20, 40, 0.72));
  border-radius: 20px;
  border: 1px solid rgba(77,163,221,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: #7fb6e2;
  cursor: pointer;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(77,163,221,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: #eaf4fc;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(234,244,252,0.7));
  z-index: 5;
}

/* ── LATERNENREIHE (klickbare Navigation) ──
   Jede Laterne besteht aus drei Teilen:
   Gehäuse = das Element selbst,
   Aufhänge-Ring = ::before, Deckel = ::after */
#lantern-row {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: center;
  margin: 11px 0 7px;
}
#lantern-label {
  font-size: 9px;
  color: #ffffff;
  letter-spacing: 2.5px;
  text-align: center;
  margin: 14px 0 22px;
}
.lantern {
  position: relative;
  width: 15px;
  height: 19px;
  border-radius: 3px 3px 5px 5px;
  background: linear-gradient(180deg, #15243c, #0d1930);
  border: 1px solid rgba(77,163,221,0.45);
  transition: all 0.5s ease;
  cursor: pointer;
}
/* Aufhänge-Ring */
.lantern::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border: 1.5px solid rgba(77,163,221,0.55);
  border-radius: 50%;
  transition: border-color 0.5s ease;
}
/* Deckel */
.lantern::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 4px;
  background: #2a3e5c;
  border-radius: 3px 3px 0 0;
  transition: background 0.5s ease;
}
.lantern:hover {
  transform: scale(1.15);
  border-color: rgba(255,217,160,0.8);
}
/* Brennende Laterne: warmes Licht im Gehäuse */
.lantern.lit {
  background: radial-gradient(circle at 50% 45%, #fff6e0 0%, var(--color-lantern, #ffd9a0) 45%, #d29a48 80%, #8a5f25 100%);
  border-color: rgba(255,217,160,0.95);
  box-shadow: 0 0 10px rgba(255,217,160,0.85), 0 0 24px rgba(255,217,160,0.4);
  animation: lantern-flicker 2.6s ease-in-out infinite;
}
.lantern.lit::before {
  border-color: rgba(255,217,160,0.9);
}
.lantern.lit::after {
  background: #b9853d;
}
@keyframes lantern-flicker {
  0%, 100% { box-shadow: 0 0 10px rgba(255,217,160,0.85), 0 0 24px rgba(255,217,160,0.4); }
  50%      { box-shadow: 0 0 7px  rgba(255,217,160,0.6),  0 0 16px rgba(255,217,160,0.25); }
}

/* ── BÜHNE ── */
#stage {
  width: 100%;
  position: relative;
  background: rgba(6, 12, 26, 0.35);
  border: 1.5px solid #2a3e5c;
  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(77,163,221,0.4));
}
.station-title {
  font-size: var(--font-size-title, 18px);
  color: var(--color-main, #4da3dd);
  font-weight: bold;
  margin-bottom: 12px;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(77,163,221,0.4);
}
.station-text {
  font-size: var(--font-size-text, 15px);
  color: var(--color-text, #a9c3da);
  line-height: 1.8;
  width: 100%;
  max-width: 100%;
  padding: 0 5px;
}
.station-highlight {
  color: var(--color-light, #eaf4fc);
  font-size: var(--font-size-highlight, 16px);
  margin: 10px 0;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(234,244,252,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, #eaf4fc);
  font-style: italic;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(234,244,252,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(77,163,221,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;
}

/* ══════════════════════════════════════════
   START-LATERNE — Start-Erlebnis
══════════════════════════════════════════ */
#start-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 12, 26, 0.7);
  transition: opacity 0.8s ease 1.2s;
}
/* Deckblatt: solange die Laterne aus ist, bleibt die Karte unsichtbar */
#app {
  transition: opacity 1.0s ease 0.6s;
}
#app.verdeckt {
  opacity: 0;
}
#start-overlay.an {
  opacity: 0;
  pointer-events: none;
}
#start-szene {
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#start-laterne {
  position: relative;
  width: 96px;
  margin: 0 auto;
}

/* Aufhänge-Ring */
#start-ring {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border: 4px solid #2e4663;
  border-radius: 50%;
  transition: border-color 0.9s ease;
}
/* Deckel */
#start-deckel {
  width: 58px;
  height: 14px;
  margin: -2px auto 0;
  background: #2a3e5c;
  border-radius: 8px 8px 2px 2px;
  transition: background 0.9s ease;
}
/* Glas-Gehäuse */
#start-glas {
  position: relative;
  width: 78px;
  height: 118px;
  margin: 0 auto;
  border: 3px solid #2e4663;
  border-radius: 8px 8px 14px 14px;
  background: linear-gradient(180deg, #14233c, #0c1830);
  overflow: hidden;
  transition: background 0.9s ease, border-color 0.9s ease, box-shadow 1.1s ease;
}
/* Flamme (anfangs aus) */
#start-flamme {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 18px;
  height: 26px;
  transform: translateX(-50%) scale(0.3);
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 70%, #fff6dd, #ffd9a0 55%, rgba(255,178,80,0.4));
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.9s ease;
}
/* Fuß */
#start-fuss {
  width: 46px;
  height: 8px;
  margin: 0 auto;
  background: #2a3e5c;
  border-radius: 2px 2px 6px 6px;
  transition: background 0.9s ease;
}

/* Angezündet */
#start-overlay.an #start-flamme {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: flamme-flackern 1.4s ease-in-out infinite;
}
#start-overlay.an #start-glas {
  background: radial-gradient(circle at 50% 62%, rgba(255,234,190,0.95), rgba(255,217,160,0.55) 45%, rgba(20,35,60,0.9) 85%);
  border-color: rgba(255,217,160,0.9);
  box-shadow: 0 0 30px rgba(255,217,160,0.8), 0 0 80px rgba(255,217,160,0.35);
}
#start-overlay.an #start-ring   { border-color: #b9853d; }
#start-overlay.an #start-deckel { background: #b9853d; }
#start-overlay.an #start-fuss   { background: #b9853d; }
@keyframes flamme-flackern {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%      { transform: translateX(-50%) scale(0.92) translateY(1px); }
}

/* Texte unter der Laterne */
#start-text {
  margin-top: 24px;
  font-size: 18px;
  font-weight: bold;
  color: var(--color-light, #eaf4fc);
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(234,244,252,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, #a9c3da);
  text-align: center;
  margin-bottom: 10px;
}
.rsvp-label {
  display: block;
  font-size: 11px;
  color: var(--color-main, #4da3dd);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 8px 0 4px;
}
.rsvp-input {
  width: 100%;
  padding: 7px 10px;
  background: rgba(10,20,40,0.6);
  border: 1px solid rgba(77,163,221,0.4);
  border-radius: 6px;
  color: var(--color-light, #eaf4fc);
  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, #4da3dd);
  box-shadow: 0 0 8px rgba(77,163,221,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(10,20,40,0.6);
  border: 1px solid rgba(77,163,221,0.4);
  border-radius: 6px;
  color: var(--color-light, #eaf4fc);
  font-size: 13px;
  transition: all 0.2s;
}
.rsvp-radio:hover span {
  border-color: var(--color-main, #4da3dd);
  background: rgba(77,163,221,0.1);
}
.rsvp-radio input:checked + span {
  background: linear-gradient(180deg, #eaf4fc, #4da3dd);
  color: #0c1a30;
  border-color: #eaf4fc;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(77,163,221,0.5);
}
.rsvp-submit {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #eaf4fc, #4da3dd, #2b6ea9);
  border: none;
  border-radius: 8px;
  color: #0c1a30;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 0 12px rgba(77,163,221,0.5);
  transition: transform 0.1s, box-shadow 0.2s;
}
.rsvp-submit:hover {
  box-shadow: 0 0 18px rgba(77,163,221,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(77,163,221,0.6);
  color: #cfe4f5;
  box-shadow: none;
}
.rsvp-submit-zweit:hover {
  border-color: var(--color-main, #4da3dd);
  background: rgba(77,163,221,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-glas      { width: 68px; height: 102px; }
  #start-deckel    { width: 52px; }
  #start-text      { font-size: 15px; margin-top: 20px; }
  #start-hinweis   { font-size: 8px; }
  #lantern-row     { gap: 15px; margin-bottom: 6px; }
  #lantern-label   { font-size: 8px; margin: 9px 0 13px; }
  .lantern         { width: 13px; height: 17px; }
  #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; }
}
