@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4ecdc4;
  --dark-color: #292f36;
  --light-color: #f7fff7;
  --accent-color: #ffd166;
  --font-heading: 'Poppins', serif;
  --font-body: 'Poppins', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: #f9f9f9;
  color: var(--dark-color);
  overflow-x: hidden;
}

/* Preloader Styles */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.preloader-content {
  text-align: center;
  color: white;
}

.preloader h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.loader {
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 5px solid white;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Header Styles */
.header {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.anniversary-counter {
  background: rgba(255, 255, 255, 0.2);
  padding: 1rem;
  border-radius: 50px;
  display: inline-block;
  font-size: 1.2rem;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Timeline Styles */
.timeline-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.empty-timeline {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.empty-timeline h2 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.empty-timeline p {
  margin-bottom: 2rem;
  color: #666;
}

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  z-index: 1;
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
}

.timeline-content {
  position: relative;
  width: 45%;
  padding: 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.timeline-content.left {
  left: 0;
}

.timeline-content.left::after {
  content: '';
  position: absolute;
  top: 20px;
  right: -12px;
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.timeline-content.right {
  left: 55%;
}

.timeline-content.right::after {
  content: '';
  position: absolute;
  top: 20px;
  left: -12px;
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.timeline-content h2 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  aspect-ratio: 1 / 1;
}

.photo-item:hover {
  transform: scale(1.03);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-caption {
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.photo-item:hover .photo-caption {
  transform: translateY(0);
}

.view-more {
  margin-top: 1rem;
  text-align: center;
}

/* Upload Button */
.upload-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 100;
}

.upload-btn:hover {
  transform: scale(1.1);
  background: var(--secondary-color);
}

/* Button Styles */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #ff5252;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: #3dbbba;
  transform: translateY(-2px);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-color);
}

input, select, textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

/* Congrats Modal */
.congrats-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9000;
  justify-content: center;
  align-items: center;
}

.congrats-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.congrats-content h2 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.congrats-content p {
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

.heart-animation {
  font-size: 3rem;
  margin: 1.5rem 0;
  display: inline-block;
}

.confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Lightbox Styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.close-lightbox {
  position: absolute;
  top: 10px;
  right: 15px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
}

.close-lightbox:hover {
  transform: scale(1.2);
  color: var(--primary-color);
}

.lightbox-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 1rem;
  text-align: center;
}

/* Confetti Animation */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9990;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  background-color: var(--primary-color);
  animation: confetti-fall linear forwards;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  .timeline::before {
    left: 30px;
  }
  
  .timeline-content {
    width: calc(100% - 60px);
    left: 60px !important;
  }
  
  .timeline-content.left::after,
  .timeline-content.right::after {
    left: -42px;
    right: auto;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .anniversary-counter {
    font-size: 1rem;
    padding: 0.7rem;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .photo-gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
