/* Valentine's Experience Styles */

/* Base Variables */
:root {
  --valentine-primary: #B8869B;
  --valentine-accent: #C4A747;
  --valentine-bg: #F8F4E6;
  --valentine-text: #3E3E3E;
  --valentine-card-bg: #FFFFFF;
  --valentine-shadow: rgba(0, 0, 0, 0.08);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--valentine-bg);
  color: var(--valentine-text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.valentine-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px;
}

/* Hero Section */
.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, var(--valentine-primary) 0%, var(--valentine-accent) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.gift-icon {
  font-size: 80px;
  animation: float 3s ease-in-out infinite;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.landing-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.from-text {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.sender-name,
.recipient-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* Streak Counter */
.streak-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.streak-flame {
  font-size: 24px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.streak-count {
  font-size: 22px;
  font-weight: 700;
}

.streak-label {
  font-size: 14px;
  opacity: 0.9;
}

/* Section Title */
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  color: var(--valentine-text);
}

/* Unlock Types Section */
.unlock-types-section {
  padding: 40px 24px;
}

.unlock-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.unlock-type-card {
  background: var(--valentine-card-bg);
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 20px var(--valentine-shadow);
  border: 2px solid transparent;
}

.unlock-type-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.unlock-type-card:active {
  transform: translateY(-2px);
}

.unlock-type-card.active {
  border-color: var(--valentine-primary);
  background: linear-gradient(135deg, rgba(184, 134, 155, 0.1) 0%, rgba(196, 167, 71, 0.1) 100%);
}

.unlock-emoji {
  font-size: 42px;
  margin-bottom: 12px;
  display: block;
}

.unlock-type-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--valentine-text);
  margin-bottom: 4px;
}

.unlock-type-card p {
  font-size: 12px;
  color: #888;
}

/* Experience Container */
.experience-container {
  padding: 0 24px 40px;
}

/* Coming Soon State */
.coming-soon {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.coming-soon-icon {
  font-size: 72px;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

.coming-soon h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--valentine-primary);
}

.coming-soon p {
  font-size: 16px;
  color: #666;
  max-width: 320px;
  line-height: 1.6;
}

/* Preview Banner */
.preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #FF6B6B, #FF8E8E);
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

/* Share Buttons */
.share-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 16px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  gap: 12px;
  justify-content: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-btn.whatsapp {
  background: #25D366;
  color: white;
}

.share-btn.whatsapp:hover {
  background: #20BD5A;
}

.share-btn.copy {
  background: #f0f0f0;
  color: #333;
}

.share-btn.copy:hover {
  background: #e0e0e0;
}

.share-btn:active {
  transform: scale(0.96);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--valentine-primary), var(--valentine-accent));
  border-radius: 3px;
  transition: width var(--transition-smooth);
}

/* Card Base */
.card {
  background: var(--valentine-card-bg);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px var(--valentine-shadow);
}

/* Button Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--valentine-primary), var(--valentine-accent));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 134, 155, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--valentine-primary);
  border: 2px solid var(--valentine-primary);
}

.btn-secondary:hover {
  background: rgba(184, 134, 155, 0.1);
}

/* Theme: Midnight Magic (Dark) */
.theme-midnight-magic {
  --valentine-bg: #1A2847;
  --valentine-text: #FFFFFF;
  --valentine-card-bg: #252B3D;
  --valentine-shadow: rgba(0, 0, 0, 0.2);
}

.theme-midnight-magic .unlock-type-card h3 {
  color: white;
}

.theme-midnight-magic .unlock-type-card p {
  color: #aaa;
}

.theme-midnight-magic .share-buttons {
  background: #252B3D;
}

.theme-midnight-magic .share-btn.copy {
  background: #3a3f51;
  color: white;
}

/* Theme: Golden Hour */
.theme-golden-hour {
  --valentine-primary: #C4A747;
  --valentine-accent: #B8869B;
  --valentine-bg: #FFFBEB;
}

/* Theme: Candy Pop */
.theme-candy-pop {
  --valentine-primary: #FF69B4;
  --valentine-accent: #00CED1;
  --valentine-bg: #FFF0F5;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.slide-up {
  animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Confetti Animation */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1000;
}

/* Responsive */
@media (max-width: 360px) {
  .landing-hero h1 {
    font-size: 28px;
  }

  .unlock-type-grid {
    gap: 12px;
  }

  .unlock-type-card {
    padding: 20px 12px;
  }

  .unlock-emoji {
    font-size: 36px;
  }
}

@media (min-width: 768px) {
  .valentine-container {
    max-width: 540px;
  }

  .unlock-type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== HERO ENTRANCE ANIMATION ========== */
.landing-hero.entrance-animate {
  opacity: 0;
  filter: blur(10px);
  transform: scale(1.02);
  animation: heroEntrance 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes heroEntrance {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

/* Gift icon bounce */
.gift-icon.bounce-in {
  animation: giftBounce 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s forwards;
  opacity: 0;
  transform: scale(0);
}

@keyframes giftBounce {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-10deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.2) rotate(5deg);
  }
  80% {
    transform: scale(0.9) rotate(-3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* Staggered text entrance */
.hero-text-stagger {
  opacity: 0;
  transform: translateY(20px);
}

.hero-text-stagger.animate-1 {
  animation: staggerIn 0.6s ease forwards 0.5s;
}

.hero-text-stagger.animate-2 {
  animation: staggerIn 0.6s ease forwards 0.7s;
}

.hero-text-stagger.animate-3 {
  animation: staggerIn 0.6s ease forwards 0.9s;
}

.hero-text-stagger.animate-4 {
  animation: staggerIn 0.6s ease forwards 1.1s;
}

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

/* Sparkle effects around gift */
.sparkle-container {
  position: absolute;
  width: 200px;
  height: 200px;
  pointer-events: none;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: sparkle 2s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 20%; right: 15%; animation-delay: 0.4s; }
.sparkle:nth-child(3) { top: 50%; left: 5%; animation-delay: 0.8s; }
.sparkle:nth-child(4) { bottom: 20%; right: 10%; animation-delay: 1.2s; }
.sparkle:nth-child(5) { bottom: 10%; left: 30%; animation-delay: 1.6s; }

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== PREMIUM HEART CONFETTI ========== */
.heart-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 1001;
  animation: heartFall linear forwards;
}

.heart-confetti::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--heart-color, #ff6b8a);
  clip-path: path('M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z');
  transform: scale(0.5);
}

@keyframes heartFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Sparkle confetti variant */
.sparkle-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 1001;
  width: 12px;
  height: 12px;
  animation: sparkleFall linear forwards;
}

.sparkle-confetti::before,
.sparkle-confetti::after {
  content: '';
  position: absolute;
  background: var(--sparkle-color, #ffd700);
}

.sparkle-confetti::before {
  width: 100%;
  height: 4px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  border-radius: 2px;
}

.sparkle-confetti::after {
  width: 4px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  border-radius: 2px;
}

@keyframes sparkleFall {
  0% {
    transform: translateY(-20px) rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    opacity: 1;
    transform: translateY(50vh) rotate(360deg) scale(0.8);
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* ========== RIPPLE EFFECT ========== */
.ripple-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s ease-out forwards;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  .landing-hero.entrance-animate,
  .gift-icon.bounce-in,
  .hero-text-stagger,
  .sparkle,
  .heart-confetti,
  .sparkle-confetti {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
