* {
    --light-blue: #196dcf;
    --lighter-blue: #7db3f1;
    --height-loading-bar: 1.5rem;
    --width-supercell: 30vw;
    --glassmophic-white: rgba(255, 255, 255, 0.3);
    --first-nav-grey: #4a596e;
    --second-nav-grey: #384253;
    --first-selected-nav-blue: #47698b;
    --second-selected-nav-blue: #5b88ab;
    --nav-height: 5rem;
    --baule-height: calc(var(--nav-height) * 2.5);
    --first-orange: #ffbb00;
    --second-orange: #ffa401;
    --first-btn-blue: #00affe;
    --second-btn-blue: #0657a8;
}


/* I copied this font-face, directly from the official website
@font-face {
    font-family: 'supercell-magicregular';
    src: url("../fonts/supercell-magic.eot");
    src: url("../fonts/supercell-magic.eot?#iefix") format("embedded-opentype"), url("../fonts/supercell-magic.woff") format("woff"), url("../fonts/supercell-magic.ttf") format("truetype"), url("../fonts/supercell-magic.svg#supercell-magicregular") format("svg");
    font-weight: normal;
    font-style: normal;
}
*/

@font-face {
    font-family: 'supercell-magic';
    src: url("https://clashroyale.com/blog-assets/fonts/supercell-magic.eot");
    src: url("https://clashroyale.com/blog-assets/fonts/supercell-magic.eot?#iefix") format("embedded-opentype"), url("https://clashroyale.com/blog-assets/fonts/supercell-magic.woff") format("woff"), url("https://clashroyale.com/blog-assets/fonts/supercell-magic.ttf") format("truetype"), url("https://clashroyale.com/blog-assets/fonts/supercell-magic.svg#supercell-magicregular") format("svg");
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'supercell-magic';
    margin: 0;
    overflow: hidden;
    scroll-behavior: smooth;
}


/* page 1 */

body {
    background: url("./images/bg-blue-repeated.jpg");
    background-repeat: repeat;
    background-size: contain;
    background-position: center;
    background-attachment: fixed;
    ;
    height: 100vh;
    width: 100vw;
}

.page {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
}

.page1 {
    background: url('./images/1loading-screen-bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.loading-container {
    position: fixed;
    bottom: 0;
    display: grid;
    place-items: center;
}

.loading-hints {
    position: fixed;
    bottom: calc(var(--height-loading-bar) * 2.5);
    color: white;
    text-shadow: 0 0.2rem 0.1rem black, 0 0 0.5rem black;
    font-size: max(1vw, 0.7rem);
    text-align: center;
    padding: 0 max(0.5vw, 0.5rem);
    letter-spacing: 0.05rem;
}

.loading {
    background: black;
    box-shadow: 0 0 0.2rem 0.2rem black;
    width: 100vw;
    display: grid;
    place-items: center;
}

.loading-bar {
    height: var(--height-loading-bar);
    width: 100%;
    padding: 0.2rem;
    background: var(--light-blue);
    border-radius: 0.2rem;
    transition: all 0.2s;
}

.loading-bar::before {
    content: '';
    display: block;
    height: calc(var(--height-loading-bar) / 2 + 0.1rem);
    width: 100%;
    background: var(--lighter-blue);
    border-radius: 0.2rem;
}

.loading-number {
    color: white;
    position: absolute;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    bottom: calc(var(--height-loading-bar) / 2 - 0.1rem);
    text-shadow: 0 0.2rem 0.1rem black, 0 0 0.5rem black;
    z-index: 1;
}

.not-visible {
    display: none !important;
}

.page0 {
    display: grid;
    place-items: center;
    background: black;
    z-index: 5;
}

.page0 img {
    width: min(30vw, 100vh);
    max-width: 300px;
    height: auto;
    /* l'immagine ora è bianca */
    filter: invert(1);
    animation: logo-shadow 3s ease-in-out forwards;
}

@keyframes logo-shadow {
    0% {
        filter: invert(1) drop-shadow(0 0 0.5rem white);
        transform: scale(1);
    }
    50% {
        filter: invert(1) drop-shadow(0 0 calc(var(--width-supercell) / 2) white);
        transform: scale(1.2);
    }
    80% {
        transform: scale(1);
    }
    to {
        filter: invert(1) drop-shadow(0 0 100vw rgba(255, 255, 255, 0.1));
    }
}

.page2 nav {
    height: var(--nav-height);
    width: 100vw;
    position: fixed;
    background: linear-gradient(to bottom, var(--first-nav-grey), var(--second-nav-grey));
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    z-index: 5;
}

.page2 nav div {
    height: 100%;
    width: auto;
    /* border: 1px solid red; */
    transition: all 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--glassmophic-white);
    border-right: 1px solid var(--glassmophic-white);
    flex: 1;
}

.page2 nav img {
    height: auto;
    width: calc(var(--nav-height) - 1rem);
    transition: all 0.5s;
    display: flex;
    align-items: center;
}


/* .icon-nav-container {
    max-width: 700px;
} */

.page2 nav div:nth-child(3) {
    flex: 2;
}

.page2 nav div:nth-child(3) img {
    transform: scale(1.3) translateY(-1rem);
}


/* .page2 nav img:hover {
    transition: all 0.2s;
    transform: scale(1.3);
} */

.page2 nav .bg-select-nav {
    position: fixed;
    background: linear-gradient(to bottom, var(--first-selected-nav-blue), var(--second-selected-nav-blue));
    height: var(--nav-height);
    width: 33.333vw;
    bottom: 0;
    left: 33.333vw;
    z-index: -1;
    border: none;
    transition-duration: 0.4s;
}

.nav-icons {
    display: flex;
    flex-direction: column;
}

.nav-icons span {
    font-size: 0.6rem;
    color: white;
    text-shadow: 0 0.1rem 0.1rem rgba(0, 0, 0, 0.4), 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
    opacity: 0;
    position: absolute;
    bottom: 0rem;
    transition-duration: 0.5s;
}

.page2 main {
    background: white;
    height: calc(100vh - var(--nav-height));
    width: 100vw;
    position: fixed;
    top: 0;
    right: 200vw;
    display: grid;
    grid-auto-flow: column;
    transition-duration: 0.5s;
}

.page2 main::-webkit-scrollbar {
    display: none;
}

.page2 main {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.page2 main section {
    height: 100%;
    width: 100vw;
    display: flex;
    position: relative;
    justify-content: center;
}

.baule-regalo-container {
    width: 100vw;
    gap: 0.5rem;
    height: var(--baule-height);
    padding: 0.5rem;
    display: flex;
    position: fixed;
    bottom: var(--nav-height);
    box-sizing: border-box;
}

.baule-regalo-container div {
    border: 2px solid white;
    background-color: var(--glassmophic-white);
    border-radius: 0.5rem;
}

.baule-card {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.arena-baule-container {
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translatex(-50%);
    font-size: clamp(0.5rem, 1.5vw, 1rem);
}

.arena-card-error {
    font-size: 1rem;
    opacity: 0.4;
    color: white;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.4), 0 0.5rem 1rem rgba(0, 0, 0, 1);
}

.battaglia-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    gap: 0.4rem;
    position: fixed;
    bottom: calc(var(--nav-height) + var(--baule-height));
    width: 100%;
    padding: 0 10vw;
    box-sizing: border-box;
    margin: 0 0 0.5em 0
}

.battaglia-container button {
    color: white;
    height: 6rem;
    display: grid;
    border-radius: 0.5rem;
    place-items: center;
    font-size: 1.3rem;
    font-family: 'Supercell-Magic';
    text-shadow: 0 0 2em white;
    transition: all 0.5s;
    border: none;
    cursor: pointer;
}

.btn-battaglia {
    background-color: var(--second-orange);
}

.btn-battaglia:hover {
    filter: drop-shadow(0 0 1rem var(--second-orange));
}

.btn-party {
    background-color: var(--first-btn-blue);
    border: 1px solid red;
}

.btn-party:hover {
    filter: drop-shadow(0 0 1rem var(--first-btn-blue));
}

.battaglia-container button:active {
    transform: scale(0.9);
}


/* @media (max-width: 400px) {
    .page2 nav img {
        width: 15vw;
    }
} */

@media (max-width: 700px) {
    .baule-card:nth-of-type(4) {
        display: none;
    }
}