/* FONDO GIF */
.background-gif {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url("https://melivideogame.neocities.org/MeliBackground.gif") no-repeat center center;
  background-size: cover;
  z-index: -2;
  opacity: 0.5;
}

/* Capa oscura semi-transparente sobre el fondo */
.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* ESTILOS BASE */
body {
  margin: 0;
  background-color: black;
  font-family: 'Bebas Neue', sans-serif;
  color: white;
  overflow-x: hidden;
  position: relative;
}

/* BARRA DE NAVEGACIÓN */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 999;
  padding: 10px 0;
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.navbar li {
  margin: 0 20px;
}

.navbar a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #00ffff;
}

/* PRIMERA PANTALLA */
.container {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin-top: 50px;
}

.fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  z-index: -1;
}

.meli,
.nombre {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  opacity: 0;
  animation: fadeIn 2s ease-in forwards;
  animation-delay: 2s;
  z-index: 1;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* CONTENIDO DESPUÉS DE LA PANTALLA PRINCIPAL */
.contenido {
  padding: 60px 20px;
  max-width: 800px;
  margin: auto;
}

/* Recuadro de información sobre el juego */
.info-recuadro {
  display: flex;
  flex-wrap: nowrap;
  gap: 40px;
  margin: 60px auto;
  padding: 40px;
  max-width: 1400px;
  width: 95%;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 25px;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5);
  align-items: flex-start;
}

.texto-info {
  flex: 1.2;
  color: white;
  font-size: 22px;
  line-height: 1.6;
  font-weight: normal;
}

.texto-info h2 {
  color: #ff69b4; 
  font-size: 28px;
  margin-bottom: 20px;
}

.video-container {
  flex: 1;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  padding: 10px;
  min-width: 300px;
}

.video-container iframe {
  width: 100%;
  height: 100%;
}

/* Animaciones de deslizamiento */
.fade-in-left {
  opacity: 0;
  animation: slideInLeft 1s ease-out forwards;
}

.fade-in-right {
  opacity: 0;
  animation: slideInRight 1s ease-out forwards;
}

@keyframes slideInLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Guitarras */
.guitarras-container {
  position: fixed;
  top: 0%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  z-index: 1;
}

.guitarra {
  position: absolute;
  width: 800px;
  height: auto;
  transition: transform 0.3s ease;
}

.izquierda {
  left: -400px;
  transform: translateY(0);
}

.derecha {
  right: -400px;
  transform: translateY(0);
}

.guitarra.izquierda, .guitarra.derecha {
  will-change: transform;
}

.fondo.grande {
  width: 85vw;
  height: auto;
  max-width: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: absolute;
  top: -8vh;
  left: 7.5vw;
  z-index: 1;
}

.fondo.oculto {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

/* Intro fade */
#intro-fade {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  z-index: 9999;
  pointer-events: none;
  animation: introSequence 2.5s ease-in-out forwards;
}

@keyframes introSequence {
  0% {
    background-color: black;
    opacity: 1;
  }
  40% {
    background-color: white;
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

.seccion-meli-chloe {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 80px auto;
  padding: 40px;
  max-width: 1400px;
  width: 95%;
  background-color: rgba(0, 0, 0, 0.75);
  border-radius: 25px;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.texto-meli-chloe {
  flex: 1.2;
  color: white;
  font-size: 22px;
  line-height: 1.6;
}

.texto-meli-chloe h2 {
  color: #ff69b4;
  font-size: 28px;
  margin-bottom: 20px;
}

.imagen-meli-chloe {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.imagen-meli-chloe img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* ===== Botón flotante ===== */
#openSidebarBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  background: #ff69b4;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}

#openSidebarBtn:hover {
  background: #ff4da6;
}

/* ===== Panel lateral ===== */
#sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  max-width: 800px;
  height: 100%;
  background: rgba(0,0,0,0.95);
  color: white;
  display: flex;
  flex-direction: row;
  transition: right 0.5s ease;
  z-index: 3000;
  overflow-y: auto;
}

#sidebar.active {
  right: 0;
}

/* ===== Imagen izquierda ===== */
.sidebar-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sidebar-image img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(255,105,180,0.4);
}

/* ===== Texto derecha ===== */
.sidebar-text {
  flex: 1.2;
  padding: 40px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  line-height: 1.6;
}

.sidebar-text h2 {
  color: #ff69b4;
  font-size: 36px;
  margin-bottom: 20px;
}

/* ADAPTACIÓN PARA MÓVILES */
@media screen and (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .container {
    margin-top: 60px;
    height: 100vh;
    position: relative;
  }

  .fondo,
  .meli,
  .nombre {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .info-recuadro {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .video-container {
    min-width: 100%;
    width: 100%;
    padding: 0;
  }

  .texto-info {
    font-size: 18px;
  }

  .imagen-info {
    margin-bottom: 20px;
  }

  .guitarras-container {
    display: none;
  }

  .fondo.grande {
    left: 0;
    top: 0;
    width: 100%;
  }

  .background-gif,
  .background-overlay {
    background-size: cover;
    background-position: center;
  }

  #sidebar {
    flex-direction: column;
    width: 100%;
  }

  .sidebar-text {
    padding: 20px;
    font-size: 18px;
  }
}