@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    width: 100%;
    font-family: "Lexend", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background-color: #0b1a30;
}

.member-menu {
    position: relative;
}

.gravity-member-login {
    left: -27.1%;
}

/* ==========================================================
   EVENT SWIPER
========================================================== */

.event-swiper {
    position: absolute !important;

    top: 80%;
    left: 50%;

    transform: translateX(-50%);

    width: min(1240px, calc(100% - 40px));
    height: 90px;

    overflow: hidden;

    z-index: 5;
}

.event-swiper .swiper-wrapper {
    align-items: center;
}

.event-swiper .swiper-slide {
    height: 90px;

    opacity: 0.4;

    filter: blur(0.6px);

    cursor: pointer;

    transition:
        opacity 0.35s ease,
        filter 0.35s ease;
}

.event-swiper .swiper-slide-active {
    opacity: 1;

    filter: none;
}


/* ==========================================================
   EVENT BANNER
========================================================== */

.event-banner {
    position: relative;

    width: 100%;
    height: 90px;

    background: #000;

    border-radius: 5px;

    overflow: hidden;

    color: #fff;
}

.event-banner__line {
    position: absolute;

    top: 0;
    left: 0;

    width: 0;
    height: 4px;

    background: #f00;

    z-index: 2;
}

.event-banner__content {
    position: absolute;

    top: 21px;
    left: 30px;
    right: 20px;

    min-width: 0;
}

.event-banner__small {
    margin-bottom: 2px;

    font-size: 14px;

    font-weight: 400;

    line-height: 20px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.event-banner__title {
    font-size: 19px;

    font-weight: 700;

    line-height: 26px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* ==========================================================
   RESPONSIVE EVENT SWIPER
========================================================== */

@media (max-width: 900px) {

    .event-swiper {
        width: calc(100% - 30px);
    }

    .event-banner__content {
        left: 20px;
    }

    .event-banner__small {
        font-size: 12px;
    }

    .event-banner__title {
        font-size: 15px;

        line-height: 21px;
    }
}


@media (max-width: 600px) {

    .event-swiper {
        width: calc(100% - 20px);
    }

    .event-banner__content {
        top: 20px;

        left: 15px;
    }

    .event-banner__small {
        font-size: 11px;
    }

    .event-banner__title {
        font-size: 13px;

        line-height: 18px;
    }
}


/* ==========================================================
   SECTION 1
========================================================== */

.ggl-section1 {
    position: sticky;
    top: 0;

    z-index: 1;
}


/* ==========================================================
   BACKGROUND CAROUSEL
========================================================== */

.carousel-container {
    position: relative;

    width: 100%;
    height: auto;

    overflow: hidden;
    touch-action: pan-y;
}

/* DESKTOP BANNER SLIDER */
.carousel-container--mobile {
    display: none;
}

/* MOBILE BANNER SLIDER */
@media (max-width: 767px) {
    .carousel-container--desktop {
        display: none;
    }

    .carousel-container--mobile {
        display: block;
    }
}

.carousel-track {
    display: grid;

    grid-template-areas: "slide";

    width: 100%;
}

.slide {
    position: relative;
    grid-area: slide;

    width: 100%;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.8s ease-in-out,
        visibility 0.8s ease-in-out;

    display: flex;

    justify-content: center;
    align-items: center;

    background-color: #0d2a4a;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide>a,
.slide picture {
    display: block;
    width: 100%;
}

.slide>a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.slide picture {
    margin-inline: auto;
    max-width: 1920px;
}

.slide img {
    width: 100%;
    height: auto;

    display: block;
}


/* ==========================================================
   NAVIGATION CONTROLS
========================================================== */

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgb(0 0 0 / 15%);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-radius: 10px;
    z-index: 10;
    transition: background 0.7s ease;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.637);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}


/* ==========================================================
   CAROUSEL DOTS
========================================================== */

.carousel-dots {
    position: absolute;

    bottom: 3%;
    left: 50%;

    transform: translateX(-50%);

    display: flex;

    gap: 10px;

    z-index: 10;

    display: none;
}

.dot {
    display: block;
    width: 12px;
    height: 12px;

    padding: 0;
    border: 0;
    border-radius: 50%;

    background: rgb(255 0 0 / 40%);

    cursor: pointer;

    transition:
        background 0.3s ease,
        width 0.3s ease;
}

.dot.active {
    background: #ff0000;
}


/* ==========================================================
   SECTION 2
========================================================== */

.ggl-section2 {
    position: relative;

    z-index: 2;

    --section-transition-height: clamp(28px, 5vw, 56px);

    margin-top: calc(0px - var(--section-transition-height));
    padding: calc(30px + var(--section-transition-height)) 5% 70px;
    border-radius: 0;
    box-shadow: none;

    background: linear-gradient(
        180deg,
        rgb(255 255 255 / 0%) 0,
        #fff var(--section-transition-height),
        #e6e8ea 100%
    );
}

/* ==========================================================
   GAME LIST
========================================================== */

.game-list-container {
    max-width: 1170px;

    margin: 0 auto;
}


/* ==========================================================
   GAME FILTERS
========================================================== */

.game-filters {
    display: flex;

    justify-content: center;

    gap: 28px;

    margin-bottom: 24px;
}

.game-filter {
    padding: 0 0 8px;

    border: 0;
    border-bottom: 2px solid transparent;

    background: transparent;

    color: #888;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;
    outline: none;
    transition:
        color 0.18s ease,
        font-weight 0.18s ease,
        transform 0.18s ease;
}

.game-filter.is-active,
.game-filter:hover {
    color: #111;
}

.game-filter:hover {
    font-weight: 800;
    transform: scale(1.06);
}

.game-filter:focus-visible {
    outline: none;
    border-bottom-color: #111;
}

.game-filters .game-filter:focus {
    outline: none;
    box-shadow: none;
}


/* ==========================================================
   GAME GRID
========================================================== */

.game-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 28px 18px;
}


/* ==========================================================
   GAME CARD
========================================================== */

.game-card {
    position: relative;

    min-width: 0;

    max-height: 571px;

    overflow: hidden;

    border-radius: 4px;

    background: #12214a;

    color: #fff;

    box-shadow:
        0 3px 9px rgba(0, 0, 0, 0.22);

    transform-style: preserve-3d;
    transition:
        transform 0.32s cubic-bezier(0.2, 0.75, 0.3, 1),
        box-shadow 0.32s ease;
}

@media (hover: hover) and (pointer: fine) {
    .game-card:hover {
        transform: perspective(1000px) rotateX(2deg) rotateY(-1deg) translateY(-4px);
        box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
    }
}

.game-card-link {
    position: absolute;
    inset: 0;
    z-index: 4;
}

.game-card--linked .game-card-info {
    z-index: 5;
    pointer-events: none;
}

.game-card--linked .game-card-meta {
    position: relative;
    z-index: 6;
}

/* ==========================================================
   GAME CARD IMAGE
========================================================== */

.game-card-image {
    position: relative;

    background: var(--base-color, #12214a);
}

.game-card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.35s ease;
}


/* ==========================================================
   GAME CARD VIDEO
========================================================== */

.game-card-image video {
    position: absolute;

    top: 0;
    left: 0;

    z-index: 2;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0;

    transition:
        opacity 300ms ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.04);
}

.game-card:hover .game-card-image video {
    opacity: 1;
}


/* ==========================================================
   GAME BADGE
========================================================== */

.game-badge {
    position: absolute;

    top: 0;
    right: 0;

    padding: 4px 10px;

    color: #fff;

    font-size: 10px;

    font-weight: 800;

    z-index: 99;
}

.game-badge.new {
    background: #f01818;
}

.game-badge.update {
    background: #9c42c7;
}

.game-badge.event {
    background: #168de0;
}

.game-badge.early-access {
    background: #3b8a0e;
}

.game-badge:not(.new):not(.update):not(.event):not(.early-access) {
    display: none;
}


/* ==========================================================
   GAME CARD INFO
========================================================== */

.game-card-info {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    z-index: 3;
}


/* ==========================================================
   GAME CARD BACKGROUND / WAVE
========================================================== */

.game-card-bg {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background: transparent;

    /*
     * Warna berasal dari database melalui inline style:
     *
     * --base-color
     * --gradient-color1
     * --gradient-color2
     * --shadow-color
     */
}

.game-card-bg::before {
    content: "";
    position: absolute;
    bottom: -65%;
    left: -50%;
    width: 190%;
    height: 108%;
    border-radius: 43%;
    background: var(--base-color, #3F5EFB);
    background: radial-gradient(circle, var(--gradient-color1, #3F5EFB) 0%, var(--gradient-color2, #FC466A) 100%);
    filter: drop-shadow(0 -15px 25px var(--shadow-color, #FC466A));
    animation: rotateWave 15s linear infinite;
    animation-delay: var(--wave-delay, 0s);
    animation-play-state: paused;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-bg::before {
    animation-play-state: running;
}


/* ==========================================================
   WAVE ANIMATION
========================================================== */

@keyframes rotateWave {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ==========================================================
   PULSE GLOW
========================================================== */

@keyframes pulseGlow {

    0% {
        filter:
            drop-shadow(0 -5px 12px var(--shadow-color, #3F5EFB));
    }

    100% {
        filter:
            drop-shadow(0 -15px 25px var(--shadow-color, #3F5EFB));
    }
}


/* ==========================================================
   GAME CARD BODY
========================================================== */

.game-card-body {
    position: absolute;
    bottom: 0;
    min-height: 112px;
    padding: 14px 17px 13px;
    width: 100%;
    z-index: 2;
}

.game-card-body h2 {
    overflow: hidden;
    margin: 0 0 4px;
    font-size: 1.2rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-card-body p {
    overflow: hidden;
    margin: 0;
    color: #e0e1e3;
    font-size: 1rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================
   GAME LOGO
========================================================== */

.game-logo {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-logo img {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* ==========================================================
   GAME META
========================================================== */

.game-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    color: #d4d7df;
    font-size: 1.3rem;
    min-height: 32px;
}

.game-platforms {
    display: flex;
    align-items: center;
    gap: 9px;
}

.platform-switch-icon {
    display: block;
    width: 23px;
    height: 26px;
    object-fit: contain;
    font-size: 16px;
    filter: brightness(1.3);
}

.game-platforms a,
.game-card-meta a {
    pointer-events: auto;
    color: inherit;
    text-decoration: none;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.game-platforms a:hover,
.game-card-meta a:hover {
    color: #fff;
    transform: translateY(-1px);
}

.game-platforms .platform-switch-icon:hover {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.5);
}

.game-chat {
    font-size: 1.1rem;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {

    .event-swiper,
    .event-banner {
        display: none;
    }

    .carousel-dots {
        bottom: 48px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .dot {
        width: 8px;
        height: 8px;
        background: rgb(255 255 255 / 55%);
    }

    .dot.active {
        width: 20px;
        border-radius: 999px;
        background: #fff;
    }

    .carousel-track {
        aspect-ratio: 1 / 1;
        grid-template-rows: minmax(0, 1fr);
    }

    .slide {
        min-height: 0;
    }

    .slide>a,
    .slide picture {
        height: 100%;
    }

    .slide picture {
        max-width: none;
    }

    .slide img {
        height: 100%;
        object-fit: cover;
    }

    .nav-btn {
        padding: 0.45rem 0.6rem;
        font-size: 1.25rem;
    }

    .prev-btn {
        left: 8px;
    }

    .next-btn {
        right: 8px;
    }

    .ggl-section2 {
        --section-transition-height: clamp(18px, 6vw, 32px);

        padding: calc(25px + var(--section-transition-height)) 16px 50px;
    }

    .game-filters {
        justify-content: center;
        gap: 20px;
        margin-bottom: 18px;
        overflow-x: auto;
    }

    .game-filter {
        flex: 0 0 auto;
    }

    .game-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }

    .game-card-body {
        min-height: 30vw;
        padding: 2vw;
    }

    .game-card-body h2 {
        margin-bottom: 1vw;
        font-size: 3.6vw;
    }

    .game-card-body p {
        font-size: 3vw;
    }

    .game-badge {
        padding: 1vw 2vw;
        font-size: 2.5vw;
    }

    .game-logo {
        height: 36vw;
    }

    .game-card-bg::before {
        bottom: -30%;
        left: -10%;
        width: 120%;
        height: 60%;
    }

    .game-card-meta {
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.6vw;
        margin-top: 1.5vw;
        min-height: 8vw;
        font-size: 4vw;
    }

    .game-platforms {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
        gap: 0.5vw;
    }

    .game-platforms a,
    .game-card-meta>a {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 4vw;
        width: 4vw;
        height: 4vw;
        font-size: 3.3vw;
    }

    .game-card-meta>a {
        flex: 0 0 4vw;
    }

    .platform-switch-icon {
        width: 75%;
        height: 75%;
    }

    .game-chat {
        font-size: 3.3vw;
    }

}
