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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Great Vibes', cursive;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.fonts-ready {
  opacity: 1;
}

.hidden {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── Start screen ── */
#start-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1a0a10;
  z-index: 100;
  transition: opacity 1s ease;
  cursor: pointer;
}

#start-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.cat-paw {
  width: 55vw;
  max-width: 280px;
  height: auto;
  margin-top: -12vh;
  margin-bottom: 3vh;
  filter: drop-shadow(0 0 20px rgba(255, 120, 160, 0.5));
  animation: paw-bounce 2s ease-in-out infinite;
}

@keyframes paw-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.04); }
}

#start-btn {
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 5vw;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  text-shadow: 0 0 20px rgba(212, 71, 122, 0.7);
  animation: text-pulse 2.5s ease-in-out infinite;
}

@keyframes text-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ── Main content ── */
#main {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease;
}

#bg-image.visible {
  opacity: 1;
}

/* ── Text overlay ── */
#text-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vw;
  z-index: 10;
  pointer-events: none;
}

#text-overlay .slide-text {
  position: absolute;
  font-size: 8.5vw;
  font-weight: bold;
  line-height: 1.35;
  color: #b5224a;
  text-align: center;
  text-shadow:
    0 0 15px rgba(255, 60, 120, 0.8),
    0 0 30px rgba(255, 60, 120, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 1.2s ease;
  max-width: 88vw;
}

#text-overlay .slide-text.visible {
  opacity: 1;
}

/* ── Floating flowers ── */
.floating-flower {
  position: fixed;
  bottom: -40px;
  z-index: 15;
  pointer-events: none;
  animation: float-up linear forwards;
}

@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

/* ── End image ── */
#end-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease;
}

#end-image.show {
  opacity: 1;
  pointer-events: auto;
}

#end-text-container {
  position: fixed;
  bottom: 6vh;
  left: 0;
  right: 0;
  z-index: 25;
  text-align: center;
  padding: 0 5vw;
  pointer-events: none;
}

#end-text {
  font-family: 'Great Vibes', cursive;
  font-size: 7.5vw;
  font-weight: bold;
  color: #ff2d6b;
  text-shadow:
    0 0 20px rgba(255, 40, 100, 0.9),
    0 0 40px rgba(255, 40, 100, 0.6),
    0 0 60px rgba(255, 40, 100, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.5);
  opacity: 0;
  -webkit-transition: opacity 2.5s ease;
  transition: opacity 2.5s ease;
}

#end-text.visible {
  opacity: 1;
}

.floating-heart {
  position: fixed;
  bottom: -40px;
  z-index: 25;
  pointer-events: none;
  animation: float-up linear forwards;
}

/* ── Responsive tweaks ── */
@media (min-width: 600px) {
  #start-btn {
    font-size: 32px;
  }
  #text-overlay .slide-text {
    font-size: 42px;
  }
  #end-text {
    font-size: 36px;
  }
  .cat-paw {
    max-width: 320px;
  }
}
