:root {
  --primary-purple: #9370db;
  --light-purple: #d8bfd8;
  --dark-purple: #8a2be2;
  --accent-violet: #da70d6;
  --accent-lavender: #b19cd9;
  --bg-cream: #f8f4ff;
  --text-dark: #4a4a4a;
  --white: #ffffff;
  --shadow: rgba(138, 43, 226, 0.25);
}

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

body {
  font-family: "Quicksand", sans-serif;
  background: linear-gradient(
    180deg,
    #f8f4ff 0%,
    #f5f8f5 25%,
    #f0f8f0 40%,
    #fff0f5 60%,
    #f5f0f7 100%
  );
  color: var(--text-dark);
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height para móviles */
  width: 100vw;
  position: relative;
  overflow: hidden;
  display: flex;
  margin: 0;
  padding: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20%;
  background: linear-gradient(
    to top,
    rgba(180, 220, 180, 0.25) 0%,
    rgba(180, 220, 180, 0.15) 20%,
    rgba(180, 220, 180, 0.08) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    /* Flores violetas */
    radial-gradient(circle at 15% 20%, rgba(147, 112, 219, 0.2) 0%, transparent 35%),
    radial-gradient(circle at 85% 30%, rgba(218, 112, 214, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 50% 70%, rgba(177, 156, 217, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 25% 80%, rgba(221, 160, 221, 0.19) 0%, transparent 38%),
    radial-gradient(circle at 75% 15%, rgba(147, 112, 219, 0.17) 0%, transparent 32%),
    radial-gradient(circle at 40% 50%, rgba(230, 230, 250, 0.16) 0%, transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(218, 112, 214, 0.2) 0%, transparent 35%),
    radial-gradient(circle at 10% 60%, rgba(177, 156, 217, 0.17) 0%, transparent 37%),
    /* Flores blancas - MUY VISIBLES */
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(255, 255, 255, 0.35) 0%, transparent 30%),
    radial-gradient(ellipse 60% 70% at 70% 60%, rgba(255, 255, 255, 0.32) 0%, transparent 28%),
    radial-gradient(ellipse 65% 55% at 20% 75%, rgba(255, 255, 255, 0.3) 0%, transparent 32%),
    radial-gradient(ellipse 55% 65% at 80% 25%, rgba(255, 255, 255, 0.33) 0%, transparent 29%),
    radial-gradient(ellipse 60% 60% at 45% 15%, rgba(255, 255, 255, 0.31) 0%, transparent 31%),
    radial-gradient(ellipse 70% 50% at 60% 85%, rgba(255, 255, 255, 0.34) 0%, transparent 27%),
    radial-gradient(ellipse 50% 70% at 55% 50%, rgba(255, 255, 255, 0.28) 0%, transparent 33%),
    /* Hojas y elementos verdes - MUY VISIBLES */
    radial-gradient(ellipse 90% 50% at 35% 55%, rgba(180, 220, 180, 0.25) 0%, transparent 40%),
    radial-gradient(ellipse 70% 60% at 65% 45%, rgba(170, 210, 170, 0.22) 0%, transparent 38%),
    radial-gradient(ellipse 80% 45% at 15% 65%, rgba(175, 215, 175, 0.24) 0%, transparent 42%),
    radial-gradient(ellipse 60% 70% at 85% 35%, rgba(185, 225, 185, 0.21) 0%, transparent 36%),
    radial-gradient(ellipse 100% 40% at 50% 25%, rgba(178, 218, 178, 0.23) 0%, transparent 39%),
    radial-gradient(ellipse 50% 80% at 25% 30%, rgba(190, 230, 190, 0.24) 0%, transparent 41%),
    radial-gradient(ellipse 75% 55% at 75% 70%, rgba(182, 222, 182, 0.22) 0%, transparent 37%),
    /* Formas abstractas de jardín - MUY VISIBLES */
    radial-gradient(ellipse 100% 25% at 0% 100%, rgba(180, 220, 180, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse 100% 30% at 100% 100%, rgba(175, 215, 175, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 40% 100% at 0% 50%, rgba(185, 225, 185, 0.25) 0%, transparent 45%),
    radial-gradient(ellipse 45% 100% at 100% 50%, rgba(178, 218, 178, 0.26) 0%, transparent 48%),
    radial-gradient(ellipse 80% 15% at 50% 0%, rgba(190, 230, 190, 0.2) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
  animation: gardenBloom 40s ease-in-out infinite;
}

@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.15;
  pointer-events: none;
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 0;
  filter: blur(0.5px);
  animation: flowerFloat 20s 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(5px, -8px) scale(1.05);
    opacity: 0.18;
  }
  50% {
    transform: translate(-3px, 5px) scale(0.98);
    opacity: 0.12;
  }
  75% {
    transform: translate(8px, 3px) scale(1.02);
    opacity: 0.16;
  }
}

.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(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

.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;
}

/* Milestone badge en calendario - Estilo Violeta */
.milestone-badge {
  animation: bounce 1s ease infinite !important;
  filter: drop-shadow(0 2px 4px rgba(138, 43, 226, 0.4)) !important;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.has-milestone {
  box-shadow: 0 0 15px rgba(196, 165, 214, 0.5), 0 0 25px rgba(218, 112, 214, 0.3) !important;
  border-color: rgba(218, 112, 214, 0.4) !important;
}

/* Highlights Bar */
.highlights-bar {
  margin-bottom: 0.5rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(155, 123, 168, 0.1);
}

.highlights-header {
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}

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

.highlights-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.3rem 0.5rem;
  scroll-behavior: auto; /* Cambiar a auto para control manual */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Ocultar scrollbar en Firefox */
  -ms-overflow-style: none; /* Ocultar scrollbar en IE/Edge */
  cursor: grab;
  user-select: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.highlights-scroll::-webkit-scrollbar {
  display: none; /* Ocultar scrollbar en Chrome/Safari */
}

.highlights-scroll:active {
  cursor: grabbing;
}

.highlight-item {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 6px rgba(155, 123, 168, 0.2);
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f5ebf7 0%, #e8d5f2 100%);
}

.highlight-item:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(155, 123, 168, 0.4);
  z-index: 10;
}

.highlight-item img,
.highlight-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.highlight-item .highlight-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.95) 100%
  );
  border-radius: 14px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 3px 8px rgba(155, 123, 168, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
  font-size: 11px;
  font-weight: 700;
  color: #8a2be2;
  min-width: 36px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(196, 165, 214, 0.3);
  transition: all 0.2s ease;
}

.highlight-item .highlight-badge .flower-number {
  font-size: 12px;
  line-height: 1;
}

.highlight-item .highlight-badge .day-number {
  font-size: 12px;
  line-height: 1;
  color: #8a2be2;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(138, 43, 226, 0.1);
}

.highlight-item:hover .highlight-badge {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(155, 123, 168, 0.3), 0 2px 4px rgba(0, 0, 0, 0.12);
}

.highlight-item .video-icon {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(155, 123, 168, 0.9);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .highlight-item {
    width: 70px;
    height: 70px;
  }

  .highlights-bar {
    padding: 0.4rem;
  }

  .highlights-scroll {
    gap: 0.4rem;
    padding: 0.2rem 0.4rem;
  }
}

/* Auth Section */
.auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.auth-card {
  background: white;
  padding: 3rem;
  border-radius: 30px;
  box-shadow: 0 20px 60px var(--shadow);
  text-align: center;
  max-width: 500px;
  animation: fadeInUp 0.8s ease-out;
}

.auth-card h2 {
  color: var(--dark-purple);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.auth-card p {
  color: var(--text-dark);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-purple) 0%,
    var(--dark-purple) 100%
  );
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px var(--shadow);
  font-family: "Quicksand", sans-serif;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px var(--shadow);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(-1px);
}

.loading-dots::after {
  content: "";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

.btn-icon {
  margin-right: 0.5rem;
}

/* Calendar Section - 70% de atención, más prominente */
.calendar-section {
  background: rgba(255, 255, 255, 0.55);
  position: relative;
  padding: 1rem;
  border-radius: 20px;
  box-shadow: 
    0 12px 40px rgba(147, 112, 219, 0.15),
    0 4px 16px rgba(147, 112, 219, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: fadeInUp 0.8s ease-out;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgba(147, 112, 219, 0.15);
  touch-action: pan-y;
  backdrop-filter: blur(3px);
}


.calendar-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(147, 112, 219, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(218, 112, 214, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  border-radius: 20px;
}

@keyframes gentleSway {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    background-position: 0% 0%, 100% 100%, 50% 50%;
  }
  25% {
    transform: translate(2px, -1px) rotate(0.3deg);
    background-position: 1% 1%, 99% 99%, 51% 49%;
  }
  50% {
    transform: translate(0, 0) rotate(0deg);
    background-position: 0% 0%, 100% 100%, 50% 50%;
  }
  75% {
    transform: translate(-2px, 1px) rotate(-0.3deg);
    background-position: -1% -1%, 101% 101%, 49% 51%;
  }
}

.calendar-section > * {
  position: relative;
  z-index: 1;
}

.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0;
  flex-shrink: 0;
  gap: 0.8rem;
  flex-shrink: 0;
}


.month-title {
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  color: #9370db;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(147, 112, 219, 0.1);
  letter-spacing: 0.3px;
  font-family: "Quicksand", sans-serif;
  line-height: 1.3;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  color: #9370db;
  border: 2px solid rgba(255, 182, 193, 0.3);
  width: clamp(32px, 5.5vw, 42px);
  height: clamp(32px, 5.5vw, 42px);
  border-radius: 50%;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 15px rgba(255, 182, 193, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.nav-btn:hover {
  transform: scale(1.12);
  box-shadow: 
    0 6px 20px rgba(255, 182, 193, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(221, 160, 221, 0.4);
  color: #da70d6;
}

.nav-btn:active {
  transform: scale(1.05);
  box-shadow: 
    0 2px 10px rgba(255, 182, 193, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(0.2rem, 0.5vw, 0.4rem);
  flex: 1;
  overflow: hidden;
  width: 100%;
}

.day-header {
  text-align: center;
  font-weight: 600;
  color: #da70d6;
  padding: clamp(0.2rem, 0.5vw, 0.4rem);
  font-size: clamp(0.75rem, 1.8vw, 0.9rem);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Quicksand", sans-serif;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(2px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: clamp(0.15rem, 0.3vw, 0.3rem);
  min-height: 0;
  animation: fadeInScale 0.5s ease-out backwards;
  overflow: hidden;
  border: 1px solid rgba(255, 182, 193, 0.12);
  box-shadow: 
    0 2px 8px rgba(255, 182, 193, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  contain: layout style paint;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* will-change deshabilitado - puede causar problemas de rendimiento */
/* .calendar-day {
    will-change: transform, opacity;
}

.calendar-day.has-highlight {
    will-change: background-image;
} */

.calendar-day:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 6px 20px rgba(255, 182, 193, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(221, 160, 221, 0.25);
}

.calendar-day.has-photos {
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.2) 0%, rgba(221, 160, 221, 0.2) 100%);
  color: #9370db;
  font-weight: 600;
  box-shadow: 
    0 4px 15px rgba(255, 182, 193, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(221, 160, 221, 0.2);
}

/* Emoji de cámara removido - ya no se muestra */
/* .calendar-day.has-photos::after {
    content: '📸';
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: clamp(0.6rem, 1.2vw, 0.75rem);
    z-index: 2;
} */

.calendar-day.has-highlight {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Asegurar que las fotos/imágenes dentro del calendario sean opacas */
.calendar-day.has-highlight,
.calendar-day.has-highlight img,
.calendar-day.has-highlight video,
.calendar-day img,
.calendar-day video {
  opacity: 1 !important;
}

.highlight-item img,
.highlight-item video {
  opacity: 1 !important;
}

/* Estrellita removida - ya no se muestra */
/* .calendar-day.has-highlight::after {
    content: '⭐';
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.calendar-day.has-highlight.has-video::after {
    content: '🎬';
    font-size: clamp(0.7rem, 1.4vw, 0.85rem);
} */

/* Video de fondo en días */
.calendar-day video {
  pointer-events: none;
}

/* Skeleton loading para días con highlight */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.calendar-day.other-month {
  opacity: 0.3;
  pointer-events: none;
  animation: none !important;
}

.calendar-day.other-month .day-number,
.calendar-day.other-month .photo-count {
  color: #da70d6 !important;
  opacity: 0.4 !important;
}

.calendar-day.today {
  border: 2.5px solid #9370db;
  font-weight: 700;
  box-shadow: 
    0 0 25px rgba(255, 182, 193, 0.3),
    0 4px 15px rgba(221, 160, 221, 0.2),
    inset 0 0 20px rgba(255, 182, 193, 0.1);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  animation: todayPulse 3s ease-in-out infinite;
}

@keyframes todayPulse {
  0%,
  100% {
    box-shadow: 
      0 0 25px rgba(255, 182, 193, 0.4),
      0 4px 15px rgba(221, 160, 221, 0.3),
      inset 0 0 20px rgba(255, 182, 193, 0.15);
  }
  50% {
    box-shadow: 
      0 0 30px rgba(255, 182, 193, 0.5),
      0 6px 20px rgba(221, 160, 221, 0.4),
      inset 0 0 25px rgba(255, 182, 193, 0.2);
  }
}

@keyframes birthdayBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-3px) scale(1.1);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(-2px) scale(1.05);
  }
}

.calendar-day.has-birthday {
  position: relative;
}

.calendar-day.has-birthday .birthday-icon {
  pointer-events: none;
}

.day-number {
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 700;
  font-family: "Quicksand", sans-serif;
  margin-bottom: 0.05rem;
  line-height: 1.2;
  color: inherit;
}

.photo-count {
  font-size: clamp(0.65rem, 1.8vw, 0.85rem);
  line-height: 1.2;
  white-space: nowrap;
  font-weight: 600;
  font-family: "Quicksand", sans-serif;
  color: #9370db;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 2px;
}

.comment-count {
  font-size: clamp(0.6rem, 1.5vw, 0.75rem);
  font-weight: 600;
  color: #da70d6;
  margin-top: 2px;
}

/* Cuando hay highlight, los contadores son blancos */
.calendar-day.has-highlight .photo-count,
.calendar-day.has-highlight .comment-count {
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Gallery Section */
.gallery-section {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height para móviles */
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 2rem;
  /* Animación suave de entrada */
  animation: fadeIn 0.3s ease-out;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;
  /* Optimizaciones para scroll suave en móvil */
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.gallery-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  z-index: 1002; /* Por encima del panel de comentarios para que el botón de cerrar sea siempre visible */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease; /* Transición suave cuando se ajusta */
}

/* Ajustar header cuando los comentarios están abiertos */
body.comments-open .gallery-header {
  right: 400px; /* Dejar espacio para el panel de comentarios */
}

@media (max-width: 768px) {
  body.comments-open .gallery-header {
    right: 0; /* En móvil, el header puede quedar tapado */
  }
}

.gallery-header h2 {
  font-size: 2rem;
  color: var(--accent-pink);
}

.close-btn {
  background: var(--accent-pink);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

.close-btn:hover {
  transform: rotate(90deg) scale(1.1);
  background: var(--dark-purple);
  box-shadow: 0 5px 15px rgba(177, 156, 217, 0.4);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 80px;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(177, 156, 217, 0.25);
  /* Transición optimizada - solo transform y opacity */
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  position: relative;
  min-height: 200px;
  border: 1px solid rgba(218, 112, 214, 0.1);
  /* Optimización GPU */
  will-change: transform;
  transform: translateZ(0);
  /* Visibilidad automática para elementos fuera de vista */
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}

/* Botones de acción - Tema unificado violeta pastel */
.highlight-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 244, 255, 0.95) 100%);
  border: 2px solid rgba(147, 112, 219, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(147, 112, 219, 0.15);
}

.highlight-btn:hover {
  transform: scale(1.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 244, 255, 1) 100%);
  border-color: rgba(147, 112, 219, 0.5);
  box-shadow: 0 6px 20px rgba(147, 112, 219, 0.3);
}

.highlight-btn:active {
  transform: scale(0.95);
}

.highlight-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Contenedor de botones en el modal */
.modal-action-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.modal-highlight-btn,
.modal-date-btn {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  width: 42px !important;
  height: 42px !important;
  font-size: 1.3rem !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 244, 255, 0.98) 100%) !important;
  border: 2px solid rgba(147, 112, 219, 0.4) !important;
  box-shadow: 0 4px 12px rgba(147, 112, 219, 0.25) !important;
  border-radius: 50% !important;
  backdrop-filter: blur(8px) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.modal-highlight-btn:hover,
.modal-date-btn:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 6px 20px rgba(147, 112, 219, 0.35) !important;
  border-color: rgba(147, 112, 219, 0.6) !important;
}

/* 📅 Date button - Tema unificado violeta pastel */
.gallery-item .date-btn,
.date-btn {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  bottom: auto !important;
  right: auto !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 244, 255, 0.95) 100%) !important;
  border: 2px solid rgba(218, 112, 214, 0.3) !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 8px rgba(218, 112, 214, 0.15) !important;
  backdrop-filter: blur(8px) !important;
}

.date-btn:hover {
  transform: scale(1.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 244, 255, 1) 100%);
  border-color: rgba(218, 112, 214, 0.5);
  box-shadow: 0 6px 20px rgba(218, 112, 214, 0.3);
}

.date-btn:active {
  transform: scale(0.95);
  transition: all 0.1s ease;
}

.date-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Modal date button hover - ya definido arriba con .modal-highlight-btn */

/* Pulsing animation for date button */
@keyframes pulse-date {
  0% {
    box-shadow: 
      0 4px 15px rgba(218, 112, 214, 0.3),
      0 1px 3px rgba(147, 112, 219, 0.1);
  }
  50% {
    box-shadow: 
      0 6px 20px rgba(218, 112, 214, 0.5),
      0 2px 6px rgba(147, 112, 219, 0.2);
  }
  100% {
    box-shadow: 
      0 4px 15px rgba(218, 112, 214, 0.3),
      0 1px 3px rgba(147, 112, 219, 0.1);
  }
}

/* Optional: Add subtle pulse on load */
.date-btn.show-hint {
  animation: pulse-date 2s ease-in-out infinite;
}

/* 📅 Date Picker Modal - Modern Design */
.date-picker-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(10px) !important;
  z-index: 999999 !important; /* 🔥 MÁXIMO z-index con !important para forzar */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 15px; /* Padding para móviles */
  overflow-y: auto; /* Permitir scroll en móvil */
}

.date-picker-modal:not(.hidden) {
  opacity: 1 !important;
  pointer-events: all !important;
}

.date-picker-content {
  position: relative !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-radius: 20px !important;
  padding: 0 !important;
  max-width: 420px !important;
  width: calc(100% - 30px) !important; /* Más espacio en los lados en móvil */
  max-height: 85vh !important; /* Limitar altura en pantallas pequeñas */
  overflow-y: auto !important; /* Scroll si el contenido es muy alto */
  z-index: 1000000 !important; /* 🔥 SUPER z-index para estar arriba de TODO */
  box-shadow: 
    0 20px 60px rgba(102, 126, 234, 0.8),
    0 10px 30px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.2) !important; /* Borde sutil */
  transform: scale(0.85) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  margin: auto; /* Centrar */
}

.date-picker-modal:not(.hidden) .date-picker-content {
  transform: scale(1) translateY(0);
}

.date-picker-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.date-picker-content .modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.date-picker-content .modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.date-picker-header {
  padding: 30px 20px 15px;
  text-align: center;
  color: white;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
}

.date-picker-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.4));
  animation: float 3s ease-in-out infinite;
  line-height: 1;
}

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

.date-picker-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
}

.date-picker-description {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 20px 15px;
  font-size: 0.95rem;
  text-align: center;
}

.date-picker-current {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  margin: 0 15px 20px;
  padding: 12px 15px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.date-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

.date-display {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.date-input {
  width: calc(100% - 30px);
  margin: 0 15px 20px;
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.98);
  color: #333;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.date-input:hover {
  background: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.date-input:focus {
  outline: none;
  border-color: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
  background: white;
}

.date-picker-actions {
  display: flex;
  gap: 10px;
  padding: 0 15px 28px;
}

.date-picker-actions button {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  letter-spacing: 0.3px;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-confirm {
  background: white;
  color: #667eea;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-confirm:active,
.btn-cancel:active {
  transform: translateY(0);
}

/* Loading state for confirm button */
.btn-confirm:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-confirm:disabled::after {
  content: ' ⏳';
}

/* 📱 Responsive para móviles */
@media (max-width: 768px) {
  .date-picker-content {
    max-width: 95%;
    border-radius: 20px;
  }

  .date-picker-header {
    padding: 35px 25px 15px;
  }

  .date-picker-icon {
    font-size: 3.5rem;
  }

  .date-picker-header h2 {
    font-size: 1.75rem;
  }

  .date-picker-description {
    font-size: 0.9rem;
    margin: 0 25px 15px;
  }

  .date-picker-current {
    margin: 0 15px 20px;
    padding: 12px 15px;
  }

  .date-input {
    width: calc(100% - 30px);
    margin: 0 15px 20px;
    padding: 14px 16px;
    font-size: 1rem;
  }

  .date-picker-actions {
    padding: 0 15px 30px;
    gap: 10px;
  }

  .date-picker-actions button {
    padding: 14px 18px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .date-picker-content {
    max-width: 98%;
    border-radius: 18px;
  }

  .date-picker-header {
    padding: 30px 20px 12px;
  }

  .date-picker-icon {
    font-size: 3rem;
    margin-bottom: 10px;
  }

  .date-picker-header h2 {
    font-size: 1.5rem;
  }

  .date-picker-description {
    font-size: 0.85rem;
    margin: 0 20px 12px;
  }

  .date-picker-current {
    margin: 0 12px 18px;
    padding: 10px 12px;
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }

  .date-input {
    width: calc(100% - 24px);
    margin: 0 12px 18px;
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .date-picker-actions {
    padding: 0 12px 25px;
    gap: 8px;
  }

  .date-picker-actions button {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 6px 20px rgba(177, 156, 217, 0.35);
}

/* Desactivar hover en móvil para mejor rendimiento */
@media (hover: none) {
  .gallery-item:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(177, 156, 217, 0.25);
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Loading */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 248, 243, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(10px);
}

.loading p {
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--dark-purple);
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid var(--light-purple);
  border-top-color: var(--dark-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-calendar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.loading-calendar .spinner {
  width: 80px;
  height: 80px;
  border-width: 8px;
}

/* Flower Loading Animation */
.flower-loader {
  width: 60px;
  height: 60px;
  position: relative;
  animation: bloom 2s ease-in-out infinite;
}

.flower-loader::before,
.flower-loader::after {
  content: "🌸";
  position: absolute;
  font-size: 2.5rem;
  animation: spin 3s linear infinite;
}

.flower-loader::after {
  animation: spin 3s linear infinite reverse;
  opacity: 0.7;
}

@keyframes bloom {
  0%,
  100% {
    transform: scale(1);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: scale(1.2);
    filter: hue-rotate(30deg);
  }
}

/* Image Placeholder with Flower */
.image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(
    135deg,
    var(--light-purple) 0%,
    var(--accent-lavender) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.image-placeholder::before {
  content: "🌸";
  font-size: 3rem;
  animation: bloom 2s ease-in-out infinite;
  filter: grayscale(0%) hue-rotate(280deg);
}

.image-placeholder::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.loading p {
  font-size: 1.2rem;
  color: var(--dark-purple);
  font-weight: 600;
}

/* Media Modal */
.media-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000000;
  z-index: 1000; /* 🔥 Reducido para asegurar que date-picker (9999) esté siempre encima */
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
  overscroll-behavior-y: none;
  overflow: hidden;
  touch-action: pan-x pinch-zoom;
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(196, 165, 214, 0.9);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3002;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.15);
  background: rgba(177, 156, 217, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(196, 165, 214, 0.8);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3002;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-nav:hover {
  background: rgba(177, 156, 217, 1);
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

.modal-content {
  width: 80%;
  height: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  touch-action: pan-y; /* Permite swipe horizontal */
}

.modal-media-container {
  width: 100%;
  height: calc(100% - 80px);
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
  background: #000000;
  touch-action: none; /* Permite zoom y pan personalizado */
}

.modal-media-container img,
.modal-media-container video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  z-index: 10;
  will-change: transform; /* Optimización para animaciones de zoom */
}

/* Cuando la imagen está zoomed, permitir overflow */
.modal-media-container img[style*="scale"] {
  cursor: grab;
}

.modal-media-container img[style*="scale"]:active {
  cursor: grabbing;
}

/* Botón de reset zoom - Tema violeta pastel */
.zoom-reset-button {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(147, 112, 219, 0.4);
  background: rgba(255, 255, 255, 0.95);
  color: #9370db;
  cursor: pointer;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.zoom-reset-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  border-color: rgba(147, 112, 219, 0.6);
  box-shadow: 0 6px 20px rgba(147, 112, 219, 0.3), 0 3px 10px rgba(147, 112, 219, 0.2);
}

.zoom-reset-button:active {
  transform: scale(0.95);
}

.zoom-reset-button svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

@media (max-width: 768px) {
  .zoom-reset-button {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  
  .zoom-reset-button svg {
    width: 18px;
    height: 18px;
  }
}

/* Loading indicators siempre detrás del video */
.modal-media-container > div:not(#modal-video-player) {
  z-index: 1 !important;
}

#modal-video-player {
  z-index: 100 !important;
}

.modal-info {
  text-align: center;
  color: white;
  background: linear-gradient(
    135deg,
    rgba(196, 165, 214, 0.4) 0%,
    rgba(218, 183, 227, 0.4) 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="%23ffffff" opacity="0.15"/><circle cx="22" cy="22" r="0.8" fill="%23ffffff" opacity="0.1"/><circle cx="18" cy="22" r="0.8" fill="%23ffffff" opacity="0.1"/><circle cx="22" cy="18" r="0.8" fill="%23ffffff" opacity="0.1"/><circle cx="18" cy="18" r="0.8" fill="%23ffffff" opacity="0.1"/></svg>'),
    linear-gradient(
      135deg,
      rgba(196, 165, 214, 0.4) 0%,
      rgba(218, 183, 227, 0.4) 100%
    );
  background-size: 40px 40px, 100% 100%;
  background-position: center, 0 0;
  background-repeat: repeat, no-repeat;
  padding: 15px 30px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-info h3 {
  font-size: 1.2rem;
  margin: 0 0 5px 0;
  color: #f3eaf5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-info p {
  font-size: 0.9rem;
  margin: 0;
  color: #e6d9f5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Cuando el modal está abierto, prevenir pull-to-refresh */
body.modal-open {
  overscroll-behavior-y: none !important;
  touch-action: pan-x pinch-zoom !important;
  overflow: hidden !important;
}

html:has(body.modal-open) {
  overscroll-behavior-y: none !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Animación simplificada sin transformaciones costosas */
@keyframes fadeInSimple {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0.3rem;
  }

  header {
    margin-bottom: 0.3rem;
  }

  .calendar-section {
    padding: 0.5rem;
    border-radius: 12px;
  }

  .calendar-header {
    margin-bottom: 0.3rem;
  }

  .calendar-grid {
    gap: 0.2rem;
  }

  .calendar-day {
    padding: 0.1rem;
    border-radius: 6px;
  }

  .calendar-day.has-photos::after {
    bottom: 1px;
    right: 1px;
  }

  .gallery-section {
    padding: 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
    padding-top: 70px;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .gallery-header {
    padding: 0.75rem;
    padding-top: max(0.75rem, env(safe-area-inset-top));
  }

  .gallery-header h2 {
    font-size: 1.3rem;
  }

  .close-btn {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }

  .flower-decoration {
    width: 60px;
    height: 60px;
    opacity: 0.08;
  }

  /* Modal responsive */
  .modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .modal-nav {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .modal-prev {
    left: 10px;
  }

  .modal-next {
    right: 10px;
  }

  .modal-content {
    width: 90%;
    height: 90%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.2rem;
  }

  .calendar-section {
    padding: 0.4rem;
  }

  .gallery-section {
    padding: 0.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    padding-top: 65px;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }

  .gallery-header {
    padding: 0.5rem;
    padding-top: max(0.5rem, env(safe-area-inset-top));
  }

  .gallery-header h2 {
    font-size: 0.9rem;
  }

  .close-btn {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  /* Modal extra small */
  .modal-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .modal-close {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }
}

/* ============================================================================
   SISTEMA DE COMENTARIOS
   ============================================================================ */

.comments-section {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px; /* Ancho fijo en lugar de 100% */
  max-width: 100%; /* En móvil puede ser 100% */
  height: 100vh;
  background: var(--bg-cream);
  box-shadow: -4px 0 20px rgba(138, 43, 226, 0.2);
  z-index: 1001; /* Por encima de la galería pero debajo del header */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.comments-section:not(.hidden) {
  transform: translateX(0);
}

/* Ajustar galería cuando los comentarios están abiertos */
body.comments-open .gallery-section {
  padding-right: 400px; /* Espacio para los comentarios */
  transition: padding-right 0.3s ease;
}

@media (max-width: 768px) {
  body.comments-open .gallery-section {
    padding-right: 0; /* En móvil, los comentarios pueden tapar */
    padding-bottom: 40vh; /* Espacio para los comentarios en la parte inferior - ajustado para ver más */
    /* Asegurar que la galería sea scrolleable */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comments-section {
    max-width: 100%;
    width: 100%;
    height: 40vh; /* Aumentado para que quepa al menos un comentario completo */
    max-height: 40vh; /* Limitar altura máxima */
    top: auto; /* No fijar desde arriba */
    bottom: 0; /* Fijar desde abajo */
    right: 0;
    left: 0;
    transform: translateY(100%); /* Ocultar inicialmente deslizando hacia abajo */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(138, 43, 226, 0.3);
    z-index: 1002;
    transition: transform 0.3s ease, height 0.3s ease;
  }

  .comments-section:not(.hidden) {
    transform: translateY(0); /* Mostrar deslizando hacia arriba */
  }

  /* Indicador visual de que se puede arrastrar (handle) */
  .comments-section::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(138, 43, 226, 0.3);
    border-radius: 2px;
  }

  /* Cuando se está escribiendo un comentario, cubrir toda la pantalla */
  .comments-section.writing {
    height: 100vh;
    height: 100dvh;
    top: 0;
    bottom: auto;
    border-radius: 0;
    z-index: 1003; /* Por encima de todo cuando se está escribiendo */
  }

  body.comments-open.comments-writing .gallery-section {
    padding-bottom: 0; /* No dejar espacio cuando se está escribiendo */
  }

  /* Cuando el formulario está expandido en móvil, ocupar toda la pantalla */
  .comments-section.form-expanded {
    height: 100vh !important;
    height: 100dvh !important;
    top: 0 !important;
    bottom: auto !important;
    border-radius: 0 !important;
    z-index: 1003 !important;
  }

  body.comment-form-expanded .gallery-section {
    padding-bottom: 0 !important;
  }

  /* Ocultar formulario completo en móvil por defecto */
  .comment-form {
    display: none;
  }

  .comment-form-fullscreen {
    display: flex;
    flex-direction: column;
  }

  .comment-form-fullscreen:not(.hidden) .comment-form {
    display: flex;
  }

  /* Botón para abrir formulario en móvil */
  .comment-add-btn-mobile,
  .comment-login-btn-mobile {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-violet));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: "Quicksand", sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .comment-add-btn-mobile:hover,
  .comment-login-btn-mobile:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.3);
  }

  /* Formulario fullscreen en móvil */
  .comment-form-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-cream);
    z-index: 1004;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .comment-form-fullscreen.hidden {
    display: none;
  }

  .comment-form-header-mobile {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-violet));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
  }

  .comment-form-header-mobile h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
  }

  .close-form-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
  }

  .close-form-btn:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  .comment-form-fullscreen .comment-form {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .comment-form-fullscreen .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .comment-form-fullscreen .form-group label {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 500;
  }

  .comment-form-fullscreen .comment-input,
  .comment-form-fullscreen .comment-textarea {
    padding: 10px;
    border: 2px solid rgba(138, 43, 226, 0.2);
    border-radius: 8px;
    font-family: "Quicksand", sans-serif;
    font-size: 0.9rem;
  }

  .comment-form-fullscreen .comment-textarea {
    min-height: 120px;
    resize: vertical;
  }

  .comment-form-fullscreen .comment-submit-btn {
    padding: 12px 20px;
    font-size: 1rem;
    margin-top: 8px;
  }

  /* Reducir tamaños de fuente en móvil para mejor legibilidad */
  .comments-header {
    padding: 6px 8px;
    flex-shrink: 0; /* No se comprima */
    min-height: auto;
  }

  .comments-header h3 {
    font-size: 0.7rem;
  }

  .close-btn-small {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }

  .comments-list {
    padding: 8px 10px;
    padding-bottom: 4px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0; /* Permite que el scroll funcione */
  }

  .comment-item {
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 6px;
  }

  .comment-author-avatar {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 50%;
  }

  .comment-author-info strong {
    font-size: 0.7rem;
  }

  .comment-date {
    font-size: 0.6rem;
  }

  .comment-title {
    font-size: 0.75rem;
    margin-bottom: 3px;
    font-weight: 600;
    line-height: 1.2;
  }

  .comment-text {
    font-size: 0.7rem;
    line-height: 1.25;
    margin-bottom: 6px;
  }

  .comment-author {
    padding-top: 4px;
    gap: 4px;
  }

  .comment-actions {
    gap: 3px;
  }

  .comment-edit-btn,
  .comment-delete-btn {
    font-size: 12px;
    padding: 2px 4px;
  }

  .comments-form-container {
    padding: 6px 8px;
    flex-shrink: 0; /* No se comprima */
    border-top: 1px solid rgba(138, 43, 226, 0.1);
    max-height: 15vh; /* Limitar altura máxima al 15% del viewport */
    overflow-y: auto;
  }

  .comment-form {
    gap: 4px;
  }

  .form-group {
    gap: 1px;
    margin-bottom: 0;
  }

  .form-group label {
    font-size: 0.6rem;
    margin-bottom: 0;
  }

  .comment-input,
  .comment-textarea {
    padding: 4px;
    font-size: 0.65rem;
    border-width: 1px;
  }

  .comment-textarea {
    min-height: 35px;
    max-height: 50px;
    rows: 2;
  }

  .comment-submit-btn {
    padding: 4px 10px;
    font-size: 0.7rem;
    margin-top: 2px;
  }

  .comment-login-prompt {
    padding: 6px 8px;
  }

  .comment-login-prompt p {
    font-size: 0.65rem;
    margin-bottom: 4px;
    line-height: 1.2;
  }

  .comment-login-btn {
    padding: 4px 10px;
    font-size: 0.65rem;
  }

  .comments-loading-text {
    font-size: 11px;
  }

  .comments-loading-subtext {
    font-size: 10px;
  }

  .comments-loading-spinner {
    width: 35px;
    height: 35px;
    border-width: 2px;
    margin-bottom: 10px;
  }
}

.comments-header {
  padding: 20px;
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--accent-violet)
  );
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(138, 43, 226, 0.3);
}

.comments-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.close-btn-small {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.close-btn-small:hover {
  background: rgba(255, 255, 255, 0.3);
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 10px;
}

/* Loading state para comentarios */
.comments-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--primary-purple);
}

.comments-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-purple);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.comments-loading-text {
  font-size: 16px;
  color: var(--primary-purple);
  font-weight: 500;
  margin-bottom: 8px;
}

.comments-loading-subtext {
  font-size: 13px;
  color: var(--accent-lavender);
  opacity: 0.8;
}

/* Loading state para envío de comentario */
.comment-submit-loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.comment-submit-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.comment-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(138, 43, 226, 0.1);
  border: 1px solid rgba(138, 43, 226, 0.1);
}

.comment-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-purple);
  margin: 0 0 10px 0;
}

.comment-text {
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.comment-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.comment-edit-btn,
.comment-delete-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.2s;
  opacity: 0.7;
}

.comment-edit-btn:hover,
.comment-delete-btn:hover {
  background: rgba(138, 43, 226, 0.1);
  opacity: 1;
  transform: scale(1.1);
}

.comment-delete-btn:hover {
  background: rgba(255, 107, 157, 0.1);
}

.comment-item-new {
  animation: slideInFromTop 0.3s ease-out;
}

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

.comment-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.comment-author-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-author-info strong {
  color: var(--primary-purple);
  font-size: 0.9rem;
}

.comment-date {
  color: #888;
  font-size: 0.8rem;
}

/* Footer del comentario con autor y likes */
.comment-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(138, 43, 226, 0.1);
}

/* Likes de comentarios */
.comment-likes {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 42px; /* Alinear con el texto del autor (32px avatar + 10px gap) */
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 182, 193, 0.2);
  border: 1px solid rgba(255, 182, 193, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.like-btn:hover {
  background: rgba(255, 182, 193, 0.4);
  transform: scale(1.05);
}

.like-btn.liked {
  background: rgba(255, 105, 180, 0.2);
  border-color: rgba(255, 105, 180, 0.4);
}

.like-btn.liked:hover {
  background: rgba(255, 105, 180, 0.3);
}

.like-icon {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.like-count {
  font-size: 0.8rem;
  color: #9370db;
  font-weight: 600;
  min-width: 8px;
}

.like-names {
  font-size: 0.75rem;
  color: #888;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .comment-likes {
    padding-left: 24px;
  }
  
  .like-btn {
    padding: 3px 8px;
    font-size: 0.8rem;
  }
  
  .like-names {
    display: none;
  }
}

.comments-form-container {
  padding: 20px;
  background: white;
  border-top: 2px solid rgba(138, 43, 226, 0.1);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
}

.comment-input,
.comment-textarea {
  padding: 10px;
  border: 2px solid rgba(138, 43, 226, 0.2);
  border-radius: 8px;
  font-family: "Quicksand", sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.comment-input:focus,
.comment-textarea:focus {
  outline: none;
  border-color: var(--primary-purple);
}

.comment-textarea {
  resize: vertical;
  min-height: 80px;
}

.comment-submit-btn {
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--accent-violet)
  );
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: "Quicksand", sans-serif;
}

.comment-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
}

.comment-submit-btn:active {
  transform: translateY(0);
}

.comment-login-prompt {
  text-align: center;
  padding: 20px;
  color: var(--text-dark);
}

.comment-login-prompt p {
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.comment-login-btn {
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--accent-violet)
  );
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  font-family: "Quicksand", sans-serif;
}

.comment-login-btn:hover {
  transform: translateY(-2px);
}

.comments-toggle-btn {
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--accent-violet)
  );
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: "Quicksand", sans-serif;
}

.comments-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
}

/* ============================================================================
   LOGIN MODAL Y BOTÓN FLOTANTE
   ============================================================================ */

.login-button-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: none; /* Oculto por defecto */
}

.login-button-container-header {
  display: none; /* Oculto por defecto */
}

/* Mostrar botón siempre cuando hay usuario autenticado */
.login-button-container.has-user,
.login-button-container-header.has-user {
  display: block;
}

/* Mostrar botón de login cuando la caja de comentarios está abierta (para usuarios no autenticados) */
body.comments-open .login-button-container,
body.comments-open .login-button-container-header {
  display: block;
}

.login-button {
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--accent-violet)
  );
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: "Quicksand", sans-serif;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.5);
}

/* Botón de login en el header - versión discreta */
.login-button-container-header .login-button {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: #9370db;
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 182, 193, 0.15);
  box-shadow: 
    0 1px 4px rgba(255, 182, 193, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-weight: 500;
  transition: all 0.2s ease;
}

.login-button-container-header .login-button:hover {
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 
    0 2px 6px rgba(255, 182, 193, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: none;
  border-color: rgba(221, 160, 221, 0.2);
}

.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #ffeef8 0%,
    #f8f4ff 50%,
    #fff0f5 100%
  );
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}

.login-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(221, 160, 221, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(230, 230, 250, 0.3) 0%, transparent 50%);
  animation: backgroundPulse 20s ease-in-out infinite;
}

.login-modal::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    linear-gradient(45deg, transparent 30%, rgba(255, 192, 203, 0.1) 50%, transparent 70%),
    linear-gradient(-45deg, transparent 30%, rgba(221, 160, 221, 0.1) 50%, transparent 70%);
  animation: backgroundRotate 30s linear infinite;
}

@keyframes backgroundPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes backgroundRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.login-modal:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

.login-required .container,
.login-required .gallery-section,
.login-required .media-modal {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.3;
}

.login-modal-content {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 182, 193, 0.3);
  border-radius: 30px;
  padding: 50px 40px;
  max-width: 450px;
  width: 90%;
  box-shadow: 
    0 20px 60px rgba(255, 182, 193, 0.3),
    0 8px 25px rgba(221, 160, 221, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  text-align: center;
  overflow: hidden;
  animation: loginModalAppear 0.5s ease-out;
  z-index: 2;
}

@keyframes loginModalAppear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.violet-flowers-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.violet-flower-bg {
  position: absolute;
  font-size: 4rem;
  opacity: 0.15;
  animation: flowerFloat 20s ease-in-out infinite;
  filter: blur(1px);
}

.flower-1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.flower-2 {
  top: 20%;
  right: 8%;
  animation-delay: 3s;
  font-size: 3.5rem;
}

.flower-3 {
  top: 60%;
  left: 3%;
  animation-delay: 6s;
  font-size: 5rem;
}

.flower-4 {
  bottom: 15%;
  right: 5%;
  animation-delay: 9s;
  font-size: 4.5rem;
}

.flower-5 {
  top: 40%;
  left: 50%;
  animation-delay: 12s;
  font-size: 3rem;
}

.flower-6 {
  bottom: 30%;
  left: 20%;
  animation-delay: 15s;
  font-size: 4rem;
}

@keyframes flowerFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.15;
  }
  25% {
    transform: translate(20px, -30px) rotate(10deg) scale(1.1);
    opacity: 0.2;
  }
  50% {
    transform: translate(-15px, 20px) rotate(-10deg) scale(0.9);
    opacity: 0.12;
  }
  75% {
    transform: translate(25px, 15px) rotate(5deg) scale(1.05);
    opacity: 0.18;
  }
}

.login-modal-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: shapeFloat 15s ease-in-out infinite;
}

.bg-shape-1 {
  width: 500px;
  height: 500px;
  background: rgba(255, 182, 193, 0.4);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.bg-shape-2 {
  width: 400px;
  height: 400px;
  background: rgba(221, 160, 221, 0.35);
  bottom: -150px;
  right: -150px;
  animation-delay: 3s;
}

.bg-shape-3 {
  width: 350px;
  height: 350px;
  background: rgba(230, 230, 250, 0.4);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 6s;
}

.bg-shape-4 {
  width: 300px;
  height: 300px;
  background: rgba(255, 192, 203, 0.3);
  top: 20%;
  right: 10%;
  animation-delay: 9s;
}

@keyframes shapeFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.login-modal-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.geometric-shape {
  position: absolute;
  border: 2px solid;
  opacity: 0.08;
  animation: geometricFloat 12s ease-in-out infinite;
}

.shape-1 {
  width: 120px;
  height: 120px;
  border-color: rgba(255, 182, 193, 0.3);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 80px;
  height: 80px;
  border-color: rgba(221, 160, 221, 0.3);
  border-radius: 50%;
  border-width: 3px;
  bottom: 15%;
  left: 15%;
  animation-delay: 4s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  border-color: rgba(230, 230, 250, 0.3);
  border-radius: 20px;
  transform: rotate(45deg);
  top: 60%;
  right: 20%;
  animation-delay: 8s;
}

@keyframes geometricFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(20px, -20px) rotate(180deg);
  }
}

.login-modal-header {
  margin-bottom: 25px;
}

.login-modal-content h2 {
  color: #9370db;
  margin-bottom: 10px;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: "Quicksand", sans-serif;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(147, 112, 219, 0.1);
}

.login-subtitle {
  color: #da70d6;
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 8px;
  font-family: "Quicksand", sans-serif;
}

.login-modal-content p {
  color: #8b7d8b;
  margin-bottom: 30px;
  line-height: 1.7;
  font-size: 1rem;
  font-family: "Quicksand", sans-serif;
}

.google-login-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 240, 245, 0.95) 100%
  );
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 182, 193, 0.4);
  padding: 15px 28px;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  transition: all 0.3s ease;
  font-family: "Quicksand", sans-serif;
  color: #dda0dd;
  box-shadow: 
    0 4px 15px rgba(255, 182, 193, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}

.google-login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 182, 193, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.google-login-btn:hover::before {
  left: 100%;
}

.google-login-btn:hover {
  border-color: rgba(221, 160, 221, 0.6);
  box-shadow: 
    0 8px 30px rgba(255, 182, 193, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 240, 245, 1) 100%
  );
  color: #da70d6;
}

.google-login-btn:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 10px rgba(255, 182, 193, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-status {
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.login-status.error {
  background: #fee;
  color: #c33;
}

.login-status.success {
  background: #efe;
  color: #3c3;
}

/* Botón flotante comparador de crecimiento - Estilo Violeta */
.growth-compare-fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c4a5d6 0%, #dab7e3 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="%23ffffff" opacity="0.3"/><circle cx="22" cy="22" r="0.8" fill="%23ffffff" opacity="0.2"/><circle cx="18" cy="22" r="0.8" fill="%23ffffff" opacity="0.2"/><circle cx="22" cy="18" r="0.8" fill="%23ffffff" opacity="0.2"/><circle cx="18" cy="18" r="0.8" fill="%23ffffff" opacity="0.2"/></svg>');
  background-size: 40px 40px;
  background-position: center;
  color: #8a2be2;
  font-size: 1.5rem;
  border: 2px solid rgba(218, 112, 214, 0.3);
  box-shadow: 0 4px 12px rgba(177, 156, 217, 0.35), 0 2px 6px rgba(196, 165, 214, 0.25);
  cursor: pointer;
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.growth-compare-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(177, 156, 217, 0.5), 0 3px 10px rgba(196, 165, 214, 0.35);
  background: linear-gradient(135deg, #dec9e8 0%, #d0b3e0 100%);
  border-color: rgba(218, 112, 214, 0.4);
}

.growth-compare-fab:active {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(177, 156, 217, 0.4);
}

/* Botón de crecimiento en el header */
.growth-compare-btn-header {
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  color: #9370db;
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  border: 1px solid rgba(255, 182, 193, 0.2);
  box-shadow: 
    0 2px 8px rgba(255, 182, 193, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  font-family: "Quicksand", sans-serif;
  white-space: nowrap;
}

.growth-btn-icon {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  line-height: 1;
}

.growth-btn-text {
  line-height: 1;
}

.growth-compare-btn-header:hover {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 
    0 4px 12px rgba(255, 182, 193, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(221, 160, 221, 0.3);
}

.growth-compare-btn-header:active {
  transform: scale(0.98);
  box-shadow: 
    0 1px 6px rgba(255, 182, 193, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Modal comparador de crecimiento - Estilo Violeta */
.growth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 247, 251, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.growth-modal-content {
  background: linear-gradient(135deg, #faf7fb 0%, #f5f0f7 100%);
  background-image: url('data:image/svg+xml,<svg width="50" height="50" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="1.5" fill="%23d4b5e0" opacity="0.2"/><circle cx="10.5" cy="10.5" r="1" fill="%23c9a8d9" opacity="0.15"/><circle cx="5.5" cy="10.5" r="1" fill="%23c9a8d9" opacity="0.15"/><circle cx="10.5" cy="5.5" r="1" fill="%23c9a8d9" opacity="0.15"/><circle cx="5.5" cy="5.5" r="1" fill="%23c9a8d9" opacity="0.15"/></svg>');
  background-size: 50px 50px;
  border-radius: 24px;
  max-width: 1400px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(177, 156, 217, 0.3), 0 8px 24px rgba(196, 165, 214, 0.2);
  border: 1px solid rgba(218, 112, 214, 0.2);
  overflow: hidden;
}

.growth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(218, 112, 214, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 247, 251, 0.98) 100%);
  flex-shrink: 0;
}

.growth-modal-header h2 {
  margin: 0;
  color: #8a2be2;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.growth-modal-header .modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(218, 112, 214, 0.1);
  color: #8a2be2;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 300;
  line-height: 1;
}

.growth-modal-header .modal-close:hover {
  background: rgba(218, 112, 214, 0.2);
  transform: scale(1.1);
}

.growth-modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.growth-controls {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(218, 112, 214, 0.1);
}

.growth-controls label {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-weight: 600;
  color: #8a2be2;
  font-size: 0.95rem;
}

.growth-controls select {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(218, 112, 214, 0.25);
  background: white;
  font-size: 1rem;
  font-family: "Quicksand", sans-serif;
  cursor: pointer;
  color: #8a2be2;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238a2be2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  font-weight: 500;
}

.growth-controls select:hover {
  border-color: rgba(218, 112, 214, 0.4);
  box-shadow: 0 2px 8px rgba(177, 156, 217, 0.15);
}

.growth-controls select:focus {
  outline: none;
  border-color: rgba(138, 43, 226, 0.5);
  box-shadow: 0 0 0 3px rgba(177, 156, 217, 0.15);
}

.growth-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.growth-comparison-item {
  background: white;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 2px 12px rgba(177, 156, 217, 0.15), 0 1px 4px rgba(196, 165, 214, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(218, 112, 214, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.growth-comparison-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(177, 156, 217, 0.25), 0 4px 12px rgba(196, 165, 214, 0.15);
  border-color: rgba(218, 112, 214, 0.25);
}

/* Estilo especial para fotos destacadas - Estilo Violeta */
.growth-comparison-item.is-highlighted {
  border: 2px solid #c4a5d6;
  box-shadow: 0 4px 16px rgba(196, 165, 214, 0.25), 0 0 20px rgba(218, 112, 214, 0.15);
}

.growth-comparison-item.is-highlighted:hover {
  box-shadow: 0 8px 28px rgba(196, 165, 214, 0.35), 0 0 30px rgba(218, 112, 214, 0.25);
  border-color: #dab7e3;
}

/* Badge de destacada - Estilo Violeta */
.growth-highlight-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(138, 43, 226, 0.25);
  animation: pulse 2s ease-in-out infinite;
}

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

.growth-comparison-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #f3eaf5 0%, #ede3f0 100%);
}

.growth-comparison-item-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.growth-comparison-label {
  text-align: center;
  font-weight: 600;
  color: #8a2be2;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.growth-comparison-age {
  text-align: center;
  font-size: 0.85rem;
  color: #a98bb5;
  font-weight: 500;
  margin: 0;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .comments-section {
    max-width: 100%;
  }

  .login-button-container {
    bottom: 15px;
    right: 15px;
  }

  .login-button {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .login-button-container-header .login-button {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .growth-compare-fab {
    bottom: 70px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .growth-compare-btn-header {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  .growth-btn-icon {
    font-size: 0.85rem;
  }

  .growth-btn-text {
    display: none; /* Ocultar texto en móvil, solo mostrar icono */
  }

  .calendar-header {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .calendar-header-right {
    gap: 0.3rem;
  }

  .growth-modal {
    padding: 0;
  }

  .growth-modal-content {
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
  }

  .growth-modal-header {
    padding: 20px;
    border-radius: 0;
  }

  .growth-modal-header h2 {
    font-size: 1.3rem;
  }

  .growth-modal-header .modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

  .growth-modal-body {
    padding: 20px;
  }

  .growth-controls {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }

  .growth-controls label {
    font-size: 0.9rem;
    gap: 10px;
  }

  .growth-controls select {
    padding: 10px 14px;
    padding-right: 36px;
    font-size: 0.95rem;
    background-position: right 12px center;
  }

  .growth-comparison-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .growth-comparison-item-content {
    padding: 12px;
    gap: 6px;
  }

  .growth-comparison-label {
    font-size: 0.85rem;
  }

  .growth-comparison-age {
    font-size: 0.75rem;
  }

  .growth-highlight-badge {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
}

/* ==========================================================================
   OPTIMIZACIONES DE RENDIMIENTO PARA MÓVIL
   ========================================================================== */

/* Reducir efectos costosos en dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  /* Desactivar backdrop-filter en galería */
  .gallery-section,
  .gallery-header,
  .gallery-item {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  /* Simplificar sombras */
  .gallery-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  }
  
  /* Desactivar animaciones de entrada */
  .gallery-item,
  .comment-item,
  .highlight-item {
    animation: none !important;
  }
  
  /* Optimizar scroll */
  .gallery-section,
  .highlights-scroll,
  .comments-list {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
  }
  
  /* Reducir complejidad de transiciones */
  .gallery-item,
  .highlight-item,
  .calendar-day {
    transition: none !important;
  }
  
  /* Optimizar imágenes */
  .gallery-item img,
  .highlight-item img {
    will-change: auto;
    image-rendering: auto;
  }
}

/* Optimización adicional para pantallas pequeñas */
@media (max-width: 480px) {
  /* Forzar aceleración GPU en scroll containers */
  .gallery-section {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
  
  /* Reducir repaints */
  .gallery-grid {
    contain: layout style paint;
  }
  
  /* Simplificar estilos del calendario */
  .calendar-day {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  .calendar-section {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  
  .life-counter {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  
  .highlights-bar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.7);
  }
}

/* Preferir movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
