/* =========================================
   MUSHGORE - NOXFALL STUDIOS
   CSS responsive
   ========================================= */


/* =========================================
   1. RESET Y ESTRUCTURA GENERAL
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
}

body {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    margin: 0;
    padding: 0;

    overflow-x: hidden;
    overflow-y: auto;

    background-color: rgb(15, 12, 58);
    color: rgb(187, 176, 162);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================
   2. FONDO
   ========================================= */

.bg {
    position: fixed;
    inset: 0;
    z-index: -1;

    width: 100%;
    height: 100%;

    background-image: url("mushgore-background.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    box-shadow: inset 0 -100px 100px 20px #000000;

    pointer-events: none;
}


/* =========================================
   3. LOGO Y PERSONAJES DEL JUEGO
   ========================================= */

.container {
    position: relative;

    flex: 0 0 auto;

    width: 100%;
    height: auto;
}

.game-logo {
    display: block;

    width: 45%;
    max-width: 820px;
    max-height: 45vh;
    height: auto;

    object-fit: contain;

    margin: 5vh auto 5vh;

    animation: enter-game-logo 0.5s;
    animation-duration: 0.5s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
    transition: all .1s ease-in-out;
}

.game-characters-left {
    position: fixed;
    left: 30px;
    bottom: 0;
    z-index: 0;

    width: auto;
    height: 70vh;
    max-height: 700px;
    max-width: 45vw;

    padding: 0 2% 0% 0;

    object-fit: contain;
    object-position: bottom left;

    pointer-events: none;

    animation: enter-game-characters-left 0.5s ease-out 1.75s backwards;
    transition: height 0.2s ease-in-out;
}


/* =========================================
   4. BOTONES DE LAS TIENDAS
   ========================================= */

.shop-buttons {
    position: relative;
    z-index: 1;

    display: flex;
    flex: 0 0 auto;

    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    width: 100%;

    margin: 0;
    padding: 0 12px 20px;

    gap: 8px;
}

.fila-1 {
    display: flex;

    flex: 0 0 100%;

    justify-content: center;
    align-items: center;

    width: 100%;
    min-width: 0;
}

.fila-1 iframe {
    display: block;

    width: 646px;
    max-width: 100%;
    height: 190px;

    border: 0;
}

.shop-buttons > a {
    display: block;

    flex: 0 1 203px;

    width: 203px;
    max-width: 203px;
    min-width: 0;

    line-height: 0;
}

.shop-button {
    display: block;

    width: 100%;
    height: auto;

    padding: 0;

    animation: enter-shop-button 0.5s ease-out backwards;
    transition: transform 0.1s ease-in-out;
}

.shop-button:hover {
    transform: scale(1.05);
}

.shop-button:active {
    transform: scale(0.95);
}


/* Animaciones escalonadas de las tiendas */

.shop-buttons > a:nth-of-type(1) .shop-button {
    animation-delay: 0.5s;
}

.shop-buttons > a:nth-of-type(2) .shop-button {
    animation-delay: 0.6s;
}

.shop-buttons > a:nth-of-type(3) .shop-button {
    animation-delay: 0.7s;
}

.shop-buttons > a:nth-of-type(4) .shop-button {
    animation-delay: 0.8s;
}


/* Compatibilidad con clases originales */

.steam-button {
    animation-delay: 0.5s;
}

.google-button {
    animation-delay: 0.6s;
}

.apple-button {
    animation-delay: 0.7s;
}


/* =========================================
   5. FOOTER: NOXFALL + REDES SOCIALES
   ========================================= */

/*
   El footer permanece en el flujo del documento.
   Flexbox lo empuja hacia abajo cuando sobra espacio.
   Si no cabe todo, la página permite desplazamiento.
*/

.noxfall-social {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;

    flex: 0 0 auto;

    width: 100%;

    margin-top: auto;

    padding: 12px 0 max(15px, env(safe-area-inset-bottom));

    pointer-events: none;
}

.noxfall-social > a {
    display: block;

    line-height: 0;

    pointer-events: auto;
}


/* Logo de Noxfall Studios */

.noxfall-logo {
    display: block;

    width: 150px;
    max-width: 40vw;
    height: auto;
    margin: 0;

    opacity: 0;

    animation: enter-noxfall-logo 0.5s ease-out 1.5s both;
}

/* Fila de iconos sociales */

.social-buttons {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
}

.social-buttons a {
    display: block;
    pointer-events: auto;
    line-height: 0;
}

.social-button {
    display: block;
    width: 35px;
    height: 35px;
    margin: 0;

    border-radius: 50%;
    box-shadow: 3px 3px 10px 2px #000;

    /* La entrada utiliza translate, no transform */
    animation: enter-social-button 0.7s cubic-bezier(.2, .8, .2, 1) both;

    /* El hover puede usar transform sin interferencias */
    transition: transform 0.2s ease;
    will-change: opacity, translate;
}

.social-button:hover {
    transform: scale(1.12);
}

.social-button:active {
    transform: scale(0.92);
}


/* Animaciones escalonadas de las redes sociales */

.twitter-button {
    animation-delay: 0.7s;
}

.yt-button {
    animation-delay: 0.9s;
}

.insta-button {
    animation-delay: 1.1s;
}


/* =========================================
   6. CLASES DE UTILIDAD
   ========================================= */

.disabled {
    opacity: 0.5;

    cursor: not-allowed;
    pointer-events: none;
}


/* =========================================
   7. TABLETS Y MÓVILES
   ========================================= */

@media (max-width: 600px) {

    .game-logo {
        width: 85%;
        max-width: 420px;
        max-height: none;

        margin: 4vh auto 2vh;
    }

    .game-characters-left {
        display: none;
    }

    .shop-buttons {
        padding: 0 12px 18px;
        gap: 8px;
    }

    .fila-1 {
        margin-bottom: 4px;
    }

    .fila-1 iframe {
        width: 100%;
        max-width: 646px;
        height: 190px;
    }

    .shop-buttons > a {
        flex: 0 1 calc(50% - 4px);
        max-width: 203px;
    }

    .noxfall-logo {
        width: 130px;
        max-width: 45vw;
    }

    .social-buttons {
        gap: 18px;
    }

    .social-button {
        width: 32px;
        height: 32px;
    }
}


/* =========================================
   8. MÓVILES ESTRECHOS
   ========================================= */

@media (max-width: 360px) {

    .game-logo {
        width: 90%;
        margin-top: 3vh;
    }

    .shop-buttons {
        padding-right: 8px;
        padding-left: 8px;

        gap: 6px;
    }

    .shop-buttons > a {
        flex-basis: calc(50% - 3px);
    }

    .social-buttons {
        gap: 14px;
    }

    .social-button {
        width: 29px;
        height: 29px;
    }
}


/* =========================================
   9. PANTALLAS BAJAS
   ========================================= */

@media (max-height: 600px) {

    .game-logo {
        width: auto;
        max-width: 55vw;
        max-height: 28vh;

        margin: 2vh auto;
    }

    .game-characters-left {
        display: none;
    }

    .fila-1 iframe {
        height: 120px;
    }

    .shop-buttons {
        gap: 5px;
        padding-bottom: 10px;
    }

    .shop-buttons > a {
        flex-basis: 150px;
        max-width: 150px;
    }

    .noxfall-social {
        gap: 4px;

        padding-top: 5px;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }

    .noxfall-logo {
        width: 95px;
    }

    .social-buttons {
        gap: 12px;
    }

    .social-button {
        width: 25px;
        height: 25px;
    }
}


/* =========================================
   10. MÓVILES EN HORIZONTAL
   ========================================= */

@media (max-width: 900px) and (orientation: landscape) {

    .game-logo {
        width: auto;
        max-width: 45vw;
        max-height: 25vh;

        margin: 2vh auto;
    }

    .game-characters-left {
        display: none;
    }

    /*.fila-1 iframe {
        width: min(646px, 80vw);
        height: 100px;
    }*/
    
    .fila-1 iframe {
    display: block;
    width: min(646px, 90vw);
    height: clamp(190px, 48vh, 300px);
    max-width: 100%;
    border: 0;
    }

    .shop-buttons {
        gap: 5px;
        padding-bottom: 8px;
    }

    .shop-buttons > a {
        flex-basis: 130px;
        max-width: 130px;
    }

    .noxfall-social {
        gap: 4px;

        padding-top: 5px;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }

    .noxfall-logo {
        width: 80px;
    }

    .social-button {
        width: 25px;
        height: 25px;
    }
}


/* =========================================
   11. ANIMACIONES
   ========================================= */

@keyframes enter-game-logo
{
    0% {transform: scale(0); }
    75% {transform: scale(1.1);}
    100% {transform: scale(1); }
}

@keyframes enter-game-characters-left {
    0% {
        transform: translateX(-120px);
        opacity: 0;
    }
}

@keyframes enter-noxfall-logo {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

@keyframes enter-shop-button {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes enter-social-button {
    from {
        opacity: 0;
        translate: 0 45px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}
    
    @media (min-width: 901px) {
    html {
        scrollbar-gutter: auto;
        scrollbar-width: none;
    }

    body {
        scrollbar-width: none;
    }

    body::-webkit-scrollbar,
    html::-webkit-scrollbar {
        display: none;
    }
}

.fila-1 iframe {
    animation: enter-steam-widget 0.8s ease-out 0.3s both;
}

@keyframes enter-steam-widget {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

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