:root {
  --primary-purple: #6a21a8;
  --secondary-purple: #9c27b0;
  --light-purple: #e1bee7;
  --dark-purple: #4a148c;
  --pink-accent: #e91e63;
  --white: #ffffff;
  --light-bg: #f9f0ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--light-bg);
  color: var(--dark-purple);
  overflow-x: hidden;
  position: relative;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23e91e63' d='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'/%3E%3C/svg%3E"),
    auto;
}

h1,
h2,
h3,
h4 {
  font-family: "Dancing Script", cursive;
  color: var(--primary-purple);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--secondary-purple),
    var(--pink-accent)
  );
  margin: 0.5rem auto;
}

.name {
  color: var(--pink-accent);
  font-weight: 600;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 4rem 0;
  position: relative;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(106, 33, 168, 0.2);
  max-width: 800px;
  margin: 0 auto;
}

.pulse-heart {
  font-size: 4rem;
  color: var(--pink-accent);
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--primary-purple);
  font-style: italic;
}

.scroll-down {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--secondary-purple);
  cursor: pointer;
  transition: transform 0.3s;
}

.scroll-down:hover {
  transform: translateY(5px);
}

.scroll-down i {
  margin-top: 0.5rem;
  animation: bounce 2s infinite;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    to bottom,
    var(--secondary-purple),
    var(--pink-accent)
  );
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 20px;
  height: 20px;
  background-color: var(--pink-accent);
  border-radius: 50%;
  transform: translateX(-50%);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--secondary-purple);
  z-index: 1;
}

.timeline-content {
  width: calc(50% - 40px);
  padding: 1.5rem;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
}

.timeline-content::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 0;
  height: 0;
  border-style: solid;
}

.timeline-item:nth-child(odd) .timeline-content::after {
  right: 100%;
  border-width: 10px 15px 10px 0;
  border-color: transparent var(--white) transparent transparent;
}

.timeline-item:nth-child(even) .timeline-content::after {
  left: 100%;
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent var(--white);
}

.timeline-content h3 {
  color: var(--secondary-purple);
  margin-bottom: 0.5rem;
}

.timeline-content h4 {
  color: var(--primary-purple);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.timeline-content p {
  color: #555;
  line-height: 1.6;
}

.future .timeline-content {
  background: linear-gradient(135deg, var(--light-purple), var(--white));
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1/1;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(106, 33, 168, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(106, 33, 168, 0.8), transparent);
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
}

.letter-container {
  perspective: 1000px;
  max-width: 600px;
  margin: 0 auto;
}

.letter {
  position: relative;
  width: 100%;
  height: 400px;
  transform-style: preserve-3d;
  transition: transform 1s;
  cursor: pointer;
}

.letter.flipped {
  transform: rotateY(180deg);
}

.letter-front,
.letter-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(106, 33, 168, 0.2);
}

.letter-front {
  background: linear-gradient(135deg, var(--light-purple), var(--white));
}

.envelope {
  width: 200px;
  height: 120px;
  background-color: var(--pink-accent);
  position: relative;
  margin-bottom: 2rem;
}

.envelope::before {
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-top: 70px solid var(--secondary-purple);
  transform-origin: top;
  z-index: 3;
}

.letter-back {
  background-color: var(--white);
  transform: rotateY(180deg);
}

.letter-content {
  width: 100%;
  height: 100%;
  padding: 2rem;
  background-color: #fff9f9;
  border: 1px solid var(--light-purple);
  border-radius: 5px;
  overflow-y: auto;
}

.letter-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.date {
  text-align: right;
  font-style: italic;
  color: var(--secondary-purple);
  margin-bottom: 1.5rem;
}

.signature {
  margin-top: 2rem;
  text-align: right;
  font-style: italic;
}

.signature .name {
  font-size: 1.3rem;
}

footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--primary-purple);
  color: white;
}

footer i {
  color: var(--pink-accent);
  margin: 0 0.3rem;
}

#confetti-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--pink-accent);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transition: transform 0.3s;
}

#confetti-btn:hover {
  transform: scale(1.1);
}

.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(106, 33, 168, 0.9);
  z-index: 1000;
  padding: 1rem;
  transform: translateY(-100%);
  transition: transform 0.3s;
}

.main-nav.visible {
  transform: translateY(0);
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: background-color 0.3s;
}

.main-nav a:hover {
  background-color: var(--pink-accent);
}

.menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--pink-accent);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

.heart-particle {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--pink-accent);
  opacity: 0.6;
  border-radius: 50%;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .timeline-dot {
    left: 20px;
  }

  .timeline-content {
    width: 100%;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin: 0;
  }

  .timeline-content::after {
    display: none;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .letter {
    height: 300px;
  }

  .letter-content {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 1rem;
  }

  .gallery-container {
    grid-template-columns: 1fr;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(106, 33, 168, 0.9);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  animation: zoomIn 0.3s;
}

@keyframes zoomIn {
  from {
    transform: scale(0.5);
  }
  to {
    transform: scale(1);
  }
}

#caption {
  margin: 15px auto;
  display: block;
  width: 80%;
  text-align: center;
  color: white;
  font-size: 1.2rem;
  padding: 10px 0;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover {
  color: #e91e63;
  transform: rotate(90deg);
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: 0.3s;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 0 5px 5px 0;
}

.next {
  right: 0;
  border-radius: 5px 0 0 5px;
}

.prev:hover,
.next:hover {
  background-color: rgba(233, 30, 99, 0.8);
}

.gallery-item {
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.03);
}
