/* Reset / Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;

  /* dunkler lila Nachthimmel mit Verlauf */
  background: radial-gradient(circle at top, #4c2a92 0, #1a0f2e 35%, #050010 100%);
  color: #f7eaff;
}

/* leichte „Sterne“ im Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 70% 10%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 40% 80%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0.7;
  z-index: -2;
}

/* Hauptkarte */
.page {
  width: 100%;
  max-width: 1000px;
  padding: 30px;
  border-radius: 26px;

  background: linear-gradient(
      135deg,
      rgba(140, 70, 210, 0.28),
      rgba(20, 5, 40, 0.85)
    );
  border: 1px solid rgba(220, 180, 255, 0.28);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(170, 120, 255, 0.35);
  position: relative;
  overflow: hidden;
}

/* weihnachtliches Foto leicht im Hintergrund */
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://images.pexels.com/photos/1693652/pexels-photo-1693652.jpeg");
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  filter: hue-rotate(240deg) saturate(1.3);
  z-index: -1;
}

/* Überschrift */
h1 {
  font-size: 2.7rem;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  background: linear-gradient(90deg, #f9e6ff, #f4b3ff, #c58aff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  text-shadow: 0 0 20px rgba(250, 210, 255, 0.6);
}

h1::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f4b3ff, #ffffff, #c58aff);
}

/* Intro-Text */
.intro {
  max-width: 650px;
  margin: 22px auto 26px;
  padding: 18px 22px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #fdf4ff;

  background: radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.14),
      transparent 55%
    ),
    rgba(35, 0, 70, 0.7);
  border-radius: 18px;
  border: 1px solid rgba(230, 190, 255, 0.35);
  box-shadow: 0 12px 30px rgba(20, 0, 40, 0.8);
  text-shadow: 0 0 10px rgba(60, 0, 120, 0.7);
}

/* Kalender-Gitter */
.calendar {
  display: grid;
  grid-template-columns: repeat(6, minmax(60px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

/* Türen */
.door {
  border: none;
  border-radius: 18px;
  padding: 18px 10px;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;

  background: linear-gradient(135deg, #6c3bc8, #b36bff);
  color: #ffffff;
  box-shadow:
    0 8px 18px rgba(10, 0, 30, 0.9),
    0 0 16px rgba(210, 150, 255, 0.65);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.18s ease,
    filter 0.18s ease;
}

.door::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.32),
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.15)
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.door:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.85),
    0 0 24px rgba(230, 190, 255, 0.9);
  background: linear-gradient(135deg, #b36bff, #e0a6ff);
  filter: brightness(1.08);
}

.door:hover::before {
  opacity: 0.3;
}

.door:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.9),
    0 0 16px rgba(200, 160, 255, 0.75);
}

/* Modal (gemeinsames Popup) */
.modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at top,
      rgba(40, 0, 70, 0.9),
      rgba(5, 0, 20, 0.96)
    );
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1000;
  backdrop-filter: blur(6px);
}

/* versteckt */
.hidden {
  display: none;
}

.modal-content {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;

  background: linear-gradient(
      145deg,
      rgba(80, 20, 140, 0.93),
      rgba(25, 0, 60, 0.98)
    );
  border-radius: 24px;
  padding: 20px 22px 24px;

  border: 1px solid rgba(250, 220, 255, 0.7);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.95),
    0 0 40px rgba(230, 190, 255, 0.9);

  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fdf3ff;

  animation: popupIn 0.25s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.modal-title {
  font-size: 1.7rem;
  font-weight: 600;
  color: #ffe9ff;
  text-shadow:
    0 0 12px rgba(255, 210, 255, 0.9),
    0 0 26px rgba(240, 180, 255, 0.9);
  letter-spacing: 0.03em;
}

/* X-Button */
.close-button {
  border: none;
  background: radial-gradient(circle at top, rgba(255, 240, 255, 0.4), transparent);
  font-size: 1.9rem;
  cursor: pointer;
  color: #ffe0ff;
  line-height: 1;
  border-radius: 999px;
  padding: 2px 10px 6px;

  box-shadow:
    0 0 14px rgba(255, 180, 255, 0.8),
    0 0 26px rgba(255, 255, 255, 0.4);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.close-button:hover {
  transform: scale(1.08);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.9), transparent);
  box-shadow:
    0 0 20px rgba(255, 210, 255, 1),
    0 0 32px rgba(255, 255, 255, 0.95);
}

.modal-text {
  margin-bottom: 8px;
  color: #fbe8ff;
  line-height: 1.6;
  font-size: 1rem;
}

/* Video-/Bild-Container */
.video-wrapper {
  margin-top: 4px;
  border-radius: 18px;
  background: radial-gradient(circle at top, #3a0b63, #12001e);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.9),
    0 0 28px rgba(240, 200, 255, 0.7);
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

/* Video / YouTube */
.video-wrapper iframe,
.video-wrapper video {
  width: 100%;
  max-width: 100%;
  max-height: 360px;
  border: none;
  border-radius: 14px;
  display: block;
}

/* Bild bei "zu früh geklickt" */
.video-wrapper img {
  width: auto;
  max-width: 100%;
  max-height: 360px;
  display: block;
  border-radius: 14px;
}

/* etwas andere Typo, wenn Bildmodus */
.modal-content.image-mode .modal-text {
  text-align: left;
  font-size: 1.02rem;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile */
@media (max-width: 700px) {
  h1 {
    font-size: 2.1rem;
  }

  .calendar {
    grid-template-columns: repeat(4, minmax(60px, 1fr));
    gap: 10px;
  }

  .door {
    padding: 14px 8px;
    font-size: 1.15rem;
  }

  .intro {
    font-size: 0.98rem;
    padding: 14px 16px;
  }

  .modal-content {
    padding: 16px 16px 20px;
  }
}
