/* Styling for basic structure */
:root {
    --mobile-width: 402px;
    --slider-left-html: 24px;
    --slider-width: 177px;
    --slider-left-android: calc(var(--slider-left-html) + var(--slider-width));
    --app-bg: linear-gradient(180deg, #00B880 0%, #002048 100%), #FFFFFF;
    --header-bg: #036A50;
    --header-border-color: #003024;
    --nav-color: rgba(0, 255, 183, 1);
    --android-color: #FFFFFF;
}

body {
    margin: 0;
    padding: 0;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#app-container {
    width: 100%;
    background: var(--app-bg);
    overflow-x: hidden;
    margin-top: 72px;
}

@media (min-width: 361px) and (max-width: 430px) {
    #app-container {
        transform: none;
    }
}

@media (min-width: 431px) and (max-width: 991px) {
    body {
        align-items: center;
    }

    #app-container {
        max-width: var(--mobile-width);
    }
}

@media (min-width: 992px) {
    body {
        align-items: center;
    }

    #app-container {
        max-width: var(--mobile-width);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    }
}

/* Necessary Fonts */
@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-Regular.ttf')format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Styling for header */
header {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    position: fixed;
    width: 100%;
    height: 72px;
    top: 0px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border-color);
    backdrop-filter: blur(4px);
    z-index: 3;
}

#logo {
    width: 123px;
    height: 27px;
}

#navicons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    color: var(--nav-color);
}

.nav-icon {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 5px;
    gap: 4.33px;
    min-width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.14);
    border-radius: 8px;
}

@media (max-width: 360px) {
    :root {
        --slider-width: calc(50% - 16px);
        --slider-left-html: 16px;
        --slider-left-android: calc(var(--slider-left-html) + var(--slider-width));
    }

    header {
        transform: none !important;
        left: 0;
        width: 100%;
    }
}

@media (min-width: 361px) and (max-width: 430px) {
    :root {
        --slider-width: calc(50% - 20px);
        --slider-left-html: 20px;
        --slider-left-android: calc(var(--slider-left-html) + var(--slider-width));
    }

    header {
        left: 0;
    }
}


@media (min-width: 431px) and (max-width: 991px) {
    :root {
        --slider-width: calc(50% - 24px);
        --slider-left-html: 24px;
        --button-width: 177px;
        --slider-left-android: calc(var(--slider-left-html) + var(--slider-width));
    }

    header {
        max-width: var(--mobile-width);
        margin: 0 auto;
    }
}


@media (min-width: 992px) {
    :root {
        --slider-width: 177px;
        --slider-left-html: 24px;
        --slider-left-android: calc(24px + 177px);
    }

    header {
        max-width: var(--mobile-width);
        margin: 0 auto;
    }
}

/* Styling of footer */
footer {
    position: fixed;
    width: 100%;
    height: 120px;
    bottom: 0px;
    background: linear-gradient(180deg, rgba(25, 25, 25, 0) 0%, rgba(25, 25, 25, 0.473509) 20.52%, #191919 100%);
}

#footnav {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 59.23px;
    isolation: isolate;
    position: fixed;
    width: 290.7px;
    height: 78.41px;
    left: calc(50% - 290.7px/2);
    bottom: 30px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid #00FFBF;
    border-radius: 16px;
    backdrop-filter: blur(5px);
}

.nav-item {
    position: relative;
    padding-bottom: 5px;
}

.nav-item img {
    width: 37.41px;
    height: 37.41px;
    cursor: pointer;
    transition: 0.5s ease;
}

.nav-item.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 12px;
    height: 8px;
    background: #00FFB7;
    border-radius: 2px;
}

.nav-item.active img {
    filter: brightness(0) saturate(100%) invert(58%) sepia(96%) saturate(451%) hue-rotate(96deg) brightness(102%) contrast(102%);
}

@media (max-width: 360px) {
    #footnav {
        width: 260px;
        height: 70px;
        gap: 50px;
        bottom: 20px;
        left: calc(50% - 260px / 2);
    }

    .nav-item img {
        width: 30px;
        height: 30px;
    }

    .nav-item.active::after {
        width: 10px;
        height: 6px;
    }
}

@media (min-width: 992px) {
    footer {
        width: 402px;
    }
}

/* Styling of main carousel */
#main-carousel {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    isolation: isolate;
    position: relative;
    margin-top: 10px;
    width: 100%;
    height: 232px;
}

.carousel-img {
    position: absolute;
    left: 50%;
    width: 354px;
    height: 232px;
    background: #FFFFFF;
    border-radius: 20px;
    transition: all 0.5s ease-in-out;
    z-index: 1;
    transform: translateX(-50%);
    cursor: pointer;
}

.carousel-img-left {
    position: absolute;
    left: -275.11px;
    width: 289.11px;
    height: 189.47px;
    background: #FFFFFF;
    border-radius: 16.3339px;
    z-index: 0;
    transition: all 0.5s ease-in-out;
}

.carousel-img-right {
    position: absolute;
    left: 388.11px;
    width: 289.11px;
    height: 189.47px;
    background: #FFFFFF;
    border-radius: 16.3339px;
    z-index: 0;
    transition: all 0.5s ease-in-out;
}

@media (max-width: 360px) {
    #main-carousel {
        min-height: 188px;
        gap: 8px;
    }

    .carousel-img {
        width: calc(100% - 32px);
    }

    .carousel-img-left {
        left: 50%;
        transform: translateX(-160%);
    }

    .carousel-img-right {
        left: 50%;
        transform: translateX(60%);
    }
}

@media (min-width: 361px) and (max-width: 430px) {
    .carousel-img {
        width: calc(100% - 40px);
    }

    .carousel-img-left {
        left: 50%;
        transform: translateX(-170%);
    }

    .carousel-img-right {
        left: 50%;
        transform: translateX(70%);
    }
}

@media (min-width: 431px) and (max-width: 991px) {
    #main-carousel {
        height: 220px;
    }

    .carousel-img {
        width: 330px;
        height: 220px;
    }

    .carousel-img-left,
    .carousel-img-right {
        width: 260px;
        height: 170px;
    }

    .carousel-img-left {
        left: -240px;
    }

    .carousel-img-right {
        left: 382px;
    }
}

/* Styling of Games Buttons */
#gamesdiv {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    padding: 0px 24px;
    position: relative;
    width: calc(100% - 48px);
    height: 48px;
    margin-top: 12px;
}

#slider {
    position: absolute;
    width: var(--slider-width);
    height: 48px;
    border-radius: 11px;
    background: #00383B;
    left: var(--slider-left-html);
    top: 0;
    z-index: 0;
    transition: all 0.3s ease;
}

.gamesbutton {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 6px;
    gap: 6px;
    width: 177px;
    height: 100%;
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 600;
    font-size: 13px;
    line-height: 16px;
    text-transform: uppercase;
    color: #FFFFFF;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.3;
    z-index: 1;
}

.gamesbutton img {
    width: 24px;
    height: 24px;
}

.gamesbutton.active {
    opacity: 1;
}

@media (max-width: 360px) {
    #gamesdiv {
        padding: 0px 16px;
        width: calc(100% - 32px);
        height: 42px;
        margin-top: 10px;
        /* gap: 6px; */
    }

    #slider {
        height: 42px;
        border-radius: 9px;
        left: 16px;
    }

    .gamesbutton {
        width: 150px;
        padding: 10px 4px;
        font-size: 11px;
        gap: 4px;
    }

    .gamesbutton img {
        width: 16px;
        height: 16px;
    }
}


@media (min-width: 361px) and (max-width: 430px) {
    #gamesdiv {
        padding: 0px 20px;
        width: calc(100% - 40px);
        height: 46px;
    }

    #slider {
        height: 46px;
        border-radius: 12px;
        left: 20px;
    }

    .gamesbutton {
        width: 165px;
        font-size: 12px;
        padding: 11px 5px;
    }

    .gamesbutton img {
        width: 18px;
        height: 18px;
    }
}

@media (min-width: 431px) and (max-width: 991px) {
    .gamesbutton img {
        width: 22px;
        height: 22px;
    }
}

/* Styling for game-previews */
.previewdiv {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px 0px 120px;
    gap: 19px;
    position: relative;
    width: calc(100% - 24px);
    left: 24px;
    margin-top: 14px;
}

.game-category {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    width: calc(100% - 24px);
}

.category-title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
    width: 354px;
    height: 25px;
    color: #FFFFFF;
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 300;
    font-size: 16px;
    line-height: 20px;
}

.text-bold {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 25px;
}

.game-preview {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 12px;
    position: relative;
    width: 402px;
    overflow-x: scroll;
    left: -24px;
    scrollbar-width: none;
}

.game-preview img {
    width: 140px;
    height: 140px;
    background: #FFFFFF;
    border-radius: 24px;
    cursor: pointer;
}

.padstart {
    margin-left: 24px;
}

@media (max-width: 360px) {
    .previewdiv {
        gap: 16px;
        width: calc(100% - 16px);
        left: 16px;
        margin-top: 10px;
    }

    .game-category {
        width: calc(100% - 16px);
        gap: 7px;
    }

    .category-title {
        width: 100%;
        font-size: 14px;
    }

    .text-bold {
        font-size: 18px;
    }

    .game-preview {
        width: calc(100% + 32px);
        gap: 10px;
        left: -16px;
    }

    .game-preview img {
        width: 110px;
        height: 110px;
        border-radius: 18px;
    }

    .padstart {
        margin-left: 16px;
    }
}

@media (min-width: 361px) and (max-width: 430px) {
    .previewdiv {
        width: calc(100% - 20px);
        left: 20px;
        gap: 17px;
    }

    .game-category {
        width: calc(100% - 20px);
        gap: 8px;
    }

    .category-title {
        width: 100%;
        font-size: 15px;
    }

    .text-bold {
        font-size: 19px;
    }

    .game-preview {
        width: calc(100% + 40px);
        gap: 11px;
        left: -20px;
    }

    .game-preview img {
        width: 125px;
        height: 125px;
        border-radius: 20px;
    }

    .padstart {
        margin-left: 20px;
    }
}

#modal {
    display: none;
    position: fixed;
    z-index: 4;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.3s ease-in-out;
    pointer-events: auto;
}

#close-btn {
    position: absolute;
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
    padding: 5px;
    cursor: pointer;
    background: #FFFFFF;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    text-align: center;
    color: #001126;
    outline: none;
    display: block;
    z-index: 6;
}

iframe {
    position: relative;
    top: 5%;
    width: 100%;
    height: 95%;
    border: none;
    display: block;
    z-index: 5;
}

@media (max-width: 360px) {
    #close-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
        top: 8px;
        right: 8px;
    }

    iframe {
        top: 8%;
        height: 92%;
    }
}

@media (min-width: 361px) and (max-width: 430px) {
    #close-btn {
        width: 34px;
        height: 34px;
        font-size: 19px;
        top: 10px;
        right: 10px;
    }

    iframe {
        top: 7%;
        height: 93%;
    }
}

@media (min-width: 431px) and (max-width: 991px) {
    #close-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 12px;
        right: 12px;
    }

    iframe {
        top: 6%;
        height: 94%;
    }
}

@media (min-width: 992px) {
    iframe {
        top: 5%;
        height: 95%;
    }
}