/**
 * Animations Module
 * Keyframes y animaciones
 */

@keyframes gardenBloom {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

/* Decorative Flowers - Flores violetas sutiles como jardín */
.flower-decoration {
  position: fixed;
  width: clamp(40px, 8vw, 60px);
  height: clamp(40px, 8vw, 60px);
  opacity: 0.08;
  pointer-events: none;
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 0;
  filter: blur(0.5px);
  animation: flowerFloat 40s ease-in-out infinite;
}

.flower-top-left {
  animation-delay: 0s;
}

.flower-top-right {
  animation-delay: 5s;
}

.flower-bottom-left {
  animation-delay: 10s;
}

.flower-bottom-right {
  animation-delay: 15s;
}

@keyframes flowerFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
  25% {
    transform: translate(2px, -3px) scale(1.01);
    opacity: 0.16;
  }
  50% {
    transform: translate(-1px, 2px) scale(0.99);
    opacity: 0.14;
  }
  75% {
    transform: translate(3px, 1px) scale(1.01);
    opacity: 0.15;
  }
}

.flower-top-left {
  top: -30px;
  left: -30px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="30" r="15" fill="%239370db"/><circle cx="70" cy="50" r="15" fill="%23b19cd9"/><circle cx="50" cy="70" r="15" fill="%23da70d6"/><circle cx="30" cy="50" r="15" fill="%23d8bfd8"/><circle cx="50" cy="50" r="20" fill="%238a2be2"/></svg>');
}

.flower-top-right {
  top: 100px;
  right: -20px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="30" r="15" fill="%23da70d6"/><circle cx="70" cy="50" r="15" fill="%239370db"/><circle cx="50" cy="70" r="15" fill="%23b19cd9"/><circle cx="30" cy="50" r="15" fill="%23d8bfd8"/><circle cx="50" cy="50" r="20" fill="%238a2be2"/></svg>');
}

.flower-bottom-left {
  bottom: 50px;
  left: 50px;
  width: 120px;
  height: 120px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="30" r="15" fill="%23b19cd9"/><circle cx="70" cy="50" r="15" fill="%23da70d6"/><circle cx="50" cy="70" r="15" fill="%239370db"/><circle cx="30" cy="50" r="15" fill="%23d8bfd8"/><circle cx="50" cy="50" r="20" fill="%238a2be2"/></svg>');
}

.flower-bottom-right {
  bottom: -40px;
  right: 100px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="30" r="15" fill="%23d8bfd8"/><circle cx="70" cy="50" r="15" fill="%23b19cd9"/><circle cx="50" cy="70" r="15" fill="%23da70d6"/><circle cx="30" cy="50" r="15" fill="%239370db"/><circle cx="50" cy="50" r="20" fill="%238a2be2"/></svg>');
}

.container {
  max-width: 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0.5rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* Header - Reducido para dar más atención al calendario */
header {
  text-align: center;
  margin-bottom: 0.2rem;
  flex-shrink: 0;
  padding: 0;
  opacity: 0.9;
}

.title {
  font-family: "Pacifico", cursive;
  font-size: clamp(1rem, 2.8vw, 1.3rem);
  color: #9370db;
  margin: 0;
  text-shadow: 0 1px 2px rgba(147, 112, 219, 0.1);
  line-height: 1.1;
  font-weight: 400;
  opacity: 0.9;
}

.flower-icon {
  display: inline-block;
  animation: rotate 3s ease-in-out infinite;
}

@keyframes rotate {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

.subtitle {
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  color: #da70d6;
  opacity: 0.75;
  line-height: 1.2;
  margin: 0 0 0.2rem 0;
  font-family: "Quicksand", sans-serif;
  font-weight: 500;
}

/* Contador de vida - Reducido al 5% de atención */
.life-counter {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 0.4rem 0.8rem;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  border: 1px solid rgba(255, 182, 193, 0.12);
  box-shadow: 0 1px 4px rgba(255, 182, 193, 0.08);
  position: relative;
  overflow: hidden;
  opacity: 0.9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 1rem;
  min-height: 2rem;
}

/* Línea decorativa removida para diseño compacto */

.life-counter-main {
  display: flex;
  align-items: center;
}

.age-display {
  font-size: clamp(0.7rem, 1.6vw, 0.8rem);
  font-weight: 600;
  color: #9370db;
  white-space: nowrap;
  font-family: "Quicksand", sans-serif;
  line-height: 1;
}

.life-counter-details {
  display: flex;
  align-items: center;
}

.birth-stats {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: clamp(0.6rem, 1.3vw, 0.7rem);
  color: #9370db;
  font-weight: 500;
  font-family: "Quicksand", sans-serif;
  line-height: 1;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  opacity: 0.85;
}

.stat-separator {
  opacity: 0.4;
  font-size: 0.5rem;
}

.stat-separator {
  color: rgba(147, 112, 219, 0.25);
  font-weight: 300;
  font-size: 1em;
}

.next-birthday {
  font-size: clamp(0.55rem, 1.2vw, 0.65rem);
  color: #da70d6;
  font-weight: 500;
  font-family: "Quicksand", sans-serif;
  opacity: 0.8;
  white-space: nowrap;
  display: flex;
  align-items: center;
  line-height: 1;
}

/* Botones de acción en el banner de vida */
.life-counter-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 1.4rem;
}

.life-counter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(147, 112, 219, 0.2);
  background: rgba(255, 255, 255, 0.5);
  color: #9370db;
  font-size: clamp(0.55rem, 1.2vw, 0.65rem);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Quicksand", sans-serif;
  line-height: 1;
  height: 1.4rem;
  vertical-align: middle;
  box-sizing: border-box;
  text-align: center;
}

.life-counter-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(147, 112, 219, 0.35);
}

.life-counter-btn .btn-icon {
  font-size: 1em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.life-counter-btn .btn-text {
  white-space: nowrap;
  line-height: 1;
}

.life-counter-btn.has-user {
  background: rgba(147, 112, 219, 0.15);
  border-color: rgba(147, 112, 219, 0.3);
}

@media (max-width: 600px) {
  .life-counter {
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.4rem 0.5rem;
  }
  
  .life-counter-main,
  .life-counter-details,
  .next-birthday {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  
  .birth-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .life-counter-actions {
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 0.2rem;
    gap: 10px;
  }
  
  .life-counter-btn .btn-text {
    display: none;
  }
  
  .life-counter-btn {
    padding: 0;
    height: 1.6rem;
    width: 1.6rem;
    min-width: 1.6rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .life-counter-btn .btn-icon {
    font-size: 0.85rem;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }
}

/* Sección "En este día..." - Estilo Violeta */
.on-this-day {
  margin-bottom: 0.5rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(218, 183, 227, 0.3) 0%, rgba(196, 165, 214, 0.3) 100%);
  background-image: url('data:image/svg+xml,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="1.2" fill="%23d4b5e0" opacity="0.2"/><circle cx="22" cy="22" r="0.8" fill="%23c9a8d9" opacity="0.15"/><circle cx="18" cy="22" r="0.8" fill="%23c9a8d9" opacity="0.15"/><circle cx="22" cy="18" r="0.8" fill="%23c9a8d9" opacity="0.15"/><circle cx="18" cy="18" r="0.8" fill="%23c9a8d9" opacity="0.15"/></svg>');
  background-size: 40px 40px;
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(177, 156, 217, 0.2);
  border: 1px solid rgba(218, 112, 214, 0.2);
  animation: slideInDown 0.6s ease-out;
}

.on-this-day-header {
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}

.on-this-day-title {
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  color: #9370db;
  font-weight: 600;
  display: flex;
  align-items: center;
  font-family: "Quicksand", sans-serif;
  gap: 0.3rem;
  opacity: 0.75;
}

.on-this-day-content {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.3rem 0.5rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.on-this-day-content::-webkit-scrollbar {
  display: none;
}

.on-this-day-item {
  flex-shrink: 0;
  width: 100px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(177, 156, 217, 0.25);
  background: linear-gradient(135deg, #c4a5d6 0%, #dab7e3 100%);
  border: 1px solid rgba(218, 112, 214, 0.2);
}

.on-this-day-item:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 4px 16px rgba(177, 156, 217, 0.4), 0 2px 8px rgba(196, 165, 214, 0.3);
  border-color: rgba(218, 112, 214, 0.3);
}

.on-this-day-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.on-this-day-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  padding: 0.3rem;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* Notificación de fotos nuevas */
#new-photos-notification {
  animation: slideInDown 0.3s ease-out;
}
