/* ============================================
    Contiene: Estilos globales, layout principal, contador, botones, fechas y footer
   ============================================ */

/* === RESET Y CONFIGURACIÓN BASE === */
/* Reset básico para todos los elementos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Cursor en forma de corazón */
html {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23FFB6C1" d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" filter="url(%23glow)"/></svg>') 12 12, auto;
}

/* Efecto de brillo para el corazón */
body::after {
  content: "";
  position: fixed;
  width: 24px;
  height: 24px;
  pointer-events: none;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23FF69B4" d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
  background-size: contain;
  z-index: 20;
  opacity: 0;
  transition: transform 0.1s ease, opacity 0.3s ease;
  transform: translate(-50%, -50%) scale(0.5);
}

/* Efecto de brillo al mover el cursor */
body:hover::after {
  opacity: 0.7;
  transform: translate(-50%, -50%) scale(1);
  animation: heartBeat 0.6s infinite alternate;
}

/* Asegurar que el cursor se herede correctamente */
*, *::before, *::after {
  cursor: inherit;
}

/* Corazon sigue el cursor */
body::after {
  left: var(--x);
  top: var(--y);
}

/* === ESTILOS DEL BODY Y LAYOUT === */
/* Estilos para el body */
body {
  background: linear-gradient(135deg, var(--orange-light) 0%, var(--blue-light) 100%);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  font-family: 'Raleway', sans-serif;
  color: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 40px 20px;
  overflow-x: hidden;
  position: relative;
}

/* === HEADER Y TÍTULOS === */
/* Estilos para el encabezado */
header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  width: 100%;
  max-width: 800px;
}

/* Título principal con efecto de pulso */
h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 4rem;
  color: var(--accent);
  text-shadow: 2px 2px 4px var(--shadow-black);
  margin-bottom: 15px;
  animation: pulse 3s infinite;
}

/* Subtítulo */
.subtitle {
  font-family: 'Pacifico', cursive;
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 30px;
}

/* === CONTADOR DE DÍAS === */
/* Contenedor del contador */
.counter-container {
  background: var(--white-85);
  border-radius: 15px;
  padding: 15px 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px var(--black-10);
  text-align: center;
  width: 100%;
  max-width: 400px;
  z-index: 1;
}

/* Título del contador */
.counter-title {
  font-weight: 500;
  color: var(--purple);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

/* Número del contador */
.counter {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Montserrat', sans-serif;
}

/* === MENSAJES ALEATORIOS === */
/* Contenedor del sobre con mensajes */
.envelope-container {
  background: var(--white-95);
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 700px;
  width: 100%;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px var(--shadow-black);
  text-align: center;
  z-index: 1;
  position: relative;
  border: 1px solid var(--shadow-light);
  transition: all 0.4s ease;
}

/* Efecto hover en el sobre */
.envelope-container:hover {
  box-shadow: var(--shadow-dual);
  transform: translateY(-5px);
}

/* Texto del mensaje */
.envelope-text {
  font-size: 1.4rem;
  color: var(--grey-dark);
  font-weight: 500;
  line-height: 1.6;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  position: relative;
  transition: all 0.5s ease;
}

/* Comillas decorativas antes del texto */
.envelope-text::before {
  font-size: 5rem;
  position: absolute;
  left: -20px;
  top: -30px;
  color: var(--shadow-dark);
}

/* Comillas decorativas después del texto */
.envelope-text::after {
  font-size: 5rem;
  position: absolute;
  right: -20px;
  bottom: -40px;
  color: var(--shadow-dark);
  transform: rotate(180deg);
}

/* === BOTONES === */
/* Botón principal con gradiente */
.btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  color: var(--white);
  border: none;
  padding: 18px 50px;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 6px 20px var(--shadow-btn);
  z-index: 2;
  position: relative;
  overflow: hidden;
  letter-spacing: 1px;
  margin: 20px 0;
}

/* Efecto hover del botón */
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-btn-hover);
}

/* Efecto al hacer clic */
.btn:active {
  transform: translateY(1px);
}

/* Efecto de brillo animado */
.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20px;
  height: 200%;
  background: var(--white-30);
  transform: rotate(30deg);
  transition: all 0.6s;
}

/* Animación del brillo en hover */
.btn:hover::after {
  left: 120%;
}

/* Botón deshabilitado */
.btn-disabled {
  background: linear-gradient(135deg, var(--shadow-dark) 0%, var(--shadow-purple) 100%) !important;
  color: var(--white) !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 4px 15px var(--shadow-purple) !important;
  position: relative;
  overflow: hidden;
}

/* Evitar efectos hover en botón deshabilitado */
.btn-disabled:hover {
  transform: none !important;
}

/* Efecto de brillo en botón deshabilitado */
.btn-disabled::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    transparent 45%, 
    var(--white-30) 50%, 
    transparent 55%);
  background-size: 200% 200%;
  animation: shine 2s infinite;
  z-index: 1;
}

/* Checkmark en botón deshabilitado */
.btn-disabled::after {
  content: "✓";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  color: var(--white-85);
  z-index: 2;
}

/* Icono del botón deshabilitado */
.btn-disabled i {
  opacity: 0.7;
}

/* Icono del corazón en el botón */
#heartIcon {
  margin-right: 10px;
}

/* === CORAZONES FLOTANTES === */
/* Corazón animado que flota */
.heart {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--accent);
  transform: rotate(45deg);
  animation: floatUp 2.5s ease-out forwards;
  opacity: 0.8;
  z-index: 0;
  box-shadow: 0 0 10px var(--shadow-pink-dark);
}

/* Partes del corazón (círculos) */
.heart::before,
.heart::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--shadow-pink-dark);
}

/* Círculo superior del corazón */
.heart::before {
  top: -10px;
  left: 0;
}

/* Círculo lateral del corazón */
.heart::after {
  left: -10px;
  top: 0;
}

/* === SPOTIFY === */
/* Contenedor de Spotify */
.spotify-container {
  width: 100%;
  max-width: 600px;
  background: var(--white-90);
  border-radius: 20px;
  padding: 12px;
  margin: 40px 0;
  box-shadow: 0 12px 25px var(--black-15);
  z-index: 1;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Efecto hover en contenedor Spotify */
.spotify-container:hover {
  box-shadow: 0 0 15px 5px var(--shadow-spotify),
              0 15px 30px var(--black-10);
  animation: pulse-green 2s infinite;
  transform: translateY(-2px);
}

/* Iframe de Spotify */
.spotify-container iframe {
  border-radius: 8px;
  border: none;
  display: block;
}

/* === FOOTER === */
/* Footer principal */
footer {
  margin-top: auto;
  padding: 20px;
  text-align: center;
  color: var(--grey);
  font-size: 0.9rem;
  width: 100%;
  border-top: 1px solid var(--shadow-pink-10);
}

/* Firma decorativa */
.signature {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: var(--accent);
  margin-top: 10px;
}

/* Enlace GitHub en el footer */
.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  text-decoration: none;
  color: inherit;
  padding: 6px 12px;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  font-variant-numeric: slashed-zero;
  font-feature-settings: 'zero' 1;
}

/* Icono de GitHub */
.github-link i { 
  font-size: 20px; 
  line-height: 1; 
}

/* Efecto hover en enlace GitHub */
.github-link:hover {
  transform: translateY(-1px);
  background: var(--black-05);
}

/* Efecto hover en modo noche */
body.night-mode .github-link:hover {
  background: var(--white-08);
}

/* Colores del footer según tema */
footer { 
  color: var(--grey); 
}


body.night-mode footer { 
  color: var(--grey-light); 
}

/* Foco visible para accesibilidad */
.github-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* === RESPONSIVE === */
/* Tablets */
@media (max-width: 768px) {
      h1 {
        font-size: 3.5rem;
      }
      
      .subtitle {
        font-size: 1.5rem;
      }
      
      .envelope-text {
        font-size: 1.2rem;
      }
      
      .photo-gallery {
        gap: 15px;
      }
      
      .photo-frame {
        width: 130px;
        height: 130px;
      }
}

/* Móviles */
@media (max-width: 480px) {
      h1 {
        font-size: 2.8rem;
      }
      
      .subtitle {
        font-size: 1.3rem;
      }
      
      .envelope-text {
        font-size: 1.1rem;
        min-height: 120px;
        padding: 15px 0;
      }
      
      .btn {
        padding: 16px 40px;
        font-size: 1rem;
      }
      
      .counter {
        font-size: 1.5rem;
      }
      
      .photo-gallery {
        gap: 10px;
      }
      
      .photo-frame {
        width: 100px;
        height: 100px;
      }
}

/* === HEARTBEAT INDICATOR === */
/* Indicador de latido del corazón */
.heartbeat-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  background-color: var(--shadow-pink);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: heartbeat 1.5s infinite;
  z-index: 100;
  pointer-events: none;
  will-change: opacity;
}

/* Activar indicador de heartbeat */
.heartbeat-active .heartbeat-indicator { 
  opacity: 0.8; 
}

/* === INSIGNIAS DE MESES === */
/* Contenedor de insignias */
.badges-container {
  margin: 25px 0 15px;
  text-align: center;
}

/* Título del tracker de insignias */
.badge-tracker {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 15px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Contenedor de las insignias */
.badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 15px;
  font-size: 24px;
}

/* Insignia individual */
.badge {
  line-height: 1;
  line-height: 1;
  position: relative;
  filter: grayscale(100%) brightness(0.7);
  opacity: 0.6;
  transition: all 0.5s ease;
  transform: scale(0.9);
  cursor: default;
  text-shadow: 
    0 0 2px var(--black-10),
    0 0 10px rgba(255,255,255,0.3);
}

/* Insignia completada */
.badge.completed {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
  transform: scale(1.1);
  animation: mandarinaPulse 1.5s infinite alternate;
  text-shadow: 
    0 0 5px var(--shadow-orange-50),
    0 0 15px var(--shadow-orange-30);
}

/* Número del mes en la insignia */
.badge::after {
  content: attr(data-month);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 3px));
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: var(--grey-dark);
}

/* Número del mes en insignia completada */
.badge.completed::after {
  color: var(--white);
  text-shadow: 0 1px 3px var(--black-30);
}

/* === BOTONES DE RECORDATORIOS Y NAVEGACIÓN === */
/* Botón de recordatorios */
.reminder-btn {
  background: var(--white-90);
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  margin-top: 15px;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 3px 10px var(--shadow);
  display: inline-block;
}

/* Efecto hover en botón de recordatorios */
.reminder-btn:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-dark);
}

/* Contenedor del botón de retroceso */
.back-btn-container {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 10;
}

/* Botón de retroceso */
.back-btn {
  background: var(--white-90);
  color: var(--accent);
  padding: 8px 15px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 3px 10px var(--black-10);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

/* Efecto hover en botón de retroceso */
.back-btn:hover {
  transform: translateX(-3px);
  background: var(--secondary);
  color: var(--white);
}

/* === FECHAS IMPORTANTES === */
/* Contenedor de fechas */
.dates-container {
  max-width: 800px;
  width: 100%;
  margin: 30px auto;
  padding: 0 20px;
}

/* Tarjeta de fecha individual */
.date-card {
  background: var(--white-95);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 5px 15px var(--black-10);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

/* Efecto hover 3D en tarjeta de fecha */
.date-card:hover {
  transform: perspective(500px) rotateX(5deg) translateY(-10px);
  box-shadow: 0 15px 30px var(--shadow-pink-dark);
}

/* Icono de la fecha */
.date-icon {
  font-size: 2.5rem;
  min-width: 60px;
  text-align: center;
}

/* Título de la fecha */
.date-content h3 {
  color: var(--accent);
  margin-bottom: 5px;
  font-family: 'Montserrat', sans-serif;
}

/* Texto de la fecha */
.date {
  color: var(--grey);
  font-weight: 500;
  margin-bottom: 10px;
}

/* Contador de días para la fecha */
.days-counter {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--secondary);
}

/* Grupo de tarjetas de fechas */
.date-group {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

/* Tarjetas dentro del grupo */
.date-group .date-card {
  flex: 1;
  min-width: 0;
}

/* Responsive para grupos de tarjetas */
@media (max-width: 768px) {
  .date-group {
    flex-direction: column;
  }
  
  .date-group .date-card {
    width: 100%;
  }
}

/* Ajustar iconos en grupos */
.date-group .date-card .date-icon {
  font-size: 2rem;
  min-width: 50px;
}

/* Ajustar padding en grupos */
.date-group .date-card {
  padding: 15px;
}

/* Estilos adicionales del contador de días */
.days-counter {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 50px;
  display: inline-block;
  background: var(--shadow-pink-10);
  transition: all 0.3s;
}

/* Tarjeta de fecha cuando es hoy */
.date-card-today {
  animation: pulseHighlight 2s infinite;
}

/* Estilos de la tarjeta en estado 'hoy' */
.date-card-today {
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%) !important;
  color: var(--white) !important;
}

/* Título de tarjeta en estado 'hoy' */
.date-card-today h3 { 
  color: var(--white) !important; 
}

/* Fecha en estado 'hoy' */
.date-card-today .date { 
  color: var(--white-90) !important; 
}

/* Contador de días en estado 'hoy' */
.days-counter-today {
  color: var(--green) !important;
  background: var(--white-15) !important;
}
