@font-face {
    font-family:'Nikumaru';
    src: url(/assets/fonts/nikumaru.otf);
}

:root{
    --white: #d6f2d7;
    --blue: #071a50;

    /* Sombras */
    --main-shadow: 10px 10px #071a5060;

    /* Cards */
    --card-radius: 15px;
    --card-padding: 15px;

    /* Colores de cards */
    --card-yellow-a: #f2d785;
    --card-yellow-b: #ce8d2d;

    --card-red-a: #ff7c48;
    --card-red-b: #ba2626;

    --card-blue-a: #57698e;
    --card-blue-b: #393459;

    --card-pink-a: #ffb091;
    --card-pink-b: #d34c41;

    --card-sky-a: #9ac8cb;
    --card-sky-b: #709aa3;

    --card-gray-a: #b7c3a3;
    --card-gray-b: #6d6e5e;

    --card-green-a: #8c9f80;
    --card-green-b: #5f856f;

    --card-purple-a: #918ac0;
    --card-purple-b: #57698e;
}

*{
    box-sizing: border-box;
    font-family: 'Nikumaru', sans-serif;
}
::-webkit-scrollbar{
    width: 0;
    background: transparent;
}

html,body{
    min-height: 100%;
    width: 100%;
    margin: 0;
    color: var(--white);
}

html{
    background-color: var(--white);
}

body{
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    align-content: center;
    justify-items: center;
    grid-row-gap: 30px;
    overflow-x: hidden;
    transition: opacity 0.1s ease-in-out;
    opacity: 0;
    min-height: 100vh;
}

.fade-in{
    opacity: 1!important;
}

.container{
    display: grid;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-color: #4cbcf8;
    overflow: hidden;
}

.container > canvas{
    position: absolute;
}

.card{
    position: relative;
    display: grid;
    grid-template-rows: auto max-content;
    width: 480px;
    height: 680px;
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    margin: 0px 20px;
    background-color: var(--white);
    box-shadow: 0px 10px 10px rgba(0,0,0,.4);
    transition: transform 0.2s ease-in-out;
}

.card.show{
    animation: cardShow .5s forwards ease-out;
}

.card.show-reverse{
    animation: cardShowReverse .5s forwards ease-out;
}

.text{
    position: relative;
    z-index: 1;
}

.text::before {
    content: attr(data-text);
}

.text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    z-index: -1;
    -webkit-text-stroke: 6px var(--white);
    font-size: 1em;
}

.card > .background{
    position: absolute;
    top: var(--card-padding);
    left: var(--card-padding);
    bottom: var(--card-padding);
    right: var(--card-padding);
    border-radius: var(--card-radius);
    transition: background-color .2s ease-in-out;
    overflow: hidden;
}

.card > .background > .mask{
    width: 100%;
    height: 100%;
    background-size: cover;
    background-color: white;
    opacity: 0.25;
}

.card > .content{
    position: relative;
    display: grid;
    grid-template-rows: max-content auto;
    padding: var(--card-padding);
    color: var(--blue);
}

.card > .content > .header{
    display: grid;
    gap: 10px;
    justify-content: center;
    justify-items: center;
    align-items: baseline;
    grid-auto-rows: max-content;
}

.card > .content > .header > .name{
    display: grid;
    justify-items: center;
    position: relative;
    font-size: 4em;
    z-index: 99;
}

.card > .content > .header > .name > *{
    font-size: inherit;
    text-align: center;
}

.card > .content > .header > .name > input{
    background-color: transparent;
    border: none;
    color: transparent;
    caret-color: var(--blue);
    width: 80%;
    z-index: 2;
}

.card > .content > .header > .name > input::placeholder{
    color: var(--blue);
}

.card > .content > .header > .name > input:focus{
    outline: none;
}

.card > .content > .header > .name > span{
    position: absolute;
    margin-top: 3px;
    pointer-events: none;
    width: max-content;
    
}

.card > .content > .header > .team{
    font-size: 2.2em;
}

.card > .content > .body{}

.card > .content > .body > .character{
    position: absolute;
    z-index: 2;
    pointer-events: none;
    user-select: none;
}

.card > .content > .body > .stats{
    display: grid;
    gap: 10px;
    position: absolute;
    z-index: 2;
}

.card > .content > .body > .stats > [data-stat]{
    position: relative;
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    gap: 10px;
    font-size: 2em;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color:transparent;
}

.card > .content > .body > .stats > [data-stat] > .icon{
    position: relative;
    background-repeat: no-repeat;
    background-size: contain;
}

.card > .content > .body > .stats > [data-stat] > .text{
    display: grid;
    justify-self: right;
}

.card > .content > .body > .stats > [data-stat] > .changers{
    display: grid;
    justify-content: center;
    align-items: center;
    position: absolute;
    right: -38px;
    z-index: 2;
}

.card > .content > .body > .stats > [data-stat] > .changers > *{
    width: 28px;
    height: 28px;
    background-repeat: no-repeat;
    background-size: cover;
    transition: transform 0.1s ease-in-out, filter 0.1s ease-in-out;
}

.card > .content > .body > .stats > [data-stat]:active > .changers *{
    transform: scale(.9);
    filter: brightness(1.1);
}

.card > .content > .body > .stats > [data-stat=rock] > .icon{
    width: 50px;
    height: 49px;
}

.card > .content > .body > .stats > [data-stat=rock] > .text{
    margin-top: 15px;
}

.card > .content > .body > .stats > [data-stat=rock] > .changers{
    margin-top: 15px;
}

.card > .content > .body > .stats > [data-stat=paper] > .icon{
    width: 50px;
    height: 55px;
}

.card > .content > .body > .stats > [data-stat=paper] > .text{
    margin-top: 20px;
}

.card > .content > .body > .stats > [data-stat=paper] > .changers{
    margin-top: 20px;
}

.card > .content > .body > .stats > [data-stat=scissors] > .icon{
    width: 50px;
    height: 56px;
}

.card > .content > .body > .stats > [data-stat=scissors] > .text{
    margin-top: 18px;
}

.card > .content > .body > .stats > [data-stat=scissors] > .changers{
    margin-top: 18px;
}

.card > .footer{
    display: grid;
    grid-auto-flow: column;
    justify-content: space-between;
    justify-items: center;
    align-items: center;
    position: relative;
    height: 76px;
    background-color: var(--card-yellow-b);
    padding: 0px 20px;
    z-index: 1;
    border-radius: 0px 0px var(--card-radius) var(--card-radius);
    transition: background-color 0.2s ease-in-out;
    pointer-events: none;
    user-select: none;
    background-color: transparent!important;
}

.card > .footer > .ranking{
    color: var(--blue);
    font-size: 2em;
}

.card > .footer > .ql-points{
    display: grid;
    justify-content: flex-end;
    align-items: center;
    width: 155px;
    height: 51px;
    padding-right: 15px;
    color: var(--blue);
    font-size: 1.5em;
}

.card > .border{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    border: var(--card-padding) solid var(--white);
    border-radius: var(--card-radius);
    pointer-events: none;
}

.title{
    position: absolute;
    top: 30px;
    color: var(--blue);
    font-size: 2em;
}

/* Actions */
.actions{
    display: grid;
    grid-auto-flow: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    transition: transform 0.2s ease-in-out;
}

.actions > *{
    display: grid;
    cursor: pointer;
    transition: transform 0.1s ease-in-out, filter 0.1s ease-in-out;
    user-select: none;
    -webkit-tap-highlight-color:transparent;
}

.actions > *:active{
    transform: scale(.9);
    filter: brightness(1.1);
}

.actions > [data-action=prev], .actions > [data-action=next]{
    width: 64px;
    height: 46px;
}

.actions > [data-action=random]{
    width: 76px;
    height: 61px;
}

.actions > [data-action=share]{
    width: 61px;
    height: 63px;
}

.actions > [data-action=background]{
    width: 65px;
    height: 67px;
    filter: grayscale(0);
    transition: filter 0.1s ease-in-out;
}

.actions > [data-action=background].disabled{
    filter: grayscale(1);
}

@media (max-width: 470px) {
    .actions{
        transform: scale(0.8);
    }
}

@media (max-width: 370px) {
    .actions{
        transform: scale(0.7);
    }
}

@keyframes cardShow {
    from{
        opacity: 0;
        transform: rotate(8deg) translate(100px,10px);
    }
    to{
        opacity: 1;
        transform: rotate(0deg) translate(0px,0px);
    }
}

@keyframes cardShowReverse {
    from{
        opacity: 0;
        transform: rotate(-8deg) translate(-100px,-10px);
    }
    to{
        opacity: 1;
        transform: rotate(0deg) translate(0px,0px);
    }
}

@media (max-width: 540px) {
    .card{
        transform: scale(.7);
    }

    @keyframes cardShow {
        from{
            opacity: 0;
            transform: scale(.7) rotate(8deg) translate(100px,10px);
        }
        to{
            opacity: 1;
            transform: scale(.7) rotate(0deg) translate(0px,0px);
        }
    }

    @keyframes cardShowReverse {
        from{
            opacity: 0;
            transform: scale(.7) rotate(-8deg) translate(-100px,10px);
        }
        to{
            opacity: 1;
            transform: scale(.7) rotate(0deg) translate(0px,0px);
        }
    }
}

@media (max-width: 380px) {
    .card{
        transform: scale(.6);
    }

    @keyframes cardShow {
        from{
            opacity: 0;
            transform: scale(.6) rotate(8deg) translate(100px,10px);
        }
        to{
            opacity: 1;
            transform: scale(.6) rotate(0deg) translate(0px,0px);
        }
    }

    @keyframes cardShowReverse {
        from{
            opacity: 0;
            transform: scale(.6) rotate(-8deg) translate(-100px,-10px);
        }
        to{
            opacity: 1;
            transform: scale(.6) rotate(0deg) translate(0px,0px);
        }
    }
}