/*RESET GLOBAL*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;

}
body {
    background-color: #73462c; /* Cor de terra/marrom */
    font-family: Arial, sans-serif;
}
.game-board {
    touch-action: none;
    width: 100%;
    height: 70vh;
    max-height: 500px;
    border-bottom: 40px solid rgb(35, 160, 35);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: linear-gradient(#87CEEB, #E0F6FF);

    box-shadow: 0 4px 0px 0px #000;
}

.game-board::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(0, 0, 0, 0.2); /* Sombra sob a grama */
}

.pipe {
    position: absolute;
    bottom: 0;
    width: 80px;

    animation: pipe-animation 2s infinite linear;

}

.mario {
    width: 180px;
    position: absolute;
    bottom: 0;

}

.jump {
    animation: jump 500ms 1 linear;
}

@keyframes pipe-animation {
    from {
        right: -80px;

    }

    to {
        right: 100%;

    }

}

.jump {

    animation: jump 500ms 1 linear;
}

@keyframes jump {
    0% {
        bottom: 0;
    }

    30% {
        bottom: 180px;
    }

    70% {
        bottom: 180px;
    }

    100% {
        bottom: 0;
    }
}

.clouds {
    width: 550px;
    position: absolute;
    animation: clouds-animation 20s infinite linear;
}

@keyframes clouds-animation {
    from {
        right: -550px;
    }

    to {
        right: 100%;
    }
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 60px 0; /* Aumentei um pouco para dar mais destaque à terra */
    width: 100%;
    background-color: #73462c; /* Mantém a cor de terra */
}


.social-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #27058c;
    font-weight: bold;
    transition: transform 0.2s;
    background-color: #ffffff;
    color: #cf0dff;
    padding: 10px 20px;
    border-radius: 8px;
    width: 250px;


    border: 3px solid #333;
    box-shadow: 4px 4px 0px #000;

    font-weight: bold;
    transition: all 0.2s;
}


.img-git {
    height: 40px;
    margin-left: 10px;
}

.title {
    font-weight: bold;
    font-size: larger;
}

.social-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000;
    background-color: #e0f6ff;
}

.score {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 50px;
    font-weight: bold;
    color: white;
    text-shadow: 3px 3px 0px #000;
    z-index: 10;
}


@media (max-width: 600px) {
    .mario {
        width: 100px;
    }

    .pipe {
        width: 50px;
    }

    .score {
        font-size: 40px;
        right: 20px;
    }
}

@media (max-width: 600px) {

    canvas,
    img,
    div {
        touch-action: manipulation;
    }
}

.jump {

    animation: jump 500ms 1 ease-in-out;
}

canvas,
img,
div,
body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.restart-button {

    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    background-color: #23a023;
    border: 4px solid #000;
    box-shadow: 5px 5px 0px #000;
    cursor: pointer;
    z-index: 100;
    text-transform: uppercase;
    border-radius: 8px;
}


.restart-button:active {
    box-shadow: 2px 2px 0px #000;
    transform: translate(-48%, -48%);
}


.restart-button:active {
    box-shadow: 2px 2px 0px #000;
    transform: translate(-48%, -48%);
}

.high-score {
    position: absolute;
    top: 80px;
    right: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 25px;
    font-weight: bold;
    color: #ffce00;
    text-shadow: 2px 2px 0px #000;
    z-index: 10;
}

/* Efeito de piscar quando bate o recorde */
.new-record {
    animation: blink 0.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@media (max-width: 600px) {
    .high-score {
        top: 70px;
        font-size: 20px;
    }
}