/* BASIS ---------------------------------------------------------------- */

:root {
  --gold: #f5d37a;
  --gold-soft: #f0c964;
  --door-glow: rgba(245, 211, 122, 0.35);
  --text-light: #f6f7ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-light);
  background-color: #020313;
}

body.modal-open {
  overflow: hidden;
}

/* FIXES HINTERGRUNDBILD */
.bg-image {
  position: fixed;
  inset: 0;
  background-image: url("background.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  z-index: 0;
  pointer-events: none;
}

/* SEITENINHALT */
.page {
  position: relative;
  z-index: 1;
  min-height: 150vh;
  display: flex;
  justify-content: center;
  padding: 34vh 12px 40vh;
}

.overlay-inner {
  width: 100%;
  max-width: 780px;
}

@media (max-width: 640px) {
  .page {
    padding: 30vh 10px 44vh;
  }
}

/* HEADER */
.hero-header {
  text-align: center;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.85);
  margin-bottom: 1.6rem;
}

.hero-title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: clamp(1.8rem, 2.8vw + 1.1rem, 2.6rem);
  color: var(--gold);
}

.hero-subtitle {
  margin: 0.55rem 0 0;
  font-family: "Cinzel", serif;
  font-weight: 500;
  letter-spacing: 0.32em;
  font-size: clamp(0.9rem, 1vw + 0.7rem, 1.1rem);
  color: var(--gold-soft);
}

/* COUNTDOWN */
.countdown {
  margin-top: 0.6rem;
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  opacity: 0.9;
}

/* KALENDER */
.calendar-wrap {
  margin-top: 0.8rem;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 640px) {
  .calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

/* TÜREN */
.door {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 18px;
  border: 2px solid var(--gold);
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.7),
    0 10px 18px rgba(0,0,0,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  overflow: hidden;
  animation: doorFloat 5s ease-in-out infinite alternate;
}

.door:nth-child(2n) { animation-duration: 6s; }
.door:nth-child(3n) { animation-duration: 7s; }
.door:nth-child(5n) { animation-duration: 5.5s; }

@keyframes doorFloat {
  from { transform: translateY(0px); }
  to   { transform: translateY(-4px); }
}

.door-inner {
  width: 86%;
  height: 86%;
  border-radius: 14px;
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 15%, rgba(0,0,0,0.42), rgba(0,0,0,0.1), transparent);
  transform-origin: left center;
  backface-visibility: hidden;
  transition: transform 0.7s cubic-bezier(0.18, 0.7, 0.25, 1.18);
}

.door:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.9),
    0 16px 30px rgba(0,0,0,0.95),
    0 0 26px var(--door-glow);
}

.door.opened .door-inner {
  transform: perspective(900px) rotateY(-95deg);
}

/* LOCKED TÜREN */
.door-locked {
  opacity: 0.35;
  cursor: not-allowed;
  animation: none;
}

.door-locked .door-inner::after {
  content: "🔒";
  position: absolute;
  font-size: 1.4rem;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(0,0,0,0.88), rgba(0,0,0,0.96));
  padding: 10vh 16px 16px;
  z-index: 999;
}

.modal-card {
  width: min(100% - 16px, 720px);
  max-height: 90vh;
  background: linear-gradient(180deg, #050918, #02030b 60%, #000);
  border: 1px solid rgba(245,211,122,0.4);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* MODAL HEADER */
.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 20px 10px;
  border-bottom: 1px solid rgba(245, 211, 122, 0.3);
}

.prompt-number {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--gold);
  letter-spacing: 0.25em;
}

.prompt-title {
  font-family: "Cinzel", serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--gold);
  text-align: right;
}

/* TEXT */
.prompt-text-wrapper {
  padding: 16px 20px 6px;
  overflow-y: auto;
  flex: 1;
}

/* ZEILENUMBRÜCHE WIE IM ADMIN-TOOL */
.prompt-text-wrapper p {
  background: rgba(0,0,0,0.3);
  padding: 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
}

/* BUTTON */
.close-btn {
  display: block;
  margin: 10px auto 16px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(245,211,122,0.75);
  background: radial-gradient(circle at top, #1a1425, #050918 60%, #02030b);
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
}

/* WEIHNACHTSGRUSS */
.greeting {
  margin-top: 48px;
  text-align: center;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw + 1rem, 3.4rem);
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(0,0,0,0.85);
  width: 100%;
}

/* IMPRESSUM */
.impressum {
  margin-top: 28px;
  padding-bottom: 40px;
  text-align: center;
  color: var(--gold);
  font-family: "Cinzel", serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.impressum-text {
  font-family: Inter, sans-serif;
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.45;
}

.impressum-hint {
  font-family: Inter, sans-serif;
  font-size: 0.75rem;
  opacity: 0.8;
  max-width: 300px;
  line-height: 1.4;
}

/* UTILITY */
.hidden {
  display: none;
}