:root {
  --bg-deep: #0b1026;
  --bg-deep-2: #1a1a40;
  --accent: #ffb6d9;
  --accent-2: #c8b6ff;
  --accent-soft: #fff0f6;
  --text: #f4f2ff;
  --text-muted: #cfcbe8;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.18);
  --nav-height: 78px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: radial-gradient(ellipse at top, var(--bg-deep-2), var(--bg-deep) 70%);
  color: var(--text);
  font-family: "Segoe UI", "Poppins", system-ui, sans-serif;
  overflow: hidden;
}

/* ---------- Sternenhimmel ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 2.4s ease;
}

.sky.fade-out {
  opacity: 0;
}

.star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  animation: twinkle ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.shooting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.85);
}

.shooting-star::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: var(--trail, 110px);
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9));
  border-radius: 2px;
}

/* ---------- Sonnenaufgang ---------- */

.sunrise-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.6s ease;
  background: linear-gradient(180deg, #16213e 0%, #4a2f6e 20%, #a34a72 45%, #ff8f6b 68%, #ffd27a 85%, #fff3c4 100%);
}

.sunrise-sky.active {
  opacity: 1;
}

.sun {
  position: absolute;
  left: 50%;
  bottom: 10%;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9e0 0%, #ffe08a 35%, #ffb347 70%, rgba(255, 179, 71, 0) 100%);
  transform: translate(-50%, 60px);
  opacity: 0;
  transition: opacity 2.4s ease, transform 3.6s cubic-bezier(0.22, 0.7, 0.32, 1);
}

.sunrise-sky.active .sun {
  opacity: 1;
  transform: translate(-50%, -30px);
}

.bird {
  position: absolute;
  top: 24%;
  left: 0;
  opacity: 0;
}

.bird svg path {
  fill: none;
  stroke: #2b2145;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.sunrise-sky.active .bird-1 {
  top: 22%;
  animation: fly-across 10s linear 1.1s infinite;
}

.sunrise-sky.active .bird-2 {
  top: 33%;
  animation: fly-across 12.5s linear 2.6s infinite;
}

.sunrise-sky.active .bird-2 svg {
  width: 24px;
  height: 12px;
}

.sunrise-sky.active .bird svg {
  animation: flap 0.5s ease-in-out infinite;
}

@keyframes fly-across {
  0% { transform: translate(-10vw, 0); opacity: 0; }
  8% { opacity: 1; }
  50% { transform: translate(55vw, -22px); }
  92% { opacity: 1; }
  100% { transform: translate(120vw, 8px); opacity: 0; }
}

@keyframes flap {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.6); }
}

/* ---------- Slideshow ---------- */

.slideshow {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 22px calc(var(--nav-height) + 24px);
  text-align: center;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1;
}

.slide-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  /* Zentriert vertikal, solange Platz ist; wenn der Inhalt (z.B. der Kalender)
     nicht mehr in den Bildschirm passt, fallen die Auto-Ränder auf 0 zurück
     und die Slide scrollt sauber von oben statt oben abgeschnitten zu werden. */
  margin: auto 0;
}

.badge {
  font-size: 40px;
  animation: float 3.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.slide h1 {
  margin: 8px 0 4px;
  font-size: 2rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.slide-heading {
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.intro-text {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1.05rem;
  max-width: 420px;
}

.spruch-text {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  padding: 14px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  max-width: 420px;
}

/* ---------- Slide-Navigation ---------- */

.slide-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 20px;
  background: linear-gradient(0deg, rgba(11, 16, 38, 0.85), rgba(11, 16, 38, 0));
  backdrop-filter: blur(6px);
}

.nav-arrow {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}

.nav-arrow:hover:not(:disabled) {
  background: var(--accent-2);
  color: #1a1a40;
  transform: scale(1.08);
}

.nav-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.slide-dots {
  display: flex;
  gap: 10px;
}

.slide-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.slide-dots .dot.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: scale(1.3);
}

/* ---------- Kalender-Karte ---------- */

.calendar-card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.calendar-intro {
  text-align: center;
  font-weight: 600;
  margin: 0 0 18px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.calendar-header h3 {
  margin: 0;
  font-size: 1.1rem;
  text-transform: capitalize;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.nav-btn:hover:not(:disabled) {
  background: var(--accent-2);
  transform: scale(1.08);
}

.nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
}

.day-cell.empty {
  visibility: hidden;
}

.day-cell.available {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.day-cell.available:hover {
  background: var(--accent-2);
  color: #1a1a40;
  transform: scale(1.08);
}

.day-cell.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1a40;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.day-cell.disabled {
  opacity: 0.25;
  cursor: default;
}

.section-label {
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.time-select {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
}

.time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.time-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.15s ease, background 0.15s ease;
}

.time-chip:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.15);
}

.time-chip.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1a40;
  font-weight: 700;
  border-color: transparent;
}

.calendar-body {
  margin-top: 4px;
}

.confirm-btn {
  display: block;
  margin: 16px auto 0;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1a40;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 24px rgba(200, 182, 255, 0.35);
}

.confirm-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.confirm-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* ---------- Möglichkeiten ---------- */

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  width: 100%;
}

.activity-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 18px 14px;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.activity-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.12);
}

.activity-emoji {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.activity-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* ---------- Bestätigung ---------- */

.confirmation {
  text-align: center;
  padding: 32px 20px;
  animation: pop-in 0.5s ease;
}

.confirmation-emoji {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

@keyframes pop-in {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.error-msg {
  text-align: center;
  color: #ffb6b6;
}

/* ---------- Konfetti / Herzen ---------- */

.particle {
  position: fixed;
  top: -30px;
  font-size: 1.4rem;
  z-index: 5;
  pointer-events: none;
  animation: fall linear forwards;
}

@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0.9; }
}

@media (max-width: 420px) {
  .slide h1 { font-size: 1.6rem; }
  .day-cell { font-size: 0.8rem; }
}
