:root {
  --bg-cream: #FAF6EE;
  --bg-cream-warm: #F3EAD8;
  --pine-dark: #183A2A;
  --pine-deep: #10281D;
  --bordeaux: #8B2232;
  --bordeaux-hover: #701826;
  --red-accent: #B33242;
  --gold-warm: #E5B24C;
  --gold-soft: #F7DDA0;
  --text-main: #24332B;
  --text-muted: #58665E;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 249, 232, 0.95) 0%, rgba(250, 246, 238, 0.7) 48%, rgba(242, 232, 213, 0.85) 100%),
    var(--bg-cream);
  color: var(--text-main);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 20px);
  position: relative;
}

/* Schwebende goldene Lichtpunkte */
.golden-dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.dust-dot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF6D6 0%, var(--gold-warm) 55%, rgba(229, 178, 76, 0) 100%);
  opacity: 0;
  animation: twinkleFloat var(--dur, 7s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes twinkleFloat {
  0%, 100% {
    opacity: 0.12;
    transform: translateY(0) scale(0.85);
  }
  50% {
    opacity: 0.72;
    transform: translateY(-10px) scale(1.15);
  }
}

/* 1. Tannendekoration & Lichterkette oben */
.festive-header {
  width: 100%;
  position: relative;
  z-index: 2;
  line-height: 0;
  pointer-events: none;
  padding-top: env(safe-area-inset-top, 0px);
}

.garland-svg {
  width: 100%;
  height: clamp(86px, 14vw, 150px);
  display: block;
  filter: drop-shadow(0 6px 14px rgba(16, 40, 29, 0.12));
}

.bulb-halo {
  animation: bulbPulse var(--pulse-dur, 3.6s) ease-in-out var(--pulse-delay, 0s) infinite;
  transform-origin: center;
}

@keyframes bulbPulse {
  0%, 100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

/* Haupt-Container */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: auto;
  padding: 0.4rem 1.4rem 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 2. Großer Schriftzug: Euphoria Script */
.main-title {
  font-family: 'Euphoria Script', cursive;
  font-weight: 400;
  font-size: clamp(2.85rem, 9.2vw, 4.65rem);
  line-height: 1.08;
  color: var(--pine-dark);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(229, 178, 76, 0.22);
  margin-top: 0.15rem;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeDownIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

/* 3. Kleiner Begrüßungstext */
.subtitle {
  font-size: clamp(1.02rem, 3.6vw, 1.2rem);
  font-weight: 600;
  color: var(--bordeaux);
  letter-spacing: 0.02em;
  margin-top: 0.35rem;
  opacity: 0;
  transform: translateY(-6px);
  animation: fadeDownIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

@keyframes fadeDownIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 4. Bühne & Einflug-Animation für Schwibbel */
.schwibbel-stage {
  position: relative;
  width: min(74vw, 310px);
  margin: 1.15rem auto 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.schwibbel-glow {
  position: absolute;
  width: 88%;
  height: 88%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 221, 160, 0.55) 0%, rgba(250, 246, 238, 0) 72%);
  z-index: 0;
  pointer-events: none;
}

.schwibbel-fly-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  opacity: 0;
  transform: translate3d(-115vw, -36px, 0) rotate(-11deg) scale(0.92);
  will-change: transform, opacity;
}

.schwibbel-fly-wrapper.is-flying-in {
  animation: schwibbelFlyIn 1.45s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.schwibbel-fly-wrapper.is-landed {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  animation: schwibbelIdle 4.4s ease-in-out infinite;
}

@keyframes schwibbelFlyIn {
  0% {
    opacity: 0;
    transform: translate3d(-105vw, -42px, 0) rotate(-12deg) scale(0.9);
  }
  65% {
    opacity: 1;
    transform: translate3d(10px, -8px, 0) rotate(2.2deg) scale(1.01);
  }
  84% {
    opacity: 1;
    transform: translate3d(-4px, 2px, 0) rotate(-0.8deg) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

@keyframes schwibbelIdle {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -6px, 0) rotate(0.9deg);
  }
}

.schwibbel-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 10px 18px rgba(24, 58, 42, 0.14));
}

.schwibbel-shadow {
  width: 54%;
  height: 14px;
  margin-top: -6px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(24, 58, 42, 0.22) 0%, rgba(24, 58, 42, 0) 75%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.8s ease 0.9s, transform 0.8s ease 0.9s;
}

.schwibbel-shadow.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* 5. Adventskalender-Button & 6. Hinweis darunter */
.cta-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUpIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.95s forwards;
}

@keyframes fadeUpIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.advent-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bordeaux) 0%, #6F1826 100%);
  color: #FFFDF9;
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.05rem, 3.8vw, 1.16rem);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.015em;
  border: 1.5px solid rgba(247, 221, 160, 0.65);
  box-shadow:
    0 10px 24px rgba(139, 34, 50, 0.26),
    0 0 0 4px rgba(229, 178, 76, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.advent-button:hover,
.advent-button:focus-visible {
  background: linear-gradient(135deg, #9C2739 0%, var(--bordeaux-hover) 100%);
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(139, 34, 50, 0.34),
    0 0 0 5px rgba(229, 178, 76, 0.24);
  outline: none;
}

.advent-button:active {
  transform: translateY(1px) scale(0.985);
}

.advent-button .arrow {
  display: inline-block;
  transition: transform 0.22s ease;
  color: var(--gold-soft);
}

.advent-button:hover .arrow {
  transform: translateX(4px);
}

.hint-text {
  font-size: 0.94rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Optimierung für kleine iPhone-Bildschirme (z. B. iPhone SE / Mini) */
@media (max-height: 700px) {
  .garland-svg {
    height: 76px;
  }
  .schwibbel-stage {
    width: min(60vw, 235px);
    margin: 0.7rem auto 0.85rem;
  }
  .container {
    padding-bottom: 1.3rem;
  }
}

/* Barrierefreiheit: Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  .schwibbel-fly-wrapper,
  .main-title,
  .subtitle,
  .cta-area,
  .dust-dot,
  .bulb-halo {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .schwibbel-shadow {
    opacity: 1;
    transform: scale(1);
  }
}