*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --game-background-color: #f6f6f6;
    --gradient: linear-gradient(to right, purple, #cbb4d4);
}

html {
    font-size: 62.5%;
}

button:hover {
    cursor: pointer !important;
}

body {
    font-family: 'lato', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-size: 2rem;
    font-weight: 400;
    padding: 4rem;
    background: var(--gradient);
}

.checkOut {
    width: 70%;
    height: 80%;
    background: var(--game-background-color);
    padding: 4rem;
    display: none;
}

.checkOut__list {
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-rows: repeat(12, 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-between;
}

.checkOut__image {
    display: flex;
    height: 100%;
    width: 10%;
    object-fit: contain;
    flex-direction: column;
}

.modal {
    width: 50rem;
    height: 30rem;
    position: absolute;
    background: green;
    position: fixed;
    top: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f6f6f6;
    box-shadow: 0 0 5rem 0 rgba(0, 0, 0, 0.3);
    color: green;
    font-size: 130%;
    font-weight: 400;
    border-radius: 0.5rem;
    display: none;
}

.shoppingCart {
    position: fixed;
    top: 4rem;
    right: 4rem;
    background: black;
    width: 8rem;
    height: 8rem;
    border: none;
    border-radius: 50%;
    color: #f6f6f6;
    font-size: white;
}

.terughomepage{
    position: fixed;
    top: 4rem;
    left: 4rem;
    background: purple;
    width: 8rem;
    height: 8rem;
    border: none;
    border-radius: 50%;
    color: #f6f6f6;
    font-size: white;
}

.shoppingCart:hover {
    cursor: pointer;
}

.shoppingCart__message {
    width: 3rem;
    height: 3rem;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 50%;
    background: var(--gradient);
    border: 0.2rem solid white;
    display: flex;
    justify-content: center;
    align-items: center;
}

main {
    width: 60%;
    height: 100%;
}

.games {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 50rem 50rem;
    gap: 1rem;
}

.games__game {
    list-style: none;
    background: var(--game-background-color);
    border-radius: 0.5rem;
}

.games__game--third {
    grid-column: span 2;
}

.game__figure {
    width: 70%;
    height: 55%;
}

.game__img {
    width: 75%;
    height: 100%;
    object-fit: contain;
    margin-left: 12rem;
}

.game__body {
    padding: 2rem;
    height: 40%;
    padding-top: 0%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: flex-end;
}

.game__h2 {
    font-size: 300%;
    font-weight: 700;
}

.game__h3 {
    font-size: 120%;
    font-weight: 400%;
}

.game__stars {
    color: gold;
    font-size: 130%;
}

.games__button,
.detail__button,
.back__button,
.total--price,
.change--product {
    display: inline-block;
    margin-top: 3rem;
    padding: 1.5rem;
    border: black 2px solid;
    width: 15rem;
    font-size: 4rem;
    padding: 1.5rem;
    text-decoration: none;
    font-size: 2rem;
    color: purple;
}

button:hover,
.change--product button:hover {
    background: darkmagenta;
    color: aliceblue;
}

button a,
.change--product button p {
    font-size: 2rem;
    text-decoration: none;
}

.a-popup {
    animation-name: popup;
    animation-duration: 0.8s;
    animation-fill-mode: backwards;
    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media screen and (max-width: 768px) {
    body {
        padding: 2rem;
    }

    main {
        width: 100%;
    }

    .games {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .games__game--third {
        grid-column: unset;
    }

    .modal {
        width: 100%;
    }

    .checkOut {
        width: 100%;
    }

    .checkOut__list {
        grid-template-rows: repeat(3, auto);
    }

    .checkOut__listItem {
        flex-direction: column;
        gap: 0.5rem;
        justify-content: space-between;
        padding-bottom: 2rem;
    }

    .checkOut__image {
        height: 40%;
        width: 100%;
    }

    .a-popup {
        animation-name: "broken";
        animation-duration: 0s;
    }
}

@media screen and (min-width: 769px) and (max-width: 1461px) {
    body {
        padding: 2rem;
    }

    main {
        width: 100%;
    }

    .games {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .games__game--third {
        grid-column: unset;
    }

    .modal {
        width: 100%;
    }

    .checkOut {
        width: 100%;
    }

    .checkOut__list {
        grid-template-rows: repeat(4, auto);
    }

    .checkOut__listItem {
        flex-direction: column;
        gap: 0.5rem;
        justify-content: space-between;
        padding-bottom: 2rem;
    }

    .checkOut__image {
        height: 40%;
        width: 100%;
    }

    .a-popup {
        animation-name: "broken";
        animation-duration: 0s;
    }
}
