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

body {
  font-family: 'Georgia', serif;
  background: linear-gradient(180deg, #87CEEB 0%, #B0E0E6 50%, #E0F7FA 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Navigation Bar */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 15px 20px;
  background: transparent;
}

.tab-btn {
  background: none;
  border: none;
  font-family: 'Georgia', serif;
  font-size: 1.5rem;
  color: #E91E63;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: rgba(233, 30, 99, 0.1);
}

.tab-btn.active {
  background: rgba(233, 30, 99, 0.2);
  font-weight: bold;
}

.tab-disabled {
  font-family: 'Georgia', serif;
  font-size: 1rem;
  color: #999;
  font-style: italic;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  flex: 1;
}

.coming-soon {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 100px;
}

.coming-soon p {
  font-size: 3rem;
  color: #E91E63;
  font-style: italic;
}

/* Sky Section */
.sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 300px;
  pointer-events: none;
  z-index: 0;
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.sun {
  position: absolute;
  top: 20px;
  right: 50px;
  width: 150px;
  height: 150px;
  animation: pulse 4s ease-in-out infinite;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.cloud {
  position: absolute;
  width: 120px;
  height: 60px;
  will-change: transform;
  transform: translateZ(0);
}

.cloud-1 {
  top: 30px;
  left: 10%;
  animation: float 20s ease-in-out infinite;
}

.cloud-2 {
  top: 80px;
  left: 40%;
  animation: float 25s ease-in-out infinite reverse;
}

.cloud-3 {
  top: 50px;
  left: 70%;
  animation: float 18s ease-in-out infinite;
}

/* Butterflies */
.butterfly {
  position: fixed;
  width: 60px;
  height: 60px;
  z-index: 100;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.butterfly-1 {
  top: 20%;
  left: 5%;
  animation: flutter 8s ease-in-out infinite;
}

.butterfly-2 {
  top: 60%;
  left: 15%;
  animation: flutter 10s ease-in-out infinite reverse;
}

.butterfly-3 {
  top: 40%;
  right: 8%;
  animation: flutter 12s ease-in-out infinite;
}

.butterfly-4 {
  top: 30%;
  right: 20%;
  animation: flutter 9s ease-in-out infinite reverse;
}

.butterfly-5 {
  top: 70%;
  right: 5%;
  animation: flutter 11s ease-in-out infinite;
}

/* Main Content */
.content {
  position: relative;
  z-index: 10;
  padding: 20px;
  padding-top: 200px;
  padding-bottom: 150px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 30px;
  margin-bottom: 60px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 3.5rem;
  color: #E91E63;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero .subtitle {
  font-size: 1.3rem;
  color: #7B1FA2;
  font-style: italic;
}

/* Gallery Section */
.gallery {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  padding: 50px 30px;
  margin-bottom: 60px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.gallery h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #E91E63;
  margin-bottom: 40px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-items: center;
}

.photo-card {
  background: white;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 320px;
}

.photo-card:hover {
  transform: translateY(-10px) rotate(2deg);
  box-shadow: 0 15px 40px rgba(233, 30, 99, 0.2);
}

.photo-card .photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 15px;
}

.photo-card .caption {
  text-align: center;
  padding: 15px 10px 5px;
  color: #666;
  font-style: italic;
  font-size: 1rem;
}

/* Photo Stack */
.photo-stack {
  position: relative;
  max-width: 320px;
  padding-top: 50px;
}

.stack-flower {
  position: absolute;
  top: 0;
  right: 20px;
  width: 100px;
  height: 100px;
  z-index: 20;
}

.stack-photos {
  position: relative;
  width: 290px;
  height: 250px;
  cursor: pointer;
}

.stack-photo {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  background: #f0f0f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
}

.stack-photo:nth-child(1) { transform: rotate(-2deg); z-index: 10; }
.stack-photo:nth-child(2) { transform: rotate(1deg) translate(4px, 4px); z-index: 9; }
.stack-photo:nth-child(3) { transform: rotate(-1deg) translate(8px, 8px); z-index: 8; }
.stack-photo:nth-child(4) { transform: rotate(2deg) translate(12px, 12px); z-index: 7; }
.stack-photo:nth-child(5) { transform: rotate(-1.5deg) translate(16px, 16px); z-index: 6; }
.stack-photo:nth-child(n+6) { transform: rotate(1deg) translate(20px, 20px); z-index: 5; }

.photo-stack:hover .stack-photo:nth-child(1) {
  transform: rotate(-4deg) translateY(-10px);
  box-shadow: 0 15px 40px rgba(233, 30, 99, 0.2);
}

.photo-stack .caption {
  text-align: center;
  padding: 20px 10px 5px;
  color: #E91E63;
  font-style: italic;
  font-size: 1.2rem;
  font-weight: bold;
}

/* Love Notes Section */
.love-notes {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  padding: 50px 30px;
  margin-bottom: 60px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.love-notes h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #E91E63;
  margin-bottom: 40px;
}

.notes-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.note {
  background: #FFF9C4;
  border-radius: 5px 5px 30px 5px;
  padding: 30px;
  box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: rotate(-1deg);
  transition: transform 0.3s ease;
}

.note:nth-child(even) {
  transform: rotate(1deg);
  background: #FFCDD2;
}

.note:hover {
  transform: rotate(0deg) scale(1.02);
}

.note-flower {
  position: absolute;
  top: -40px;
  right: 20px;
  width: 100px;
  height: 100px;
}

.note p {
  color: #5D4037;
  line-height: 1.8;
  font-size: 1.1rem;
}

/* Special Message */
.special-message {
  text-align: center;
  padding: 40px 20px;
}

.message-box {
  display: inline-block;
  background: #FCE4EC;
  border-radius: 30px;
  padding: 50px 60px;
  box-shadow: 0 10px 40px rgba(233, 30, 99, 0.2);
  border: 3px solid #F48FB1;
}

.message-box h2 {
  font-size: 2.5rem;
  color: #C2185B;
  margin-bottom: 20px;
}

.message-box p {
  color: #880E4F;
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 600px;
}

/* Grass Footer */
.grass-footer {
  position: relative;
  width: 100%;
  z-index: 5;
  flex-shrink: 0;
  margin-top: auto;
}

.flowers-row {
  display: flex;
  justify-content: space-around;
  padding: 0 20px;
  position: relative;
  bottom: -70px;
}

.footer-flower {
  width: 100px;
  height: 100px;
}

.grass {
  width: 100%;
  height: 100px;
  display: block;
  background: url('images/grass.svg') repeat-x bottom;
  background-size: auto 100%;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(30px);
  }
}

@keyframes flutter {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, -30px) rotate(5deg);
  }
  50% {
    transform: translate(40px, 0) rotate(-5deg);
  }
  75% {
    transform: translate(20px, 30px) rotate(5deg);
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  padding: 20px 15px;
  border-radius: 5px;
  transition: background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1.2rem;
  font-family: 'Georgia', serif;
}

/* Runaway Cat */
.cat {
  position: fixed;
  bottom: 120px;
  left: 50%;
  width: 64px;
  height: 64px;
  z-index: 500;
  cursor: pointer;
  image-rendering: pixelated;
}

.cat-sprite {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  image-rendering: pixelated;
}

/* Default state: sleep */
.cat-sleep { display: block; }

/* State-driven sprite visibility */
.cat.state-sleep .cat-sleep { display: block; }
.cat.state-sleep .cat-idle,
.cat.state-sleep .cat-walk,
.cat.state-sleep .cat-run { display: none; }

.cat.state-idle .cat-idle { display: block; }
.cat.state-idle .cat-sleep,
.cat.state-idle .cat-walk,
.cat.state-idle .cat-run { display: none; }

.cat.state-walk .cat-walk { display: block; }
.cat.state-walk .cat-sleep,
.cat.state-walk .cat-idle,
.cat.state-walk .cat-run { display: none; }

.cat.state-run .cat-run { display: block; }
.cat.state-run .cat-sleep,
.cat.state-run .cat-idle,
.cat.state-run .cat-walk { display: none; }

.cat.facing-left {
  transform: scaleX(-1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .content {
    padding-top: 150px;
  }

  .sun {
    width: 100px;
    height: 100px;
    right: 20px;
  }

  .butterfly {
    width: 40px;
    height: 40px;
  }

  .gallery h2,
  .love-notes h2,
  .message-box h2 {
    font-size: 2rem;
  }

  .message-box {
    padding: 30px;
  }

  .note {
    padding: 25px 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .cloud {
    width: 80px;
    height: 40px;
  }

  .photo-card .photo {
    height: 200px;
  }

  .stack-photos {
    width: 250px;
    height: 200px;
  }
}
