/* Estilos específicos para la página de inicio (index.php) */

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0a0a0a;
  color: #f5f5f5;
  position: fixed;
  margin: 0;
  padding: 0;
}

/* Fondo con imagen espacial */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/images/background_main.jpeg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -1;
}

/* Header */
.header {
  position: fixed;
  top: 1.5rem;
  left: 0;
  right: 0;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 3px;
}

.nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: opacity 0.3s;
}

.nav a:hover {
  opacity: 0.7;
}

/* Contenedor principal con borde blanco */
.content-box {
  position: fixed;
  top: 10rem;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 92vw;
  max-width: 1400px;
  border: 3px solid #ffffff;
  padding: 3rem;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 2rem;
  box-sizing: border-box;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
}

/* Sección izquierda */
.left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-width: 0;
  padding-top: 1rem;
  overflow: visible;
}

/* Sección derecha */
.right-section {
  flex: 0 0 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}


/* Sección izquierda */
.left-section {
  /* Ocupar el espacio restante */
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-width: 0;
  padding-top: 1rem;
}

.main-title {
  font-size: 6rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -2px;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
  /* Evitar que se divida en dos líneas */
  /* Animation removed to allow individual letter rain effect */
}

.subtitle {
  font-size: 0.9rem;
  color: #cccccc;
  line-height: 1.3;
  margin: 0;
  /* Entrance animation */
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bottom-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
  /* Entrance animation */
  animation: fadeInUp 0.7s ease-out forwards;
  animation-delay: 0.7s;
  opacity: 0;
}

/* En desktop, organizar las redes sociales y el reproductor en fila */
@media (min-width: 641px) {
  .bottom-section {
    flex-direction: column !important;
  }

  .social-player-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  .spotify-player-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 300px !important;
    /* Fixed width for better look in column */
  }
}

.social-handle {
  font-size: 0.8rem;
  color: #ffffff;
  margin: 0;
}

.social-player-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
}

.social-icons {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.social-icon {
  width: 32px;
  height: 32px;
  color: #ffffff;
  transition: opacity 0.3s;
  cursor: pointer;
  display: block;
  flex-shrink: 0;
}

.social-icon:hover {
  opacity: 0.7;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}


/* Modal de video */
.spotify-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  overflow-y: auto;
  padding: 2rem;
  box-sizing: border-box;
}

.spotify-modal.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-content {
  max-width: 1400px;
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  position: relative;
  padding-top: 3rem;
  align-items: flex-start;
}

.modal-close {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 2001;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-spotify-wrapper {
  position: relative;
  width: 100%;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid #ffffff;
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}

.modal-spotify-wrapper iframe {
  width: 100%;
  height: 352px;
  border: none;
  border-radius: 10px;
}

.modal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  min-width: 0;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.modal-album {
  font-size: 1rem;
  color: #cccccc;
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

.modal-description {
  font-size: 1rem;
  color: #cccccc;
  line-height: 1.8;
  margin: 0;
}

.modal-date {
  font-size: 0.9rem;
  color: #1E90FF;
  margin: 0;
  font-weight: 500;
}

.modal-social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.modal-social-link {
  width: 45px;
  height: 45px;
  color: #ffffff;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.modal-social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-3px);
}

.modal-social-link svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 968px) {
  .modal-content {
    flex-direction: column;
  }

  .modal-spotify-wrapper {
    flex: 1;
    width: 100%;
  }

  .modal-info {
    flex: 1;
    width: 100%;
  }
}

/* Sección derecha - Imagen */
.right-section {
  /* Reservar 55% del ancho para la imagen (aumentado para hacerla más grande) */
  flex: 0 0 55%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  overflow: visible;
  position: relative;
  /* Entrance animation */
  animation: fadeInRight 0.8s ease-out forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.portrait-image {
  border-radius: 0;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
  object-position: top center;
  /* Entrance animation */
  animation: scaleIn 0.9s ease-out forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Desktop: mejorar encuadre de la imagen */
@media (min-width: 641px) {
  .right-section .portrait-image {
    width: 140%;
    max-width: none;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    /* Cambiado a contain para ver la imagen completa */
    object-position: center center;
    /* Centrado para ver toda la imagen */
    display: block;
    transition: transform 0.5s ease;
  }
}

/* Flecha derecha */
.arrow-right {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  z-index: 10;
}

.arrow-right svg {
  width: 100%;
  height: 100%;
}

/* Ribbon Cinta */
.launch-ribbon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid #ffffff;
  padding: 1rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 20;
  backdrop-filter: blur(5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  min-width: 300px;
}

.ribbon-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ribbon-date {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Responsive */
/* Tablet */
@media (max-width: 768px) {
  .content-box {
    top: 7rem;
    width: 95vw;
    padding: 1.5rem;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
  }

  .main-title {
    font-size: 3.5rem;
    line-height: 1.1;
  }

  .subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
  }

  .left-section {
    gap: 2rem;
  }

  .portrait-image {
    max-height: 50vh;
  }

  .header {
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    top: 1rem;
  }

  .nav {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .nav a {
    font-size: 0.7rem;
  }

  .logo {
    font-size: 1rem;
  }

  .arrow-right {
    display: none;
  }

  .social-player-container {
    gap: 1.5rem;
  }


  .modal-content {
    flex-direction: column;
    padding-top: 4rem;
  }

  .modal-spotify-wrapper {
    flex: 1;
    width: 100%;
  }

  .modal-info {
    flex: 1;
    width: 100%;
  }

  .modal-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}

/* === LAYOUT MÓVIL (Consolidado) === */
@media (max-width: 640px) {
  .content-box {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: calc(100vw - 2rem) !important;
    max-width: none !important;
    margin: 4.5rem 1rem 1rem 1rem !important;
    /* Margen superior: altura del header (~3.5rem) + margen (1rem) = 4.5rem para estar más cerca del header */
    padding: 1.5rem !important;
    border: 3px solid #ffffff !important;
    /* Mantener borde de 3px en index */
    box-sizing: border-box !important;
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    /* Permitir scroll dentro de la sección */
    max-height: calc(100vh - 6.5rem) !important;
    /* Altura máxima para permitir scroll dentro */
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px) !important;
  }

  .left-section,
  .right-section {
    width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
  }

  .left-section > *:last-child,
  .right-section > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .right-section {
    align-items: flex-start !important;
    margin-top: -2rem !important;
  }

  .main-title {
    display: none !important;
  }

  .subtitle {
    text-align: center !important;
    margin-bottom: 0.25rem !important;
    font-size: 1rem !important;
    line-height: 1.4;
  }

  .portrait-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    /* Dejar que la imagen respire */
    object-fit: contain !important;
    object-position: top center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: block !important;
  }

  .social-player-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-bottom: 0 !important;
  }

  .social-icons {
    justify-content: center !important;
  }

  .header {
    padding: 0.5rem 1rem !important;
    top: 0.5rem !important;
  }

  /* Ajustes para iconos sociales */
  .social-icon {
    width: 38px !important;
    /* Tamaño más pequeño */
    height: 38px !important;
  }

  /* Ocultar elementos que no se usan en móvil */
  .social-handle {
    display: none !important;
  }

  .bottom-section {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 0 !important;
    /* Gap mínimo */
  }

  .bottom-section > *:last-child {
    margin-bottom: 0 !important;
  }

  .modal-content {
    padding: 1rem;
    padding-top: 3rem;
    gap: 1.5rem;
  }

  .modal-spotify-wrapper {
    aspect-ratio: 16 / 9;
  }

  .modal-title {
    font-size: 1.4rem;
  }

  .modal-description {
    font-size: 0.9rem;
  }

  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
}

/* Reproductor de Spotify integrado - SIEMPRE VISIBLE */
.spotify-player-container {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.spotify-player-container iframe {
  border-radius: 12px;
  transition: all 0.3s ease;
  width: 100% !important;
  height: 152px !important;
  overflow: hidden !important;
  border: none !important;
  display: block;
}

/* En móviles, redes sociales y reproductor en la misma fila aprovechando espacio */
@media (max-width: 640px) {
  .spotify-player-container {
    margin-top: 0.2rem;
    /* Separación adecuada sin recorte */
    max-width: 100% !important;
    /* Ocupa todo el ancho */
    padding: 0.3rem;
    /* Padding adecuado */
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  .spotify-player-container iframe {
    height: 80px !important;
    /* Altura adecuada para mostrar todo sin scroll */
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    max-height: 80px !important;
    min-height: 80px !important;
  }

  .spotify-player-container iframe::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .social-player-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
  }

}

/* En desktop, organizar las redes sociales y el reproductor en columna alineado a la izquierda */
@media (min-width: 641px) {
  .bottom-section {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .social-player-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  .spotify-player-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 350px !important;
  }
}