/* ========================================
   💗 Valentine Week Website - Design System
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&family=Outfit:wght@300;400;500;600&display=swap');

/* ========================================
   CSS Variables (Color Palette)
   ======================================== */
:root {
  /* Pink tones */
  --pink-lightest: #FFF0F5;
  --pink-light: #FFE4EC;
  --pink-medium: #FF85A2;
  --pink-dark: #FF4D6D;
  --pink-deep: #E91E63;

  /* Purple tones */
  --purple-soft: #E4C1F9;
  --purple-medium: #D8B4F8;
  --purple-dark: #9B59B6;

  /* Other colors */
  --red-soft: #FF6B6B;
  --red-deep: #E74C3C;
  --white: #FFFFFF;
  --white-translucent: rgba(255, 255, 255, 0.95);
  --gold: #FFD700;
  --gold-light: #FFF4CC;
  --peach: #FFDAB9;
  --coral: #FF7F7F;
  --brown-soft: #D2B48C;
  --lavender: #E6E6FA;

  /* Text */
  --text-dark: #4A2C2A;
  --text-medium: #6B4C4A;
  --text-light: #8B6C6A;

  /* Fonts */
  --font-romantic: 'Dancing Script', cursive;
  --font-body: 'Outfit', sans-serif;

  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(255, 77, 109, 0.2);
  --shadow-medium: 0 8px 32px rgba(255, 77, 109, 0.3);
  --shadow-glow: 0 0 40px rgba(255, 133, 162, 0.5);

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ========================================
   Gradient Backgrounds
   ======================================== */
.bg-romantic {
  background: linear-gradient(135deg,
      var(--pink-light) 0%,
      var(--purple-soft) 50%,
      var(--pink-medium) 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.bg-golden {
  background: linear-gradient(135deg,
      var(--pink-medium) 0%,
      var(--gold-light) 50%,
      var(--pink-dark) 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* ========================================
   Floating Hearts Animation
   ======================================== */
.hearts-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.heart {
  position: absolute;
  font-size: 1.5rem;
  animation: floatHeart linear infinite;
  opacity: 0.6;
  filter: drop-shadow(0 0 3px rgba(255, 133, 162, 0.5));
}

@keyframes floatHeart {
  0% {
    transform: translateY(100vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-10vh) rotate(720deg) scale(1);
    opacity: 0;
  }
}

/* ========================================
   Page Container
   ======================================== */
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

/* ========================================
   Card Styles
   ======================================== */
.card {
  background: var(--white-translucent);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(10px);
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.card-glass {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ========================================
   Typography
   ======================================== */
.title-romantic {
  font-family: var(--font-romantic);
  font-size: 3rem;
  font-weight: 700;
  color: var(--pink-dark);
  text-shadow: 2px 2px 4px rgba(255, 77, 109, 0.2);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.title-large {
  font-size: 3.5rem;
}

.subtitle {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--text-medium);
  margin-bottom: 2rem;
  font-weight: 400;
}

.text-quote {
  font-family: var(--font-romantic);
  font-size: 1.5rem;
  color: var(--pink-deep);
  font-style: italic;
  line-height: 1.4;
}

/* ========================================
   Typewriter Effect
   ======================================== */
.typewriter {
  font-family: var(--font-romantic);
  font-size: 2.5rem;
  color: var(--pink-dark);
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--pink-dark);
  animation:
    typing 4s steps(50, end),
    blink 0.75s step-end infinite;
  max-width: fit-content;
  margin: 0 auto 1.5rem;
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes blink {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: var(--pink-dark);
  }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink-dark) 0%, var(--pink-deep) 100%);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-day {
  width: 100%;
  padding: 1.2rem 1.5rem;
  margin-bottom: 0.8rem;
  background: var(--white);
  color: var(--pink-dark);
  border: 2px solid var(--pink-light);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.btn-day::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--purple-soft) 100%);
  transition: var(--transition-smooth);
  z-index: -1;
}

.btn-day:hover::before {
  left: 0;
}

.btn-day:hover {
  border-color: var(--pink-medium);
  color: var(--pink-deep);
}

.btn-day.locked {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--pink-lightest);
}

.btn-day.locked:hover::before {
  left: -100%;
}

.btn-day.unlocked {
  border-color: var(--pink-medium);
}

.lock-icon {
  margin-left: 0.5rem;
  font-size: 1rem;
}

/* ========================================
   Envelope Styles (Letter Inside)
   ======================================== */
.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem auto;
}

.envelope-container {
  perspective: 1000px;
  position: relative;
}

.envelope {
  position: relative;
  width: 300px;
  height: 200px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.envelope:hover {
  transform: scale(1.03);
}

/* The envelope body (bottom part) */
.envelope-body {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow-medium);
  z-index: 2;
}

/* The envelope flap (top triangular part) */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  transform-origin: top center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}

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

/* The seal on the envelope */
.envelope-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  z-index: 6;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.envelope.open .envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0) rotate(180deg);
}

/* Inner envelope opening (where letter comes from) */
.envelope-inner {
  position: absolute;
  top: 30%;
  left: 5%;
  width: 90%;
  height: 65%;
  background: linear-gradient(135deg, #FFF5F7 0%, #FFE4EC 100%);
  border-radius: 4px;
  z-index: 1;
}

/* The letter that slides out */
.letter-inside {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 3;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
  max-height: 120px;
  overflow: hidden;
}

.envelope.open .letter-inside {
  transform: translateX(-50%) translateY(-140%);
  max-height: 350px;
  padding: 1.8rem;
  box-shadow: var(--shadow-medium);
}

/* Envelope color themes */
.envelope-day1 .envelope-body {
  background: linear-gradient(135deg, #FFB6C1 0%, #FF69B4 100%);
}

.envelope-day1 .envelope-flap {
  background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
}

.envelope-day1 .envelope-seal {
  background: #DC143C;
  color: white;
}

.envelope-day2 .envelope-body {
  background: linear-gradient(135deg, #E6E6FA 0%, #DDA0DD 100%);
}

.envelope-day2 .envelope-flap {
  background: linear-gradient(135deg, #DDA0DD 0%, #BA55D3 100%);
}

.envelope-day2 .envelope-seal {
  background: #9932CC;
  color: white;
}

/* Day 3 - Chocolate Day (brown/chocolate theme) */
.envelope-day3 .envelope-body {
  background: linear-gradient(135deg, #D2691E 0%, #8B4513 100%);
}

.envelope-day3 .envelope-flap {
  background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
}

.envelope-day3 .envelope-seal {
  background: #5D3A1A;
  color: white;
}

/* Day 4 - Teddy Day (soft brown/tan theme) */
.envelope-day4 .envelope-body {
  background: linear-gradient(135deg, #DEB887 0%, #D2B48C 100%);
}

.envelope-day4 .envelope-flap {
  background: linear-gradient(135deg, #D2B48C 0%, #BC8F8F 100%);
}

.envelope-day4 .envelope-seal {
  background: #8B4513;
  color: white;
}

/* Day 5 - Promise Day (coral/pink theme) */
.envelope-day5 .envelope-body {
  background: linear-gradient(135deg, #FFB7C5 0%, #FF7F7F 100%);
}

.envelope-day5 .envelope-flap {
  background: linear-gradient(135deg, #FF7F7F 0%, #FF6B6B 100%);
}

.envelope-day5 .envelope-seal {
  background: #E74C3C;
  color: white;
}

/* Day 6 - Hug Day (warm peach theme) */
.envelope-day6 .envelope-body {
  background: linear-gradient(135deg, #FFDAB9 0%, #FFA07A 100%);
}

.envelope-day6 .envelope-flap {
  background: linear-gradient(135deg, #FFA07A 0%, #FF7F50 100%);
}

.envelope-day6 .envelope-seal {
  background: #FF6347;
  color: white;
}

/* Day 7 - Kiss Day (red/romantic theme) */
.envelope-day7 .envelope-body {
  background: linear-gradient(135deg, #FFB6C1 0%, #FF4D6D 100%);
}

.envelope-day7 .envelope-flap {
  background: linear-gradient(135deg, #FF4D6D 0%, #E91E63 100%);
}

.envelope-day7 .envelope-seal {
  background: #C41E3A;
  color: white;
}

/* Day 8 - Valentine's Day (golden glow theme) */
.envelope-day8 .envelope-body {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.envelope-day8 .envelope-flap {
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
}

.envelope-day8 .envelope-seal {
  background: #DC143C;
  color: white;
}

/* ========================================
   Letter Content Inside Envelope
   ======================================== */
.letter-content {
  font-family: var(--font-romantic);
  font-size: 1.2rem;
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 1rem;
  opacity: 0;
  transition: opacity 0.5s ease 0.8s;
}

.envelope.open .letter-content {
  opacity: 1;
}

.letter-quote {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--pink-deep);
  font-style: italic;
  padding-top: 1rem;
  border-top: 1px solid var(--pink-light);
  opacity: 0;
  transition: opacity 0.5s ease 1.2s;
}

.envelope.open .letter-quote {
  opacity: 1;
}

.letter-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.5s ease 1.5s;
}

.envelope.open .letter-footer {
  opacity: 1;
}

/* Tap instruction that hides when opened */
.tap-instruction {
  color: var(--text-medium);
  margin-top: 1rem;
  font-size: 0.95rem;
  transition: opacity 0.3s ease;
}

.envelope.open~.tap-instruction,
.envelope-wrapper.opened .tap-instruction {
  opacity: 0;
  pointer-events: none;
}

/* ========================================
   Countdown Timer
   ======================================== */
.countdown-container {
  text-align: center;
  padding: 2rem;
}

.countdown-title {
  font-family: var(--font-romantic);
  font-size: 1.8rem;
  color: var(--pink-dark);
  margin-bottom: 1rem;
}

.countdown-timer {
  font-family: var(--font-body);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--pink-deep);
  letter-spacing: 2px;
}

.countdown-label {
  font-size: 1rem;
  color: var(--text-medium);
  margin-top: 0.5rem;
}

/* ========================================
   Music Controls
   ======================================== */
.music-control {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-dark) 0%, var(--pink-deep) 100%);
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-medium);
  transition: var(--transition-smooth);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-control:hover {
  transform: scale(1.1);
}

.music-control.playing {
  animation: pulse 2s ease infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.5);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(255, 77, 109, 0);
  }
}

/* ========================================
   Locked Page Overlay
   ======================================== */
.locked-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 228, 236, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.locked-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: wiggle 1s ease infinite;
}

@keyframes wiggle {

  0%,
  100% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }
}

/* ========================================
   Day Navigation
   ======================================== */
.days-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 350px;
}

/* ========================================
   Back Button
   ======================================== */
.back-btn {
  position: fixed;
  top: 2rem;
  left: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--white-translucent);
  border: 2px solid var(--pink-light);
  color: var(--pink-dark);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.back-btn:hover {
  background: var(--pink-light);
  transform: scale(1.1);
}

/* ========================================
   Day Header
   ======================================== */
.day-header {
  text-align: center;
  margin-bottom: 1rem;
}

.day-number {
  font-family: var(--font-romantic);
  font-size: 1.2rem;
  color: var(--pink-medium);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.day-theme {
  font-family: var(--font-romantic);
  font-size: 2.5rem;
  color: var(--pink-dark);
  margin-top: 0.5rem;
}

/* ========================================
   Day Image Section
   ======================================== */
.day-image {
  text-align: center;
  margin: 1.5rem 0;
}

.day-image img {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-medium);
  animation: floatIn 0.8s ease-out;
}

@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  .title-romantic {
    font-size: 2.2rem;
  }

  .title-large {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .typewriter {
    font-size: 1.8rem;
    white-space: normal;
    border-right: none;
    animation: none;
  }

  .card {
    padding: 2rem;
    margin: 1rem;
  }

  .envelope {
    width: 240px;
    height: 160px;
  }

  .letter-content {
    font-size: 1.2rem;
  }

  .countdown-timer {
    font-size: 2rem;
  }

  .music-control {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.2rem;
  }

  .back-btn {
    width: 45px;
    height: 45px;
    top: 1rem;
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .title-romantic {
    font-size: 1.8rem;
  }

  .card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .envelope {
    width: 200px;
    height: 140px;
  }

  .envelope-seal {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .letter {
    padding: 1.5rem;
  }

  .letter-content {
    font-size: 1.1rem;
  }

  .btn-day {
    padding: 1rem;
    font-size: 1rem;
  }
}

/* ========================================
   Special Effects
   ======================================== */
.sparkle {
  position: absolute;
  pointer-events: none;
  animation: sparkle 1s ease forwards;
}

@keyframes sparkle {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(180deg);
    opacity: 0;
  }
}

/* Day 7 Special Golden Glow */
.golden-glow {
  animation: goldenPulse 2s ease infinite;
}

@keyframes goldenPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
  }
}

/* ========================================
   Couple Image (Landing Page)
   ======================================== */
.couple-image-wrapper {
  margin-bottom: 1.5rem;
  position: relative;
}

.couple-image-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 133, 162, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: softGlow 3s ease infinite;
}

@keyframes softGlow {

  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

.couple-image {
  max-width: 250px;
  width: 100%;
  height: auto;
  border-radius: 16px;
  filter: drop-shadow(0 8px 24px rgba(255, 77, 109, 0.25));
  transition: var(--transition-smooth);
}

.couple-image:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 12px 32px rgba(255, 77, 109, 0.35));
}

@media (max-width: 768px) {
  .couple-image {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .couple-image {
    max-width: 180px;
  }
}