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

:root {
  --primary-gold: #ffd700;
  --secondary-gold: #ffa500;
  --accent-yellow: #ffff99;
  --warm-white: #fff8dc;
  --soft-brown: #8b4513;
  --deep-brown: #654321;
  --shadow-gold: rgba(255, 215, 0, 0.3);
  --shadow-dark: rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Poppins", sans-serif;
  overflow: hidden;
  background: linear-gradient(135deg, #fff8dc 0%, #ffe4b5 25%, #ffd700 50%, #ffa500 75%, #ff8c00 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  height: 100vh;
  position: relative;
}

.particles-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  opacity: 0.6;
  animation: floatUp 12s linear infinite;
  font-size: 20px;
}

.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.95);
}

.page.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.home-page {
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.welcome-content {
  text-align: center;
  max-width: 800px;
  padding: 2rem;
  margin: 0 auto;
}

.main-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 400;
  color: var(--deep-brown);
  text-shadow: 2px 2px 4px var(--shadow-gold);
  margin-bottom: 1rem;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

.subtitle {
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--soft-brown);
  text-shadow: 1px 1px 2px var(--shadow-gold);
  margin-bottom: 2rem;
}

.title-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.decoration-flower {
  font-size: 2rem;
  animation: bounce 2s ease-in-out infinite;
}

.decoration-line {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
  border-radius: 1px;
}

.btn-romantic {
  position: relative;
  background: linear-gradient(45deg, var(--primary-gold), var(--secondary-gold));
  border: 2px solid var(--deep-brown);
  padding: 1.2rem 3rem;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--deep-brown);
  cursor: pointer;
  box-shadow: 0 8px 25px var(--shadow-gold);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-romantic:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px var(--shadow-gold);
}

.btn-romantic:active {
  transform: translateY(-1px) scale(1.02);
}

.btn-icon {
  font-size: 1.4rem;
  animation: heartPulse 1.5s ease-in-out infinite;
}

.btn-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-romantic:active .btn-ripple {
  width: 300px;
  height: 300px;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.float-item {
  position: absolute;
  font-size: 2rem;
  opacity: 0.7;
  left: var(--x);
  top: var(--y);
  animation: floatDance 4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.romantic-page {
  z-index: 20;
}

.romantic-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--primary-gold);
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--deep-brown);
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  background: var(--primary-gold);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-gold);
  border: 2px solid var(--warm-white);
}

.music-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  justify-content: center;
  padding: 0;
}

.music-btn.playing {
  animation: musicPulse 1s ease-in-out infinite;
}

.poem-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 215, 0, 0.2);
  overflow: hidden;
  margin: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.card-header {
  background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
  padding: 2rem;
  color: white;
}

.poem-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.title-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ornament-left,
.ornament-right {
  font-size: 1.5rem;
  animation: sway 3s linear infinite;
}

.ornament-line {
  width: 80px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1px;
}

.card-body {
  padding: 1rem 2rem;
}

.verse {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--soft-brown);
  margin-bottom: 1.5rem;
  font-style: italic;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.verse.animate {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease;
}

.personal-signature {
  text-align: right;
  margin-top: 2rem;
}

.signature-from {
  font-family: "Poppins", cursive;
  font-size: 1.2rem;
  color: var(--soft-brown);
  font-style: italic;
  margin: 0;
}

.signature-name {
  font-family: "Dancing Script", cursive;
  font-size: 1.8rem;
  color: var(--soft-brown);
  display: block;
  margin-top: 0.3rem;
}

.falling-flowers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.falling-flower {
  position: absolute;
  font-size: 2rem;
  opacity: 0.8;
  animation: fall linear infinite;
  top: -100px;
  transition: opacity 0.5s ease-out;
}

.falling-flower.fade-out {
  opacity: 0;
}

@keyframes gradientShift {

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

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

@keyframes titleGlow {

  0%,
  100% {
    text-shadow: 2px 2px 4px var(--shadow-gold);
  }

  50% {
    text-shadow: 2px 2px 20px var(--shadow-gold);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes heartPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

@keyframes floatDance {

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

  25% {
    transform: translateY(-15px) rotate(5deg);
  }

  50% {
    transform: translateY(-25px) rotate(0deg);
  }

  75% {
    transform: translateY(-15px) rotate(-5deg);
  }
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-100px) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.8;
  }

  85% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(calc(100vh + 100px)) rotate(360deg);
    opacity: 0;
  }
}

@keyframes sway {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(20deg);
  }

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

  75% {
    transform: rotate(-20deg);
  }

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


@keyframes musicPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

@media (min-width: 1024px) {
  .verse {
    font-size: 1rem; 
    line-height: 1.5;
  }
  .signature-from {
    font-size: 1rem;
  }
  .signature-name {
    font-size: 1.5rem;
  }
  .poem-card {
    max-height: calc(100vh - 6rem);
  }
}

@media (max-width: 768px) {
  .romantic-nav {
    padding: 1rem;
  }

  .nav-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .music-btn {
    width: 50px;
    height: 50px;
  }

  .poem-card {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    margin-top: 5rem;
  }

  .card-header {
    padding: 1.5rem;
  }

  .card-body {
    padding: 2rem 1.5rem;
  }

  .verse {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
  }

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

  .decoration-flower {
    font-size: 1.5rem;
  }

  .float-item {
    font-size: 1.5rem;
  }

  .signature-from {
    font-size: 1rem;
  }

  .signature-name {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .welcome-content {
    padding: 1rem;
  }

  .poem-card {
    margin: 0.5rem;
    border-radius: 15px;
    max-height: calc(100vh - 1rem);
  }

  .card-header {
    padding: 1.2rem;
  }

  .card-body {
    padding: 1.5rem 1rem;
  }

  .verse {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.4;
  }

  .btn-romantic {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    gap: 0.5rem;
  }

  .btn-icon {
    font-size: 1.2rem;
  }

  .signature-from {
    font-size: 0.95rem;
  }

  .signature-name {
    font-size: 1.8rem;
  }

  .decoration-flower {
    font-size: 1.2rem;
  }

  .float-item {
    font-size: 1.2rem;
  }

  .romantic-nav {
    padding: 0.8rem;
  }

  .nav-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  .music-btn {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 360px) {
  .poem-card {
    margin: 0.25rem;
  }

  .card-body {
    padding: 1rem 0.8rem;
  }

  .verse {
    font-size: 0.9rem;
  }

  .btn-romantic {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }

  .welcome-content {
    padding: 0.5rem;
  }
}