/* ── Game card frame (border emas–merah tema HOTWIN88) ─ */
.game-card-frame {
    --gcf-radius: 0.75rem;
    position: relative;
    border-radius: var(--gcf-radius);
    padding: 2px;
    background: linear-gradient(
        145deg,
        var(--color-header-4) 0%,
        color-mix(in srgb, var(--color-header-4) 75%, #fff) 22%,
        var(--color-header-3) 52%,
        var(--color-header-1) 100%
    );
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.5),
        0 0 14px color-mix(in srgb, var(--color-header-4) 16%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease,
        filter 0.28s ease;
    overflow: hidden;
    isolation: isolate;
}

.game-card-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        125deg,
        rgba(255, 255, 255, 0.28) 0%,
        transparent 38%,
        transparent 62%,
        rgba(240, 192, 64, 0.14) 100%
    );
    pointer-events: none;
    z-index: 4;
    opacity: 0.75;
    transition: opacity 0.28s ease;
}

.game-card-frame::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: calc(var(--gcf-radius) - 2px);
    box-shadow: inset 0 0 18px color-mix(in srgb, var(--color-header-4) 12%, transparent);
    pointer-events: none;
    z-index: 3;
}

.game-card-frame__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--gcf-radius) - 2px);
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-7) 0%, var(--color-6) 100%);
}

a:hover .game-card-frame,
.game-card-frame:hover,
.game-card-frame:focus-within {
    transform: translateY(-4px) scale(1.025);
    box-shadow:
        0 10px 28px rgba(139, 21, 21, 0.48),
        0 0 26px color-mix(in srgb, var(--color-header-4) 38%, transparent),
        0 0 0 1px color-mix(in srgb, var(--color-header-4) 55%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.04);
}

a:hover .game-card-frame::before,
.game-card-frame:hover::before {
    opacity: 1;
}

a:active .game-card-frame,
.game-card-frame:active {
    transform: translateY(-1px) scale(1.01);
    transition-duration: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
    .game-card-frame,
    .baru-rilis-card,
    .hot-rtp-card,
    .lebihCuanSwiper .game-card {
        transition: none !important;
    }

    a:hover .game-card-frame,
    .game-card-frame:hover,
    .baru-rilis-card:hover,
    .hot-rtp-card:hover {
        transform: none;
    }
}

/* Kartu game mobile & swiper */
.lebihCuanSwiper .game-card,
.baru-rilis-card,
.hot-rtp-card {
    --gcf-radius: 0.625rem;
    position: relative;
    border-radius: var(--gcf-radius);
    padding: 2px;
    background: linear-gradient(
        150deg,
        var(--color-header-4),
        var(--color-header-3) 60%,
        var(--color-header-1)
    );
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.45),
        0 0 10px color-mix(in srgb, var(--color-header-4) 14%, transparent);
    overflow: hidden;
}

.lebihCuanSwiper .game-card .skeleton-img-wrapper,
.baru-rilis-card__media,
.hot-rtp-card__media {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--gcf-radius) - 2px);
    box-shadow: inset 0 0 12px color-mix(in srgb, var(--color-header-4) 10%, transparent);
}

.baru-rilis-card:hover,
.hot-rtp-card:hover,
.lebihCuanSwiper .game-card:hover {
    box-shadow:
        0 6px 20px rgba(139, 21, 21, 0.4),
        0 0 18px color-mix(in srgb, var(--color-header-4) 28%, transparent);
    transform: translateY(-2px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* ── Hot Games coverflow carousel ────────────────────── */
.mySwiper {
    position: relative;
    overflow: hidden;
    padding-bottom: 5px;
    width: 100%;
}

.mySwiper::before,
.mySwiper::after {
    content: "";
    top: 0;
    z-index: 2;
    height: 100%;
    width: 30%;
    position: absolute;
    pointer-events: none;
}

.mySwiper::before {
    left: 0;
    background: linear-gradient(
        90deg,
        var(--color-1) 0%,
        color-mix(in srgb, var(--color-1) 77%, transparent) 25%,
        color-mix(in srgb, var(--color-1) 48%, transparent) 55%,
        transparent 100%
    );
}

.mySwiper::after {
    right: 0;
    background: linear-gradient(
        270deg,
        var(--color-1) 0%,
        color-mix(in srgb, var(--color-1) 77%, transparent) 25%,
        color-mix(in srgb, var(--color-1) 48%, transparent) 55%,
        transparent 100%
    );
}

.mySwiper .swiper-slide {
    width: 10rem !important;
    flex-shrink: 0;
}

.mySwiper .swiper-slide img {
    display: block;
    width: 10rem !important;
    height: 10rem !important;
    max-width: 10rem !important;
    object-fit: cover;
    border-radius: 0.625rem;
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--color-header-4) 45%, transparent),
        0 4px 14px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
    .mySwiper .swiper-slide {
        width: 12rem !important;
    }

    .mySwiper .swiper-slide img {
        width: 12rem !important;
        height: 12rem !important;
        max-width: 12rem !important;
    }
}

@media (min-width: 768px) {
    .mySwiper .swiper-slide {
        width: 13rem !important;
    }

    .mySwiper .swiper-slide img {
        width: 13rem !important;
        height: 13rem !important;
        max-width: 13rem !important;
    }
}

@media (min-width: 1024px) {
    .mySwiper .swiper-slide {
        width: 13rem !important;
    }

    .mySwiper .swiper-slide img {
        width: 13rem !important;
        height: 13rem !important;
        max-width: 13rem !important;
    }
}

/* ── Game Wajib Coba (roulette slot) ─────────────────── */
.section.roulete {
    align-items: center;
}

.vertical-scroll {
    flex: 1;
    min-width: 0;
}

.vertical-scroll-inner-arrow::before,
.vertical-scroll-inner-arrow::after {
    background-image: url("https://cloudfont.xyz/assets/images/icon/arrow.svg");
}

.roulete-scroll img {
    width: 180px;
    height: 200px;
    max-width: none;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

/* ── Mobile game cards shimmer ───────────────────────── */
.light-sweep {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.light-sweep::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 65%
    );
    animation: light-sweep-anim 3.5s ease-in-out infinite;
}

@keyframes light-sweep-anim {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

.game-top .skeleton-img {
    max-width: none;
    object-fit: contain;
}

/* ── Lebih Cuan horizontal swiper (mobile) ───────────── */
.lebihCuanSwiper {
    width: 100%;
    overflow: hidden;
}

.lebihCuanSwiper .swiper-slide {
    flex-shrink: 0;
    height: auto;
}

.lebihCuanSwiper .game-card {
    width: 100%;
    aspect-ratio: 3 / 4;
}

.lebihCuanSwiper .skeleton-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

.lebihCuanSwiper .skeleton-img-wrapper img,
.lebihCuanSwiper .skeleton-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center top;
    border-radius: 0.5rem;
}

.lebihCuanSwiper .game-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
}

/* ── Baru Rilis & Hot RTP grids (mobile) ─────────────── */
.baru-rilis-grid,
.hot-rtp-grid {
    align-items: stretch;
}

.baru-rilis-card,
.hot-rtp-card {
    min-width: 0;
}

.baru-rilis-card__media,
.hot-rtp-card__media {
    width: 100%;
    aspect-ratio: 10 / 13;
    background: linear-gradient(180deg, var(--color-7) 0%, color-mix(in srgb, var(--color-6) 85%, #000) 100%);
}

.baru-rilis-grid .skeleton-img-wrapper img,
.baru-rilis-grid .skeleton-img,
.hot-rtp-grid .skeleton-img-wrapper img,
.hot-rtp-grid .skeleton-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center top;
}

/* ── Random Slot (Bingung Mau Main Apa?) ─────────────── */
.random-slot-grid {
    perspective: 900px;
}

.random-slot-mount {
    min-width: 0;
}

.random-slot-cell {
    position: relative;
}

.random-slot-reel-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    aspect-ratio: 1 / 1;
    background: linear-gradient(160deg, color-mix(in srgb, var(--color-3) 70%, #000) 0%, var(--color-6) 100%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-header-4) 18%, transparent);
}

.random-slot-cell--center .random-slot-reel-viewport {
    margin: 12px;
    border-radius: 1rem;
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--color-header-4) 35%, transparent),
        0 8px 24px color-mix(in srgb, #000 35%, transparent);
}

.random-slot-reel-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.random-slot-reel-item {
    flex: 0 0 auto;
    width: 100%;
    overflow: hidden;
}

.random-slot-reel-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.random-slot-reel-item--question {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--color-3), color-mix(in srgb, var(--color-3) 55%, #000));
}

.random-slot-reel-item--question span {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 12px color-mix(in srgb, var(--color-header-4) 65%, transparent);
}

.random-slot-reel-glow {
    pointer-events: none;
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--color-header-4) 22%, transparent) 0%,
        transparent 28%,
        transparent 72%,
        color-mix(in srgb, var(--color-header-3) 18%, transparent) 100%
    );
    transition: opacity 0.35s ease;
}

.random-slot-cell--spinning .random-slot-reel-glow {
    opacity: 1;
    animation: randomSlotGlowPulse 0.9s ease-in-out infinite alternate;
}

.random-slot-cell--spinning .random-slot-reel-viewport {
    filter: blur(0.4px) saturate(1.08);
}

.random-slot-cell--revealed .random-slot-reel-viewport {
    filter: none;
}

.random-slot-result-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 0.45rem 0.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 55%);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.random-slot-result-label p {
    margin: 0;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.random-slot-cell--revealed .random-slot-result-label {
    transform: translateY(0);
    opacity: 1;
}

.random-slot-cell--winner .random-slot-reel-viewport {
    animation: randomSlotWinnerPop 0.65s cubic-bezier(0.22, 1.2, 0.36, 1);
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--color-header-4) 75%, transparent),
        0 0 28px color-mix(in srgb, var(--color-header-4) 45%, transparent);
}

.random-slot--active .random-slot-grid {
    animation: randomSlotGridPulse 0.8s ease-in-out infinite alternate;
}

.random-slot--finished .random-slot-cell--winner .random-slot-reel-glow {
    opacity: 1;
    animation: randomSlotWinnerFlash 0.9s ease-out;
}

#random-slot-btn.random-slot-btn--spinning {
    letter-spacing: 0.04em;
    transform: scale(0.98);
    box-shadow: 0 0 18px color-mix(in srgb, var(--color-header-4) 35%, transparent);
}

#random-slot-btn:disabled {
    pointer-events: none;
}

@keyframes randomSlotGlowPulse {
    from { opacity: 0.45; }
    to { opacity: 0.95; }
}

@keyframes randomSlotGridPulse {
    from { transform: scale(1); }
    to { transform: scale(1.01); }
}

@keyframes randomSlotWinnerPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

@keyframes randomSlotWinnerFlash {
    0% {
        opacity: 0;
        background: radial-gradient(circle at center, color-mix(in srgb, var(--color-header-4) 55%, transparent) 0%, transparent 72%);
    }
    35% { opacity: 1; }
    100% { opacity: 0; }
}

/* ── Random Slot result popup ─────────────────────────── */
body.random-slot-modal-open {
    overflow: hidden;
}

.random-slot-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.random-slot-modal--open {
    opacity: 1;
    visibility: visible;
}

.random-slot-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

.random-slot-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 22rem;
    padding: 1.35rem 1.25rem 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--color-header-4) 35%, transparent);
    background: linear-gradient(165deg, var(--color-6) 0%, color-mix(in srgb, var(--color-3) 45%, #120808) 100%);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        0 0 32px color-mix(in srgb, var(--color-header-4) 22%, transparent);
    transform: translateY(18px) scale(0.94);
    transition: transform 0.32s cubic-bezier(0.22, 1.15, 0.36, 1);
    text-align: center;
}

.random-slot-modal--open .random-slot-modal__panel {
    transform: translateY(0) scale(1);
}

.random-slot-modal__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--color-3);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.random-slot-modal__close:hover {
    background: var(--color-1);
    transform: scale(1.05);
}

.random-slot-modal__badge {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-header-4);
}

.random-slot-modal__image-wrap {
    width: 9.5rem;
    height: 9.5rem;
    margin: 0 auto 0.9rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--color-header-4) 55%, transparent),
        0 12px 28px rgba(0, 0, 0, 0.45);
    animation: randomSlotModalImagePop 0.55s cubic-bezier(0.22, 1.2, 0.36, 1) 0.08s both;
}

.random-slot-modal__image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.random-slot-modal__title {
    margin: 0 0 0.35rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
}

.random-slot-modal__subtitle {
    margin: 0 0 1.1rem;
    color: var(--color-4);
    font-size: 0.82rem;
}

.random-slot-modal__play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(90deg, var(--color-header-3), var(--color-header-4));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--color-header-4) 35%, transparent);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.random-slot-modal__play:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--color-header-4) 45%, transparent);
}

.random-slot-modal__play:active {
    transform: translateY(0);
}

@keyframes randomSlotModalImagePop {
    0% {
        opacity: 0;
        transform: scale(0.82);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}