/* 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: 150px;
    height: auto;
}

#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;
    cursor: pointer;
}

@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: 30px;
    isolation: isolate;
    position: fixed;
    width: 280px;
    height: 42.62px;
    left: calc(50% - 280px/2);
    bottom: 47.7px;
    background: rgba(0, 0, 0, 0.22);
    border: 0.7px solid #00FFBF;
    border-radius: 11px;
    backdrop-filter: blur(5px);
}

.nav-item {
    position: relative;
    padding-bottom: 0px;
}

.nav-item img {
    width: 22.07px;
    height: 22.07px;
    cursor: pointer;
    transition: 0.5s ease;
}

.nav-item.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 8.38px;
    height: 3.36px;
    background: #00FFB7;
    border-radius: 1.38px;
}

.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: 230px;
        height: 38px;
        gap: 25px;
        bottom: 32px;
        left: calc(50% - 230px / 2);
    }

    .nav-item img {
        width: 18px;
        height: 18px;
    }

    .nav-item.active::after {
        width: 7px;
        height: 2.5px;
    }
}

@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-wrapper {
    position: relative;
    width: 402px;
    left: -24px;
    display: flex;
    align-items: center;
}

.game-preview {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 12px;
    position: relative;
    width: 402px;
    overflow-x: scroll;
    left: 0px;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.game-preview::-webkit-scrollbar {
    display: none;
}

.game-preview img {
    width: 140px;
    height: 140px;
    background: #FFFFFF;
    border-radius: 24px;
    cursor: pointer;
}

.game-preview img.preview2 {
    width: auto;
    height: auto;
    background: #FFFFFF;
    border-radius: 12px;
    cursor: pointer;
}

.padstart {
    margin-left: 24px;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
}

.game-preview-wrapper:hover {
    .scroll-btn {
        display: flex;
    }
}

.scroll-icons {
    width: 18px;
    height: 18px;
}

.scroll-btn.left {
    left: 0px;
}

.scroll-btn.right {
    right: 0px;
}

.scroll-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

@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-wrapper {
        width: calc(100% + 32px);
        left: -16px;
    }

    .game-preview {
        width: calc(100% + 32px);
        gap: 10px;
    }

    .game-preview img {
        width: 110px;
        height: 110px;
        border-radius: 18px;
    }

    .game-preview img.preview2 {
        border-radius: 9px;
    }

    .padstart {
        margin-left: 16px;
    }

    .game-preview-wrapper:hover {
        .scroll-btn {
            display: none;
        }
    }
}

@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-wrapper {
        width: calc(100% + 40px);
        left: -20px;
    }

    .game-preview {
        width: calc(100% + 40px);
        gap: 11px;
    }

    .game-preview img {
        width: 125px;
        height: 125px;
        border-radius: 20px;
    }

    .game-preview img.preview2 {
        border-radius: 10px;
    }

    .padstart {
        margin-left: 20px;
    }

    .game-preview-wrapper:hover {
        .scroll-btn {
            display: none;
        }
    }
}

#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%;
    }
}

/* Styling for popups */
/* Overlay with subtle blur */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 28, 20, 0.75);
    backdrop-filter: blur(6px);
    z-index: 999;
}

/* Popup Box - Dark Glass Style */
.popup-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #036A50;
    padding: 24px 20px;
    width: 300px;
    border-radius: 16px;
    z-index: 1000;
    text-align: center;
    color: #fff;
    font-family: 'Lexend', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 255, 191, 0.15);
    border: 1px solid rgba(0, 255, 191, 0.2);
    transition: all 0.25s ease;
}

/* Optional: smooth entry */
.popup-box:not(.hidden) {
    transform: translate(-50%, -50%) scale(1);
}

/* Title / text */
.popup-box p,
.popup-box h3 {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.5;
    color: #d9fff4;
}

/* Input styling */
.popup-box input {
    width: 90%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 191, 0.3);
    background: #021c14;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.popup-box input:focus {
    border-color: #00ffbf;
    box-shadow: 0 0 0 2px rgba(0, 255, 191, 0.15);
}

/* Buttons aligned with your unsubscribe style */
.popup-box button {
    margin-top: 16px;
    padding: 12px;
    width: 100%;
    border-radius: 12px;
    border: 1.5px solid #00ffbf;
    background: transparent;
    color: #00ffbf;
    font-family: 'Lexend', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

/* Hover effect same as unsubscribe */
.popup-box button:hover {
    background: #00ffbf;
    color: #021c14;
}

/* Hidden */
.hidden {
    display: none;
}

/* Arabic */
body.rtl-lang .game-preview-wrapper,
body.rtl-lang .category-title,
body.rtl-lang footer {
    direction: rtl;
}

/* English */
body.ltr-lang .game-preview-wrapper,
body.ltr-lang .category-title,
body.ltr-lang footer {
    direction: ltr;
}

/* Arabic padstart */
body.rtl-lang .padstart {
    margin-left: 0;
    margin-right: 24px;
}

@media (max-width: 360px) {
    body.rtl-lang .padstart {
        margin-left: 0;
        margin-right: 16px;
    }
}

@media (min-width: 361px) and (max-width: 430px) {
    body.rtl-lang .padstart {
        margin-left: 0;
        margin-right: 20px;
    }
}

/* English padstart */
body.ltr-lang .padstart {
    margin-right: 0;
    margin-left: 24px;
}

@media (max-width: 360px) {
    body.ltr-lang .padstart {
        margin-right: 0;
        margin-left: 16px;
    }
}

@media (min-width: 361px) and (max-width: 430px) {
    body.ltr-lang .padstart {
        margin-right: 0;
        margin-left: 20px;
    }
}