:root {
  --primary-color: #ff4d6d;
  --secondary-color: #c9184a;
  --accent-color: #ffccd5;
  --light-color: #fff0f3;
  --dark-color: #590d22;
  --font-family: 'Poppins', sans-serif;
  --cursive-font: 'Dancing Script', cursive;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--light-color);
  color: var(--dark-color);
  line-height: 1.6;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
}

.loader {
  text-align: center;
}

.loader p {
  color: var(--primary-color);
  font-family: var(--cursive-font);
  font-size: 1.5rem;
  margin-top: 20px;
  animation: pulseText 1.5s infinite;
}

.heart {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  position: relative;
  transform: rotate(-45deg);
  animation: heartBeat 1.2s infinite;
}

.heart:before,
.heart:after {
  content: '';
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  position: absolute;
}

.heart:before {
  top: -30px;
  left: 0;
}

.heart:after {
  left: 30px;
  top: 0;
}

@keyframes heartBeat {
  0% { transform: rotate(-45deg) scale(1); }
  50% { transform: rotate(-45deg) scale(1.2); }
  100% { transform: rotate(-45deg) scale(1); }
}

@keyframes pulseText {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.audio-controls {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 10000;
}

.audio-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 5px;
}

.audio-btn:hover {
  color: var(--secondary-color);
  transform: scale(1.2);
}

.audio-btn:active {
  transform: scale(1);
}

.audio-btn i {
  font-size: 1.2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  padding: 40px 0;
  margin-bottom: 30px;
  animation: fadeIn 1.5s ease-in-out;
}

.title {
  font-family: var(--cursive-font);
  font-size: 5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
  font-size: 1.5rem;
  color: var(--secondary-color);
  font-weight: 300;
}

section {
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.appear {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  font-size: 2.2rem;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
}

/* Countdown Section */
.countdown {
  text-align: center;
  padding: 20px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.time-block span:first-child {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary-color);
  display: inline-block;
  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.time-block span.number-animate {
  animation: fallNumber 0.4s ease-in-out forwards;
}

@keyframes fallNumber {
  0% {
    transform: translateY(-50px);
    opacity: 0;
  }
  60% {
    transform: translateY(8px);
    opacity: 0.9;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.time-block.zero .number-animate {
  animation: fallNumber 0.4s ease-in-out forwards, pulseZero 0.5s ease-in-out 2;
}

@keyframes pulseZero {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.label {
  font-size: 0.85rem;
  color: var(--dark-color);
}

/* Message Section */
.message {
  padding: 20px;
}

.message-card {
  background-color: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.message-card h2 {
  font-family: var(--cursive-font);
  color: var(--primary-color);
  margin-bottom: 20px;
}

.message-card p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.signature {
  margin-top: 30px;
  font-style: italic;
  color: var(--secondary-color);
}

.signature-name {
  font-family: var(--cursive-font);
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-top: 5px;
}

/* Memories/Gallery Section */
.memories {
  padding: 20px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.photo {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.photo img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.photo:hover img {
  transform: scale(1.05);
}

/* Wishes Section */
.wishes {
  padding: 20px;
}

.wish-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.wish {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease;
}

.wish:hover {
  transform: translateY(-5px);
}

.wish i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Playlist Section */
.playlist {
  padding: 20px;
}

.songs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.song {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.song:hover {
  transform: translateY(-3px);
}

.song i {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-right: 15px;
}

.song.playing {
  background-color: var(--accent-color);
  border: 2px solid var(--primary-color);
}

.song.playing i {
  animation: pulse 1s infinite;
}

.song audio {
  display: none;
}

.youtube-container {
  display: none;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Birthday Button */
.birthday-button {
  display: block;
  margin: 0 auto 50px;
  padding: 15px 30px;
  font-size: 1.2rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  font-family: var(--font-family);
}

.birthday-button:hover {
  background-color: var(--secondary-color);
  transform: scale(1.05);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.15);
}

.birthday-button:active {
  transform: scale(0.98);
}

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  color: var(--secondary-color);
}

footer i {
  color: var(--primary-color);
  animation: heartBeat 1.5s infinite;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.3);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.3);
  }
  70% {
    transform: scale(1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .title {
    font-size: 3.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .countdown-timer {
    gap: 10px;
  }

  .time-block {
    min-width: 60px;
  }

  .time-block span:first-child {
    font-size: 2rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .audio-btn {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 2.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .time-block {
    min-width: 50px;
  }

  .time-block span:first-child {
    font-size: 1.8rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .wish-container, .songs {
    grid-template-columns: 1fr;
  }

  .audio-btn {
    font-size: 0.9rem;
    padding: 4px;
  }

  .loader p {
    font-size: 1.2rem;
  }

  .heart {
    width: 50px;
    height: 50px;
  }

  .heart:before,
  .heart:after {
    width: 50px;
    height: 50px;
  }

  .heart:before {
    top: -25px;
  }

  .heart:after {
    left: 25px;
  }
}