* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'Grotesk';
    src: url('./Public/Fonts/Grotesk.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #101010;
}

/* --- OCULTAR BARRAS DE SCROLL --- */

/* 1. Para Chrome, Safari y Opera (El famoso motor WebKit) */
body::-webkit-scrollbar,
html::-webkit-scrollbar,
.escenario::-webkit-scrollbar {
    display: none;
}

/* 2. Para Firefox, IE y Edge */
body,
html,
.escenario {
    -ms-overflow-style: none;
    /* IE y Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* El botón del loader */
#btn-entrar {
    margin-top: 30px;
    padding: 1px 8px;
    background: transparent;
    border: 1px solid white;
    color: white;
    font-size: 30px;
    font-family: 'Grotesk', sans-serif;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}

#btn-entrar:hover {
    background: white;
    color: black;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ANIMACIÓN DEL LOADER */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.logo-img {
    width: 80px;
    height: auto;
    animation: spin 2s linear infinite;
}

#btn-volver-disco {
    position: absolute;
    top: 20px;
    left: 20px;
    display: none;

    z-index: 3000;

    padding: 10px 15px;
    background: transparent;
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    font-family: 'Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

#btn-volver-disco:hover {
    background: white;
    color: #101010;
}

/* ANIMACION DE ENTRADA A LA PORTADA */

@keyframes aparecerSuave {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.escenario {
    visibility: hidden;
}

.escenario[style*="visibility: visible"] {
    animation: aparecerSuave 4s ease-out;
    visibility: visible;
}

.escenario {
    perspective: 2000px;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.panel-musica {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.panel-musica button {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.panel-musica button:hover {
    transform: scale(1.1);
}

#btn-playpause img {
    width: 20px;
    height: auto;
    display: block;
}

.libro {
    width: min(42vw, 80vh);
    height: min(42vw, 80vh);
    position: relative;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform-style: preserve-3d;
    max-width: 900px;
    max-height: 900px;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.8s ease;
}

.libro.abierto {
    transform: translateX(50%);
}

.libro.cerrado-back {
    transform: translateX(100%);
}

.pagina {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
    will-change: transform;
    pointer-events: none;
}

.pagina.abierta {
    transform: rotateY(-180deg);
}

.cara {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* El frente se empuja un poquito hacia el usuario */
.cara.frente {
    transform: translateZ(1px);
}

/* El dorso se rota Y se empuja un poquito hacia el fondo del libro */
.cara.dorso {
    transform: rotateY(180deg) translateZ(1px);
}


/* Caso 1: Imagen que ocupa TODO el cuadrado */
.entera {
    background-size: cover;
    background-position: center;
}

/* Caso 2: Imagen que se corta a la MITAD IZQUIERDA */
.mitad-izq {
    background-size: 200% 100%;
    background-position: left center;
}

/* Caso 3: Imagen que se corta a la MITAD DERECHA */
.mitad-der {
    background-size: 200% 100%;
    background-position: right center;
}

/* --- BOTONES --- */
.flecha {
    position: absolute;
    pointer-events: auto;
    right: 2vmin;
    top: 45%;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flecha img {
    width: 120px;
}

.flecha img:hover {
    scale: 1.5;
    transition-duration: 500ms;
    animation: ease-in-out;
}

.flecha.prev {
    left: 2vmin;
    right: auto;
}

.libro.retirada {
    /* Mantenemos el translateX para que no pegue un salto, pero lo achicamos y lo volvemos invisible */
    transform: translateX(100%) scale(0.5) !important;
    opacity: 0;
    pointer-events: none;
    /* Para que no estorbe los clics cuando esté invisible */
}

/* --- MODO INFO (Los 3 Contenedores) --- */
#seccion-info {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    font-family: 'Grotesk', sans-serif;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.info-perfil {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.info-perfil p {
    font-size: 20px;
}

.foto-perfil {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.redes-sociales {
    display: flex;
    gap: 15px;
}

.redes-sociales img {
    width: 24px;
    height: auto;
    filter: invert(1);
    transition: transform 0.5s;
}

.redes-sociales img:hover {
    transform: scale(1.2);
}

.info-media {
    display: flex;
    gap: 20px;
    width: 90%;
    max-width: 1000px;
    justify-content: center;
}

.card-media {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    width: 100%;
    aspect-ratio: 16 / 9;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
}

.card-media:hover {
    background-color: #42424289;
    cursor: pointer;
}

.img-album {
    width: 35%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 0.5px solid #434343;
    border-radius: 5px;
}

.img-video {
    width: 80%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 0.5px solid #434343;
    border-radius: 20px;
}

.album-container {
    display: flex;
    align-items: center;
    justify-items: center;
    gap: 5px;
}

.album-container img {
    width: 20px;
    filter: invert(1);
    border: none;
}

.card-media h2 {
    margin-top: 1;
    font-size: 15px;
}

.card-media p {
    margin: 0;
    font-size: 10px;
    color: #6d6d6d
}

/* --- ADAPTACIÓN PARA MÓVILES (Celulares) --- */
@media (max-width: 768px) {

    .flecha {
        display: none !important;
    }

    /* 2. El libro ocupa toda la pantalla */
    .libro {
        width: 100vw;
        height: 100vw;
        max-width: none;
        max-height: none;
    }

    /* 3. Anulamos el comportamiento de Desktop */
    .libro.abierto {
        transform: translateX(0) !important;
    }

    .libro.cerrado-back {
        /* El back cover (que está a la izquierda) necesita que el libro se corra a la derecha para verse */
        transform: translateX(100vw) !important;
    }

    /* 4. CLASES DE CÁMARA MÓVIL (El Paneo) */
    .libro.mobile-izq {
        /* Empujamos el libro a la derecha para enfocar la hoja izquierda que acaba de abrirse */
        transform: translateX(100vw) !important;
    }

    .libro.mobile-der {
        /* Dejamos el libro a la izquierda para enfocar la hoja derecha */
        transform: translateX(0) !important;
    }

    .info-media {
        flex-direction: column;
    }

    .card-media h2 {
        margin-top: 1;
        font-size: 10px;
    }

    .panel-musica {
        bottom: 8px;
        width: 35px;
        height: 35px;
    }

    #btn-playpause img {
        width: 20px;
        height: auto;
        display: block;
    }
}