:root {
  --primary-color: #d63384;
  --secondary-color: #ff69b4;
  --light-pink: #fff0f5;
  --light-pink-2: #ffe4e1;
  --text-color: #333;
  --white: #fff;
  --shadow: 0 0 20px rgba(255, 105, 180, 0.3);
}

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

body {
  background: linear-gradient(135deg, var(--light-pink), var(--light-pink-2));
  color: var(--text-color);
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

header {
  margin-bottom: 30px;
}

h1 {
  font-size: 2.8em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-family: 'Dancing Script', cursive;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
  font-size: 1.2em;
  color: var(--secondary-color);
  margin-bottom: 30px;
  font-weight: 300;
}

#timer {
  font-size: 1.8em;
  background: var(--white);
  color: var(--primary-color);
  padding: 25px 35px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  margin-bottom: 30px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
}

.media-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin-bottom: 30px;
  perspective: 1000px;
}

.video-casal, .photo-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
  transition: transform 0.5s ease;
}

.media-container:hover .video-casal {
  transform: rotateY(10deg) scale(1.02);
}

.photo-fallback {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center;
}

.eu-te-amo {
  font-size: 2.2em;
  color: var(--secondary-color);
  margin-top: 30px;
  animation: pulse 2s infinite;
  font-family: 'Dancing Script', cursive;
}

.heart {
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.memory-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 1em;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(214, 51, 132, 0.3);
  z-index: 10;
}

.memory-button:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(255, 105, 180, 0.4);
}

.support-button {
  background: #6a5acd;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 1em;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(106, 90, 205, 0.3);
  text-decoration: none;
  display: inline-block;
}

.support-button:hover {
  background: #7b68ee;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(123, 104, 238, 0.4);
}

footer {
  margin-top: 40px;
  font-size: 0.9em;
  color: var(--secondary-color);
}

/* Memories Modal */
.memories-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.memories-container {
  background: var(--white);
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 0 30px rgba(214, 51, 132, 0.5);
}

.close-memories {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5em;
  cursor: pointer;
  color: var(--primary-color);
  background: none;
  border: none;
}

.memories-title {
  font-family: 'Dancing Script', cursive;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 2em;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

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

.memory-item:hover {
  transform: translateY(-5px) scale(1.03);
}

.memory-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.memory-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  padding: 15px 10px 10px;
  font-size: 0.9em;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

.memory-date {
  font-size: 0.8em;
  color: var(--secondary-color);
  margin-top: 5px;
}

@media (max-width: 600px) {
  h1 {
    font-size: 2em;
  }

  .subtitle {
    font-size: 1em;
  }

  #timer {
    font-size: 1.3em;
    padding: 20px 25px;
  }

  .eu-te-amo {
    font-size: 1.8em;
  }

  .media-container {
    width: 220px;
    height: 220px;
  }

  .memory-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .memories-container {
    padding: 20px 15px;
  }
}