/* LOGIN MODULE */
   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: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
  visibility: 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;
  visibility: visible;
}

.login-required .container,
.login-required .gallery-section,
.login-required .media-modal,
.login-required .date-picker-modal,
.login-required .growth-modal,
.login-required .upload-modal {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0 !important;
  visibility: hidden !important;
  display: none !important;
}

/* Ocultar las decoraciones de flores del body también */
.login-required .flower-decoration {
  opacity: 0 !important;
  visibility: hidden !important;
}

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

@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 */
