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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Lora', serif;
  background: linear-gradient(135deg, #fbf6ea, #ecdcb8, #d9c49b);
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.screen {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vh, 2rem);
  padding: 1rem;
  text-align: center;
}

.hidden { display: none !important; }

.title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: #4a3f33;
}

.gif-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
}

.side-photo {
  width: clamp(60px, 14vw, 110px);
  height: auto;
  flex-shrink: 0;
}

.side-photo-left {
  animation: shake-left 2.6s ease-in-out infinite;
}

.side-photo-right {
  animation: shake-right 2.1s ease-in-out infinite;
}

@keyframes shake-left {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}

@keyframes shake-right {
  0%, 100% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
}

.gif {
  max-width: min(250px, 60vw);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.buttons {
  display: flex;
  gap: 1.5rem;
}

.btn {
  font-family: 'Lora', serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 600;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.4s ease;
}

.btn-yes {
  background: #ff4d8d;
  color: #fff;
  transform-origin: center;
}

.btn-no {
  background: #fdfaf3;
  color: #4a3f33;
  border: 1px solid rgba(74, 63, 51, 0.25);
  box-shadow: 0 2px 10px rgba(74, 63, 51, 0.12);
}

.btn-no.fade-out {
  opacity: 0;
}

.btn-yes-final {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border-radius: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  z-index: 10;
}

.subtitle {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: #4a3f33;
}

.timeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(74, 63, 51, 0.12);
  box-shadow: 0 4px 20px rgba(74, 63, 51, 0.08);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  max-width: 90vw;
}

.timeline-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  padding: 0 0.5rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 1.25rem;
  right: -50%;
  width: 100%;
  height: 2px;
  background: rgba(74, 63, 51, 0.25);
  z-index: -1;
}

.timeline-icon {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.timeline-item p {
  font-family: 'Lora', serif;
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: #4a3f33;
  font-weight: 600;
}

.final-message {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: #4a3f33;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.final-message.visible {
  opacity: 1;
}

.corner-photo {
  position: absolute;
  width: clamp(90px, 20vw, 170px);
  height: auto;
}

.corner-photo-top-left {
  top: clamp(1rem, 4vh, 2rem);
  left: clamp(1rem, 4vw, 2rem);
  animation: shake-left 2.6s ease-in-out infinite;
}

.corner-photo-bottom-right {
  bottom: clamp(1rem, 4vh, 2rem);
  right: clamp(1rem, 4vw, 2rem);
  animation: shake-right 2.1s ease-in-out infinite;
}

@media (max-width: 600px) {
  .timeline {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    max-width: 80vw;
  }

  .timeline-item {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1rem;
    transform: translateX(-16px);
  }

  .timeline-item.visible {
    transform: translateX(0);
  }

  .timeline-item:not(:last-child)::after {
    top: 100%;
    left: 1.25rem;
    right: auto;
    width: 2px;
    height: 1.2rem;
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 20;
}

.overlay.visible {
  opacity: 1;
}

.overlay p {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 6vw, 3.5rem);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
