/* Romantic Surprise Web App Styles - Designed for Mahir & Mehera */

:root {
  --bg-dark: #0b0314;
  --bg-gradient: linear-gradient(135deg, #090210 0%, #1a0522 35%, #350831 75%, #120117 100%);
  --primary-pink: #ff3366;
  --primary-rose: #ff6584;
  --accent-gold: #ffb703;
  --accent-cyan: #00f5d4;
  --light-pink: #ffe5ec;
  --text-white: #ffffff;
  --text-dim: #f8c8dc;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 51, 102, 0.15);
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-cursive: 'Dancing Script', 'Caveat', cursive;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-white);
  line-height: 1.6;
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Music Floating Toggle Button */
.music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 10px 18px;
  border-radius: 50px;
  color: var(--text-white);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 51, 102, 0.3);
  border-color: var(--primary-pink);
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

.music-btn.playing .music-icon {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Envelope Intro Overlay */
.envelope-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at center, #2e0828 0%, #0d0211 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.envelope-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  max-width: 360px;
  width: 100%;
}

.envelope {
  position: relative;
  width: 280px;
  height: 180px;
  background: #ff4d79;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(255,77,121,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.envelope:hover {
  transform: translateY(-5deg);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-top: 100px solid #e63963;
  transform-origin: top;
  transition: transform 0.6s ease;
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
}

.envelope-paper {
  background: #ffffff;
  color: #333;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  width: 88%;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transform: translateY(10px);
  transition: transform 0.5s ease 0.2s;
}

.envelope.open .envelope-paper {
  transform: translateY(-30px);
}

.envelope-paper h2 {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--primary-pink);
  margin-bottom: 4px;
}

.envelope-paper p {
  font-size: 0.85rem;
  color: #666;
}

.envelope-heart {
  font-size: 2rem;
  animation: pulse 1.5s infinite;
}

.btn-open {
  background: linear-gradient(45deg, var(--primary-pink), var(--primary-rose));
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 51, 102, 0.4);
  transition: all 0.3s ease;
}

.btn-open:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(255, 51, 102, 0.6);
}

/* Main Content Container */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  opacity: 1;
  transition: opacity 1s ease;
}

.main-content.hidden {
  display: none;
  opacity: 0;
}

/* Hero Section */
.hero-section {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 0 60px;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  padding: 8px 22px;
  border-radius: 30px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, var(--light-pink) 60%, var(--primary-rose) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  line-height: 1.15;
}

.heart-pulse {
  display: inline-block;
  animation: heartBeat 1.3s infinite ease-in-out;
  -webkit-text-fill-color: initial;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}

.hero-subtitle {
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  color: var(--text-dim);
  max-width: 680px;
  font-weight: 400;
  margin-bottom: 40px;
}

/* Countdown Card */
.glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(255, 51, 102, 0.15);
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.countdown-header {
  margin-bottom: 24px;
}

.sparkle-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 6px;
  animation: pulse 2s infinite;
}

.countdown-header h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.countdown-header p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.countdown-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 28px;
}

.timer-unit {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.2) 0%, rgba(255, 183, 3, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  padding: 14px 18px;
  min-width: 80px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.unit-val {
  display: block;
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.unit-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-gold);
  margin-top: 6px;
  font-weight: 700;
}

.timer-colon {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-rose);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.countdown-footer p {
  font-family: var(--font-cursive);
  font-size: 1.4rem;
  color: var(--light-pink);
}

.hero-scroll-indicator {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.down-arrow {
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Common Section Styling */
.section {
  margin-bottom: 100px;
  text-align: center;
}

.section-tag {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 0.8rem;
  padding: 4px 16px;
  border-radius: 20px;
  display: inline-block;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  color: #ffffff;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* Journey Timeline */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
  opacity: 0.4;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
}

.timeline-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-rose));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.4);
  z-index: 2;
}

.timeline-item.highlight .timeline-badge {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  box-shadow: 0 0 25px rgba(0, 180, 216, 0.6);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px 24px;
  width: 100%;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.timeline-item:hover .glass-panel {
  transform: translateX(6px);
  border-color: rgba(255, 255, 255, 0.35);
}

.glass-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.glass-panel p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Polaroid Grid */
.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  justify-items: center;
  padding: 10px;
}

.polaroid-card {
  background: #ffffff;
  padding: 16px 16px 24px;
  border-radius: 6px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  transform: rotate(var(--rotation, 0deg));
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 320px;
  width: 100%;
  cursor: pointer;
}

.polaroid-card:hover {
  transform: scale(1.06) rotate(0deg);
  z-index: 10;
  box-shadow: 0 20px 40px rgba(255, 51, 102, 0.4);
}

.polaroid-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: #f0f0f0;
}

.polaroid-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.polaroid-card:hover img {
  transform: scale(1.08);
}

.polaroid-caption {
  margin-top: 16px;
  text-align: center;
  color: #222;
}

.polaroid-caption h3 {
  font-family: var(--font-cursive);
  font-size: 1.7rem;
  color: #d62828;
  margin-bottom: 4px;
}

.polaroid-caption p {
  font-size: 0.88rem;
  color: #555;
}

/* Reasons Cards Grid (3D Flip) */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
}

.reason-card {
  height: 220px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.reason-card.flipped .card-inner,
.reason-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
}

.card-front {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.card-front p {
  font-weight: 700;
  font-size: 1.1rem;
}

.card-front small {
  color: var(--accent-gold);
  font-size: 0.75rem;
  margin-top: 6px;
}

.card-back {
  background: linear-gradient(135deg, var(--primary-pink), #b01844);
  color: white;
  transform: rotateY(180deg);
  box-shadow: 0 10px 30px rgba(255, 51, 102, 0.4);
}

.card-back p {
  font-family: var(--font-cursive);
  font-size: 1.45rem;
  line-height: 1.35;
}

/* Bucket List Section */
.bucket-card {
  text-align: left;
}

.bucket-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bucket-item {
  position: relative;
}

.bucket-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.bucket-label {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 16px 20px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.bucket-label:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(4px);
}

.bucket-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.bucket-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.bucket-checkbox:checked + .bucket-label {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-cyan);
}

.bucket-checkbox:checked + .bucket-label .bucket-text {
  text-decoration: line-through;
  color: var(--accent-cyan);
}

/* Digital Love Letter Section */
.letter-card {
  position: relative;
  overflow: hidden;
  padding: 40px 30px;
}

.letter-seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.letter-seal:hover {
  transform: scale(1.08);
}

.seal-icon {
  font-size: 3.5rem;
  animation: pulse 1.8s infinite;
}

.seal-badge {
  background: var(--primary-pink);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-top: 8px;
  box-shadow: 0 4px 15px rgba(255, 51, 102, 0.4);
}

.letter-heading {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 20px;
}

.letter-body {
  background: rgba(255, 255, 255, 0.95);
  color: #222222;
  padding: 30px 24px;
  border-radius: 20px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: all 0.6s ease;
}

.letter-body.hidden {
  display: none;
}

.letter-text {
  font-family: var(--font-cursive);
  font-size: 1.6rem;
  line-height: 1.6;
  color: #2b1020;
}

/* Virtual Hug Section */
.hug-section {
  margin-bottom: 80px;
  text-align: center;
}

.hug-card h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.hug-card p {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 24px;
}

.btn-hug {
  background: linear-gradient(135deg, var(--primary-pink) 0%, #ff0055 100%);
  color: white;
  border: none;
  padding: 16px 36px;
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 51, 102, 0.6);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.btn-hug:hover {
  transform: scale(1.08);
  box-shadow: 0 15px 40px rgba(255, 51, 102, 0.8);
}

/* Lightbox Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(9, 2, 16, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.modal-overlay.hidden {
  display: none;
  opacity: 0;
}

.lightbox-content {
  position: relative;
  max-width: 600px;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
  animation: modalZoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalZoom {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-pink);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.15);
}

.lightbox-img-container {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 16px;
}

.lightbox-img-container img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
}

.lightbox-caption {
  font-family: var(--font-cursive);
  font-size: 1.6rem;
  color: #b01844;
  line-height: 1.4;
}

/* Footer */
.footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  padding-top: 40px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .hero-section {
    min-height: 80vh;
  }

  .timer-unit {
    padding: 10px 12px;
    min-width: 64px;
  }

  .unit-val {
    font-size: 1.7rem;
  }

  .timeline-container::before {
    left: 20px;
  }

  .timeline-badge {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
}
