* {
    font-family: 'Aladin';
    font-style: normal;
    font-weight: 400;
    box-sizing: border-box;
}

#toggle_screen{
    display: none;
}

#buttons{
    display: none;
}

body {
    background-image: url('img/7.Backgrounds/BG.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    backdrop-filter: blur(6px);
    height: 100vh;
}


canvas {
    display: block;
    background-color: black;

}

.logo {
    margin-top: 20px;
    margin-bottom: 20px;
}

.logo img {
    width: 400px;
}

.main-content {
    position: relative;
    height: 480px;
    width: 720px;

    box-sizing: border-box;
    box-shadow: 0px 0px 41px 15px rgba(32, 21, 171, 0.7);
    -webkit-box-shadow: 0px 0px 41px 15px rgba(32, 21, 171, 0.7);
    -moz-box-shadow: 1px -1px 41px 15px rgba(32, 21, 171, 0.7);
}

.start-game {
    position: absolute;
    top: 0;
    left: 0;
    background-image: url('./img/7.Backgrounds/Mesa de trabajo 1.png');
    background-size: cover;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    flex-direction: column;
    align-items: center;

}



.start-game img {
    width: 30%;

}

.start-game img:hover {
    scale: 1.2;
    cursor: pointer;

}

/* Wobble Vertical */
@keyframes hvr-wobble-vertical {
    16.65% {
        -webkit-transform: translateY(8px);
        transform: translateY(8px);
    }

    33.3% {
        -webkit-transform: translateY(-6px);
        transform: translateY(-6px);
    }

    49.95% {
        -webkit-transform: translateY(4px);
        transform: translateY(4px);
    }

    66.6% {
        -webkit-transform: translateY(-2px);
        transform: translateY(-2px);
    }

    83.25% {
        -webkit-transform: translateY(1px);
        transform: translateY(1px);
    }

    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}


.hvr-wobble-vertical {
    display: inline-block;
    vertical-align: middle;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -moz-osx-font-smoothing: grayscale;
}

.hvr-wobble-vertical:hover,
.hvr-wobble-vertical:focus,
.hvr-wobble-vertical:active {
    -webkit-animation-name: hvr-wobble-vertical;
    animation-name: hvr-wobble-vertical;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-timing-function: ease-in-out;
    animation-timing-function: ease-in-out;
    -webkit-animation-iteration-count: 1;
    animation-iteration-count: 1;
}

#sound {
    position: absolute;
    top: 10px;
    right: 10px;
    height: 8%;
    width: 6%;
    z-index: 3;
    cursor: pointer;
}

#info {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 8%;
    width: 6%;
}

h1 {
    font-size: 3rem;
    margin-top: -45px;
}

.d-none {
    display: none !important;
}

#how_to_play {
    color: rgb(170, 39, 193);
    padding: 5%;
    font-size: 32px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    background-image: url('./img/7.Backgrounds/Mesa de trabajo 1.png');
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 37px 37px 37px 37px;
    -webkit-border-radius: 37px 37px 37px 37px;
    -moz-border-radius: 37px 37px 37px 37px;
    box-sizing: border-box;
}

#how_to_play img {
    width: 60%;
    height: 60%;
}

#how_to_play span {
    background-color: rgba(127, 255, 212, 0.8);
    padding: 4%;
    border-radius: 37px 37px 37px 37px;
    -webkit-border-radius: 37px 37px 37px 37px;
    -moz-border-radius: 37px 37px 37px 37px;
}

#back {
    position: absolute;
    top: 25px;
    right: 50px;
    width: 10% !important;
    height: 12% !important;
    cursor: pointer;

    &:hover {
        scale: 1.2;
        cursor: pointer;
    }
}

#gameover {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    z-index: 10;
    align-items: center;
    justify-content: space-evenly;

}

#over_img {
    width: 60%;
}

#try_again {
    width: 40%;

    &:hover {
        scale: 1.2;
    }
}

#winning_screen {
    display: flex;
    z-index: 12;
    background-image: url('./img/6.Botones/Tittles/You win/Mesa de trabajo 1.png');
    background-size: contain;
    height: 100%;
    width: 100%;
    border-radius: 37px 37px 37px 37px;
    -webkit-border-radius: 37px 37px 37px 37px;
    -moz-border-radius: 37px 37px 37px 37px;
}

.winner {
    width: 35%;
    height: 12%;
    position: absolute;
    right: 30%;
    bottom: 25%;

    &:hover {
        scale: 1.2;
        cursor: pointer;
    }
}

#htP {
    position: absolute;
    top: 3%;
    left: 10%;
    font-size: 32px;
}

footer{
    position: fixed;
    bottom: 0;
    & a{
    text-decoration: none;
    color: white;
    }
}

.loader {
    border: 16px solid #f3f3f3;
    /* Light grey */
    border-top: 16px solid #3498db;
    /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

#loader {
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    height: 100%;
    width: 100%;
    background-color: #3498db;
    position: absolute;
    top: 0;
    left: 0;
   
}

.display_flex {
    display: flex;
    align-self: center;
    justify-content: center;
}

.roll-in-right {
    -webkit-animation: roll-in-right 0.6s ease-out both;
    animation: roll-in-right 0.6s ease-out both;
}

.roll-in-left {
    -webkit-animation: roll-in-left 0.6s ease-out 1s both;
    animation: roll-in-left 0.6s ease-out 1s both;
}

.heartbeat {
    -webkit-animation: heartbeat 1.5s ease-in-out infinite both;
    animation: heartbeat 1.5s ease-in-out infinite both;
}



/**
 * ----------------------------------------
 * animation roll-in-right
 * ----------------------------------------
 */
@-webkit-keyframes roll-in-right {
    0% {
        -webkit-transform: translateX(800px) rotate(540deg);
        transform: translateX(800px) rotate(540deg);
        opacity: 0;
    }

    100% {
        -webkit-transform: translateX(0) rotate(0deg);
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes roll-in-right {
    0% {
        -webkit-transform: translateX(800px) rotate(540deg);
        transform: translateX(800px) rotate(540deg);
        opacity: 0;
    }

    100% {
        -webkit-transform: translateX(0) rotate(0deg);
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}



/**
 * ----------------------------------------
 * animation roll-in-left
 * ----------------------------------------
 */
@-webkit-keyframes roll-in-left {
    0% {
        -webkit-transform: translateX(-800px) rotate(-540deg);
        transform: translateX(-800px) rotate(-540deg);
        opacity: 0;
    }

    100% {
        -webkit-transform: translateX(0) rotate(0deg);
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes roll-in-left {
    0% {
        -webkit-transform: translateX(-800px) rotate(-540deg);
        transform: translateX(-800px) rotate(-540deg);
        opacity: 0;
    }

    100% {
        -webkit-transform: translateX(0) rotate(0deg);
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}


/**
 * ----------------------------------------
 * animation heartbeat
 * ----------------------------------------
 */
@-webkit-keyframes heartbeat {
    from {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transform-origin: center center;
        transform-origin: center center;
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }

    10% {
        -webkit-transform: scale(0.91);
        transform: scale(0.91);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }

    17% {
        -webkit-transform: scale(0.98);
        transform: scale(0.98);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }

    33% {
        -webkit-transform: scale(0.87);
        transform: scale(0.87);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }

    45% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
}

@keyframes heartbeat {
    from {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transform-origin: center center;
        transform-origin: center center;
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }

    10% {
        -webkit-transform: scale(0.91);
        transform: scale(0.91);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }

    17% {
        -webkit-transform: scale(0.98);
        transform: scale(0.98);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }

    33% {
        -webkit-transform: scale(0.87);
        transform: scale(0.87);
        -webkit-animation-timing-function: ease-in;
        animation-timing-function: ease-in;
    }

    45% {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-animation-timing-function: ease-out;
        animation-timing-function: ease-out;
    }
}

/* Smartphones*/
@media only screen and (max-width: 760px) {
    canvas {
        width: 100%;
    }

    .main-content {
        width: 100%;
    }

    .logo {
        display: none;
    }

    h1 {
        font-size: 2.5rem;
    }

    footer {
        display: none;
    }

    .winner {
        right: 10%;
        bottom: 5%;
    }

    #buttons {
        position: absolute;
        z-index: 99;
        bottom: 3%;
        width: 100%;
        display: none;
        align-items: center;
    }
    
    .arrows {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-left: 2%;
    }
    
    #attack {
        position: absolute;
        right: 2%;
        bottom: 3%;
    }
}

@media only screen and (max-height: 480px) {
    canvas {
        height: 100vh;
        width: 100%;
    }

    .main-content {
        height: 100vh;
        width: 100%;
    }

    .logo {
        display: none;
    }

    .winner {
        right: 10%;
        bottom: 5%;
    }

    footer {
        display: none;
    }

    #buttons {
        opacity: 0.7;
        position: absolute;
        z-index: 99;
        bottom: 3%;
        width: 100%;
        display: none;
        align-items: center;
        justify-content: space-between;
        padding-right: 5%;
        padding-left: 5%;
    }
    
    .arrows {
        display: flex;
        flex-direction: column;
        align-items: center;
        
    }
}

@media screen and (max-width: 460px) {
    h1 {
        font-size: 1.9rem;
    }

    footer {
        display: none;
    }
}

@media screen and (orientation: portrait) {
    #toggle_screen {
        z-index: 999;
        background-color: aqua;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        & img{
            width: 100%;
        }
    }
}

@media screen and (orientation: landscape) {
    #toggle_screen {
        display: none !important;
    }
}

@media (min-width: 940px) {
    canvas {
        border-radius: 37px 37px 37px 37px;
        -webkit-border-radius: 37px 37px 37px 37px;
        -moz-border-radius: 37px 37px 37px 37px;
    }

    .main-content {
        border-radius: 37px 37px 37px 37px;
        -webkit-border-radius: 37px 37px 37px 37px;
        -moz-border-radius: 37px 37px 37px 37px;
    }

    .start-game {
        border-radius: 37px 37px 37px 37px;
        -webkit-border-radius: 37px 37px 37px 37px;
        -moz-border-radius: 37px 37px 37px 37px;
    }

    #toggle_screen {
        display: none;
    }

    #loader{
        border-radius: 37px 37px 37px 37px;
        -webkit-border-radius: 37px 37px 37px 37px;
        -moz-border-radius: 37px 37px 37px 37px;
    }

    #buttons{
        display: none !important;
    }
}