@import url('https://fonts.googleapis.com/css2?family=Caveat+Brush&display=swap');

* {
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(#C35B91, #5D2B45);
    color: white;
}

.home {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game {
    height: 100vh;
}

.hearts-bg {
    display: none;
}

.content {
    width: 50vw;
    height: 50vh;
    margin: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}

.content hr {
    width: 100%;
}

.controls hr {
    height: 150px;
}

.start-button {
    margin: 5%;
    width: 50%;
    padding: 3%;
    border: none;
    border-radius: 16px;
    background: linear-gradient(pink, #EE499E);
    color: white;
    font-family: "Caveat Brush", cursive;
    font-style: italic;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.top-bar {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    height: 25vh;
    width: 100%;
    z-index: 10;
    background: #692747;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.bottom-bar {
    background-color: #692747;
    height: 20vh;
    width: 100%;
    position: relative;
    bottom: 20vh;
    z-index: 10;
}

.hidden {
    display: none;
}

.start-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.game-area {
    height: 75vh;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.countdown {
    position: absolute;
    top: 3.5%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 25%;
    height: 8%;
    background-color: #692747;

    border-radius: 0 0 25px 25px;

    font-size: 2rem;
    text-align: center;
    font-weight: bold;
    color: white;

    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

@keyframes slide-message {
    from {
        left: 110%;
    }

    to {
        left: -110%;
    }
}

@keyframes blink-message {
    50% {
        opacity: 0;
    }
}

.message {
    position: absolute;
    top: 35%;
    left: 110%;

    white-space: nowrap;

    font-size: 2rem;
    font-weight: bold;
    color: white;

    z-index: 20;

    animation:
        slide-message 4s linear infinite,
        blink-message 0.35s step-end infinite;
}


.lives {
    position: absolute;
    top: 5rem;

    width: 10.5vw;
    height: 20.5vh;
    background-color: #692747;

    border-radius: 0 25px 25px 0;

    font-size: 2rem;
    text-align: center;
    font-weight: bold;
    color: white;

    z-index: 5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.lives ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    list-style: none;
}

.lives img {
    width: 1.25em;
    height: 1.25em;
    image-rendering: pixelated;
}

.heart {
    position: absolute;
    height: 100px;
    width: 100px;
    top: -100px;
    z-index: 2;
    image-rendering: pixelated;
    pointer-events: none;
}

.player {
    width: 150px;
    height: 175px;
    position: absolute;
    z-index: 3;
    bottom: 20vh;
    left: 50%;
    transform: translateX(-50%);
    image-rendering: pixelated;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 5%;
}

.control-btn,
.control-btn img {
    min-width: 15vw;
    background: none;
    border: none;
    cursor: pointer;

    touch-action: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.control-btn img {
    pointer-events: none;
    min-width: 50%;
    min-height: 50%;
}

.title {
    text-align: center;
    font-size: 2rem;
    width: 6em;
    align-self: center;
    font-family: "Caveat Brush", cursive;
}

.logo {
    display: flex;
    justify-content: center;
}

@media (max-width: 768px) {
    .game-area {
        height: 75vh;
    }

    button {
        font-size: 20px;
    }

    .home {
        position: relative;
        overflow: hidden;
    }

    .content {
        width: 85vw;
        height: auto;
        position: relative;
        z-index: 2;
    }

    .hearts-bg {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-width: 420px;
        pointer-events: none;
        z-index: 0;
        
    }
}