html,
body,
main {
    width: 100vw;
}

.header {
    font-family: 'Impact', 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
    font-size: 36px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    width: fill-available;
}

.site-id {
    text-decoration: none;
}

.cart-link {
    margin-left: auto;
}

.search-bar {
    display: flex;
    align-items: center;
    margin: 0 16px 0 16px;
    background-color: #7C7878;
    border-radius: 30px;
    padding: 14px 18px;
}

.search-bar img {
    width: 20px;
    margin-right: 10px;
}

.search-bar input {
    border: none;
    background: none;
    font-size: 16px;
    outline: none;
    color: white;
    width: 100%;
}

#search-input::placeholder {
    color: white;
}

.header-buttons {
    display: none;
}

.menu-header {
    font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: black;
    display: flex;
    flex-direction: row;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-left: -16px;
    padding-left: 16px;
    padding-right: 16px;
    justify-content: space-between;
}

.menu-header img {
    width: 24px;
    height: 24px;
    align-self: center;
}

.menu-header {
    padding-left: 32px;
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: start;
    position: absolute;
    background-color: white;
    width: 75vw;
    top: 0;
    left: -100%;
    transition: left 0.3s ease;
    height: 100vh;
    z-index: 1000;
}

.opened {
    display: block;
    left: 0;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: start;
    padding-left: 16px;
    margin-top: 8px;
}

.menu-buttons a {
    text-decoration: none;
    color: black;
    font-size: 18px;
}

.menu-buttons p {
    font-size: 18px;
}

.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background 0.3s ease;
    z-index: 999;
}

.menu-backdrop.opened {
    background: rgba(0, 0, 0, 0.4); 
    opacity: 1;
    pointer-events: auto;
}

.logo {
    white-space: nowrap;
    text-align: center;
}

.logo-red {
    color: #EE2A28;
}

.logo-black {
    color: #000000;
}

body {
    background-color: #D9D9D9;
}

.subheader {
    font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.5);
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 16px;
}

.subheader .active {
    font-weight: bold;
    color: black;
}

iframe {
    border: none;
    width: 100%;
    height: 250px;
}

.section-title {
    font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: bold;
    text-align: left;
    padding-left: 16px;
    padding-top: 16px;
}

.game-section {
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 16px;
    padding: 16px;
}

.game-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.game-title {
    font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    padding-top: 8px;
}

.price-add {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.add-button {
    width: 32px;
    height: auto;
}

.price {
    font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
}

.game-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    width: 100%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.25);
}

.details {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.genre-section {
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 16px;
    padding: 16px;
}

.genre-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.genre-list img {
    border-radius: 100px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.25);
    width: 100%;
    height: auto;
}

.genre-list p {
    font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
}

.preorder-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.preorder-list {
    background-color: #FFFFFF;
    border-radius: 8px;
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: row;
    height: 100%;
}

.preorder-details {
    display: flex;
    flex-direction: column;
    padding-left: 8px;
}

.preorder-details p {
    font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    margin-bottom: 8px;
}

.preorder-title {
    font-weight: bold;
}

.preorder-list img {
    border-radius: 8px;
}

@media screen and (min-width: 768px)  and (max-width: 1023px) {
    .header-buttons {
        display: flex;
        flex-direction: row;
        gap: 32px;
        align-items: center;
        margin-left: auto;
        margin-right: 24px;
    }

    .mobile-menu {
        display: none;
    }

    .cart-link {
        margin-left: auto;
        text-decoration: none;
        color: black;
        font-size: 16px;
        justify-items: center;
    }

    .track-orders {
        font-size: 16px;
    }

    .trade-in {
        font-size: 16px;
    }

    .track-orders,
    .trade-in,
    .cart-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .track-orders img,
    .trade-in img,
    .cart-link img {
        width: 24px;
        display: block;
    }

    .track-orders p,
    .trade-in p,
    .cart-link p {
        margin: 0;
        font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
        font-size: 14px;
    }
    
    iframe {
        height: 300px;
    }
    
    .game-section {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        padding: 24px;
    }

    .game-card {
        padding: 16px;
        gap: 8px;
    }

    .details {
        gap: 12px;
    }

    .details img {
        width: 24px;
        height: auto;
    }

    .genre-section {
        display: flex;
        flex-direction: row;
        gap: 16px;
        padding: 24px;
        justify-content: center;
        justify-content: space-between;
    }

    .genre-list img {
        width: 150px;
        height: auto;
        border-radius: 100px;
    }

    .genre-list p {
        font-size: 16px;
    }
}

@media screen and (min-width: 1024px) {
    .header {
        font-size: 48px;
        gap: 16px;
        padding: 32px;
    }

    .header img {
        width: 48px;
    }

    .header-buttons {
        display: flex;
        flex-direction: row;
        gap: 64px;
        align-items: center;
        margin-left: auto;
        margin-right: 32px;
    }

    .mobile-menu {
        display: none;
    }

    .cart-link {
        margin-left: auto;
        text-decoration: none;
        color: black;
        font-size: 16px;
        justify-items: center;
    }

    .track-orders {
        font-size: 16px;
    }

    .trade-in {
        font-size: 16px;
    }

    .track-orders,
    .trade-in,
    .cart-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .track-orders img,
    .trade-in img,
    .cart-link img {
        width: 32px;
        display: block;
    }

    .track-orders p,
    .trade-in p,
    .cart-link p {
        margin: 0;
        font-family: 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
        font-size: 18px;
    }

    .subheader {
        font-size: 24px;
        padding: 24px;
    }

    .search-bar {
        margin: 0 48px 0 48px;
        padding: 18px 24px;
    }

    .search-bar img {
        width: 24px;
        margin-right: 12px;
    }

    .search-bar input {
        font-size: 18px;
    }
    
    iframe {
        height: 400px;
    }

    .game-section {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
        padding: 32px;
    }

    .game-card {
        padding: 24px;
        gap: 16px;
    }

    .details {
        gap: 8px;
    }

    .details img {
        width: 24px;
        height: auto;
    }

    .genre-list img {
        width: 200px;
        height: auto;
        border-radius: 150px;
    }

    .genre-list p {
        font-size: 24px;
    }

    .genre-section {
        display: flex;
        flex-direction: row;
        gap: 32px;
        padding: 32px;
        justify-content: space-around;
    }

    .section-title {
        padding-left: 32px;
        font-size: 48px;
    }

    .preorder-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        padding: 32px;
    }

    .preorder-list {
        padding: 20px;
        gap: 16px;
    }

    .preorder-list img {
        width: 150px;
        height: auto;
        object-fit: cover; 
        flex-shrink: 0;
    }

    .preorder-details .preorder-title {
        font-size: 32px;
    }

    .preorder-details p {
        font-size: 24px;
    }

    .preorder-details {
        gap: 12px;
    }
}