*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --game-background-color: #F6F6F6;
    --gradient: linear-gradient(to right, white, white); 
    --color-pink: #ff0000;
}

html {
    font-size: 62.5%;
}

button:hover {
    cursor: pointer !important;
}

body {
    font-family: 'Lato' sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    min-height: 100vh;
    padding: 4rem;
    font-size: 2rem;
    font-weight: 400;
    background: white;
    background: var(--gradient white);
    gap: 4rem;
}

.searchBar {
    display: flex;
    justify-content: flex-start;
    position: relative;
    margin: 0 auto;
    width: 60%;
}

.searchBar__input {
    border: none;
    width: 40rem;
    font-size: 2rem;
    border: 0.3rem solid var(--color-pink);
    border-radius: 0.5rem;
    padding: 2rem 4rem;
    box-shadow: 0 0.5rem 1rem 0.5rem rgba(242, 112, 156, 0.3);
    padding-right: 6rem;
}

.searchBar__glass {
    width: 6rem;
    height: 100%;
    background: var(--color-pink);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 200%;
    color: white;
    position: absolute;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    left: calc(40rem - 6rem);
}

.checkout {
    padding: 4rem;
    width: 70%;
    height: 80%;
    background: var(--game-background-color);
    display: none;
    margin: 0 auto;
}

.checkout_list {
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-rows: repeat(3, 20rem);
}

.checkout_listitem {
    list-style: none;
    grid-row: span 1;
    border-bottom: 0.3rem solid rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.checkout_img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.modal {
    width: 50rem;
    height: 30rem;
    top: 20%;
    left: 50%;
    position: fixed;
    justify-content: center;
    align-items: center;
    background: #F6F6F6;
    box-shadow: 0 0 5rem 0 rgba(255, 0, 0, 0.3);
    color: green;
    font-size: 130%;
    font-weight: 400;
    border-radius: 0.5rem;
    display: none;
    transform: translateX(-50%);
}

.shoppinCart {
    position: fixed;
    top: 4rem;
    right: 4rem;
    background: rgb(255, 0, 0);
    width: 8rem;
    height: 8rem;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 100%;
}

.shoppinCart:hover {
    cursor: pointer;
}

.shoppinCart_message {
    width: 3rem;
    height: 3rem;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 50%;
    background: var(--gradient);
    border: 0.2rem solid rgb(0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    color: black;
}

main {
    width: 60%;
    height: 100%;
    margin: 0 auto;
}

.game {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 50rem 50rem;
    gap: 2rem;
}

.games_game {
    list-style: none;
    gap: 2rem;
    background: var(--game-background-color);
    border-radius: 0.5rem;
    transition: 0.8s opacity;
}

.games_game--fifth {
    grid-column: span 2;
}

.games_figure {
    width: 100%;
    height: 60%;
}

.games_img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.games_body {
    padding: 2rem;
    height: 40%;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: flex-end;
}

.games_h2 {
    font-size: 300%;
    font-weight: 700;
}

.games_h3 {
    font-size: 120%;
    font-weight: 400;
}

.games_stars {
    color: gold;
    font-size: 130%;
}

.games_button {
    width: 20rem;
    border: none;
    font-size: 90%;
    font-family: 'Lato', sans-serif;
    color: white;
    background-color: rgb(211, 34, 34);
    padding: 1rem 2rem;
}

.a-popup {
    animation-name: popup;
    animation-duration: 0.8s;
    animation-fill-mode: backwards;
    animation-timing-function: ease;
}

@media screen and (max-width:62.5rem) {
    body {
        padding: 2rem;
    }
    .searchBar{
        margin: 0;
    }
    .searchBar__input{
        flex-shrink: 0;
        width: 30rem;
    }
    .searchBar__glass{
        left: calc(30rem - 6rem);
    }
    main {
        width: 100%;
    }

    .game {
        display: grid;
        grid-template-columns: 100%;
        grid-auto-rows: 65rem 65rem 65rem;
        gap: 1rem;
    }

    .games_game--third {
        grid-column: span 1;
    }

    .modal {
        width: calc(100% - 4rem);
        left: auto;
    }

    .checkout {
        width: 100%;
    }

    .checkout_list {
        display: grid;
        grid-template-rows: repeat(3, 45rem);
    }

    .checkout_listitem {
        flex-direction: column;
        gap: 0.5rem;
        justify-content: space-between;
        padding-bottom: 2rem;
    }

    .checkout_img {
        height: 40%;
        width: 100%;
    }

    .shoppinCart{
        top: 20%;
    }

    .a-popup {
        animation-name: "no-animation";
        animation-duration: 0s;
    }
}

@keyframes popup {
    from {
        opacity: 0;
        transform:translateX(-50%) translateY(2rem);
    }

    to {
        opacity: 1;
        transform:translateX(-50%) translateY(0);
    }
}

a {
    border: 0.1rem solid;
    border-radius: 0.3rem;
    outline: 0;
    display: inline-block;
    padding: 1rem 1.5rem;
    margin-top: 2rem;
    color: #fff;
    background-color: #f01414;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: 0.4s;
}

a:hover {
    border-color: #000000;
    background-color: #fff;
    color: #000;
}