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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  background: #1a0a1e;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.hidden {
  display: none !important;
}

/* ============ START SCREEN ============ */
#start-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #2d1133 0%, #1a0a1e 70%);
  z-index: 100;
  cursor: pointer;
}

.start-content {
  text-align: center;
  padding: 2rem 2.5rem;
  animation: fadeInUp 1s ease-out;
}

.heart-icon {
  font-size: 4rem;
  animation: heartbeat 1.4s ease-in-out infinite;
}

#start-screen h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 2.6rem;
  line-height: 1.3;
  margin: 1.2rem 0 0.8rem;
  color: #f8c8dc;
}

#start-screen p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  animation: pulse-subtle 2s ease-in-out infinite;
}

/* ============ PROGRESS ============ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 20;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f8c8dc, #d4a574);
  transition: width 0.5s ease;
}

.progress-dots {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.3s, transform 0.3s;
}

.progress-dot.active {
  background: #f8c8dc;
  transform: scale(1.3);
}

/* ============ SLIDES ============ */
#slides-container {
  position: fixed;
  inset: 0;
  cursor: pointer;
}

.slide {
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.45s ease, opacity 0.45s ease;
  pointer-events: none;
  background: #1a0a1e;
}

.slide.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.slide.left {
  transform: translateX(-100%);
  opacity: 0;
}

.slide-bg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #1a0a1e;
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.5rem 3.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
}

.slide-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.6;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(15px);
  animation: textFadeIn 0.8s 0.3s ease-out forwards;
}

.slide:not(.active) .slide-text {
  animation: none;
  opacity: 0;
}

/* ============ GIFT SECTION ============ */
#gift-section {
  position: fixed;
  inset: 0;
  background: #1a0a1e;
}

.gift-state {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gift-state.active {
  display: flex;
}

.gift-state video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
  background: #1a0a1e;
}

.gift-btn {
  position: relative;
  z-index: 10;
  margin-top: auto;
  margin-bottom: 15%;
  padding: 1rem 2rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a0a1e;
  background: linear-gradient(135deg, #f8c8dc, #d4a574);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(248, 200, 220, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gift-btn:active {
  transform: scale(0.95);
}

.gift-btn.pulse {
  animation: btnPulse 2s ease-in-out infinite;
}

.gift-btn.fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* ============ PIX STATUS ============ */
.pix-status {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: auto;
  margin-bottom: 5%;
}

.pix-status p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

.loading-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f8c8dc;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ============ ANIMATIONS ============ */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes textFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes btnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(248, 200, 220, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 6px 30px rgba(248, 200, 220, 0.6); }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ============ FINAL VIDEO STATE ============ */
#gift-state-4 {
  background: #000;
}

#gift-state-4 video {
  object-fit: contain;
}
