/* =========================================================
   UW88 PROVIDER RTP
   OPTIMIZED + RESPONSIVE
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #050505;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(198, 139, 17, .18),
            transparent 35%
        ),
        #050505;

    color: #fff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* =========================================================
   PROVIDER LOADING
========================================================= */

.provider-loading {
    width: 100%;
    min-height: 420px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;

    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(198, 139, 17, .16),
            transparent 40%
        ),
        #050505;
}

.provider-loading-box {
    width: 100%;
    max-width: 360px;

    padding: 32px 25px;

    border:
        1px solid rgba(216, 168, 42, .55);

    border-radius: 14px;

    background:
        linear-gradient(
            180deg,
            #171107,
            #080808
        );

    box-shadow:
        0 15px 45px
        rgba(0, 0, 0, .55);

    text-align: center;
}

.provider-loading-logo {
    color: #ffd550;

    font-size: 30px;
    font-weight: 900;

    letter-spacing: 2px;
}

.provider-loading-title {
    margin-top: 10px;

    color: #fff;

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.provider-loading-text {
    margin-top: 15px;

    color: #999;

    font-size: 10px;

    letter-spacing: .5px;
}

.provider-loading-spinner {
    width: 38px;
    height: 38px;

    margin: 22px auto 0;

    border:
        3px solid
        rgba(255, 213, 80, .15);

    border-top-color:
        #ffd550;

    border-radius: 50%;

    animation:
        providerLoadingSpin
        .8s linear infinite;
}

@keyframes providerLoadingSpin {

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   HEADER
========================================================= */

.provider-header {
    min-height: 100px;

    padding: 18px 4%;

    display: grid;

    grid-template-columns:
        180px
        minmax(0, 1fr)
        220px;

    align-items: center;

    gap: 20px;

    border-bottom:
        1px solid #c99722;

    background:
        linear-gradient(
            180deg,
            #171107,
            #050505
        );
}


/* =========================================================
   BACK BUTTON
========================================================= */

.back-btn {
    height: 42px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid #d8a82a;

    border-radius: 8px;

    background: #0b0b0b;

    color: #ffd550;

    font-size: 12px;
    font-weight: 900;

    text-decoration: none;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.back-btn:hover {
    background: #171107;

    border-color: #ffe06b;
}


/* =========================================================
   PROVIDER TITLE
========================================================= */

.provider-title {
    min-width: 0;

    text-align: center;
}

.provider-title h1 {
    color: #ffd351;

    font-size: 30px;

    line-height: 1.15;

    letter-spacing: 1px;

    overflow-wrap: anywhere;
}

.provider-title span {
    display: block;

    margin-top: 5px;

    color: #fff;

    font-size: 11px;

    letter-spacing: 2px;
}


/* =========================================================
   UPDATE BOX
========================================================= */

.update-box {
    height: 58px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    border:
        1px solid #d8a82a;

    border-radius: 8px;

    background: #090909;
}

.update-box span {
    color: #aaa;

    font-size: 9px;

    font-weight: 700;
}

.update-box strong {
    margin-top: 4px;

    color: #ffd64e;

    font-size: 20px;
}


/* =========================================================
   NOTICE
========================================================= */

.rtp-notice {
    width: 92%;

    max-width: 1700px;

    margin:
        15px auto
        0;

    padding: 11px 15px;

    display: flex;

    align-items: center;

    gap: 10px;

    border:
        1px solid
        rgba(218, 168, 42, .35);

    border-radius: 8px;

    background:
        rgba(21, 17, 8, .85);

    color: #bbb;

    font-size: 11px;

    line-height: 1.5;
}

.notice-icon {
    flex: 0 0 auto;

    color: #ffd34b;

    font-size: 17px;
}


/* =========================================================
   TOOLBAR
========================================================= */

.game-toolbar {
    width: 92%;

    max-width: 1700px;

    margin:
        15px auto
        0;

    display: flex;

    justify-content: flex-end;
}

.game-search {
    width: 320px;
    height: 43px;

    display: flex;

    align-items: center;

    border:
        1px solid #bd8e1e;

    border-radius: 8px;

    background: #080808;
}

.game-search span {
    width: 45px;

    flex: 0 0 45px;

    text-align: center;

    color: #ffd64a;

    font-size: 20px;
}

.game-search input {
    width: 100%;
    min-width: 0;
    height: 100%;

    border: 0;

    outline: 0;

    background: transparent;

    color: #fff;

    padding-right: 12px;

    font-size: 13px;
}

.game-search input::placeholder {
    color: #777;
}


/* =========================================================
   GAME CONTAINER
========================================================= */

.game-container {
    width: 92%;

    max-width: 1700px;

    margin:
        15px auto
        40px;
}

.game-grid {
    display: grid;

    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );

    gap: 15px;

    align-items: start;
}


/* =========================================================
   GAME CARD
========================================================= */

.game-card {
    min-width: 0;

    overflow: hidden;

    border:
        2px solid #bd8c19;

    border-radius: 12px;

    background:
        linear-gradient(
            180deg,
            #111,
            #050505
        );

    box-shadow:
        0 4px 15px
        rgba(0, 0, 0, .65);

    transition:
        transform .2s ease,
        border-color .2s ease;

    /*
       Browser dapat melewati rendering card
       yang masih jauh di bawah layar.
    */
    content-visibility: auto;

    contain-intrinsic-size:
        auto 520px;
}

@media (hover: hover) {

    .game-card:hover {
        transform:
            translateY(-3px);

        border-color:
            #ffe06b;
    }

}


/* =========================================================
   AREA FOTO GAME
   RASIO 279 x 400
========================================================= */

.game-image {
    position: relative;

    width: 100%;

    aspect-ratio: 279 / 400;

    overflow: hidden;

    background: #111;
}

.game-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    border: 0;

    /*
       Hindari drag gambar yang tidak perlu.
    */
    user-select: none;
}


/* =========================================================
   RTP BADGE
========================================================= */

.rtp-badge {
    position: absolute;

    right: 8px;
    bottom: 8px;

    min-width: 92px;

    padding:
        6px 8px;

    border:
        1px solid #ffd346;

    border-radius: 6px;

    background:
        rgba(0, 0, 0, .88);

    text-align: center;

    backdrop-filter:
        blur(3px);
}

.rtp-badge span {
    display: block;

    color: #aaa;

    font-size: 8px;

    font-weight: 700;
}

.rtp-badge strong {
    display: block;

    margin-top: 2px;

    color: #ffd74f;

    font-size: 15px;
}


/* =========================================================
   GAME INFORMATION
========================================================= */

.game-info {
    padding: 12px;
}

.game-info h2 {
    min-height: 32px;

    color: #fff;

    font-size: 14px;

    line-height: 1.2;

    overflow-wrap: anywhere;
}


/* =========================================================
   RTP METER
========================================================= */

.rtp-meter {
    width: 100%;
    height: 7px;

    margin-top: 8px;

    overflow: hidden;

    border-radius: 10px;

    background: #242424;
}

.rtp-meter-fill {
    width: 0;
    height: 100%;

    border-radius: 10px;

    background:
        linear-gradient(
            90deg,
            #8e5b00,
            #ffd94f
        );

    transition:
        width .5s ease;
}


/* =========================================================
   PATTERN
========================================================= */

.pattern-title {
    margin-top: 13px;

    color: #b5b5b5;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;
}

.pattern-box {
    margin-top: 6px;

    padding: 9px;

    border:
        1px solid
        rgba(216, 168, 42, .30);

    border-radius: 7px;

    background: #090909;
}

.pattern-values {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 3px;

    color: #ffd54b;

    font-size: 12px;

    font-weight: 900;

    white-space: nowrap;
}

.pattern-mode {
    min-height: 24px;

    margin-top: 7px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #ddd;

    font-size: 10px;

    line-height: 1.25;

    text-align: center;
}


/* =========================================================
   EMPTY
========================================================= */

.game-empty {
    display: none;

    padding: 60px 20px;

    text-align: center;

    color: #d4aa38;

    font-weight: 800;
}


/* =========================================================
   FOOTER
========================================================= */

.provider-footer {
    min-height: 70px;

    padding: 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 15px;

    border-top:
        1px solid #a87d19;

    background: #050505;
}

.provider-footer strong {
    color: #ffd54b;

    font-size: 25px;
}

.provider-footer span {
    color: #aaa;

    font-size: 10px;

    letter-spacing: 1px;
}


/* =========================================================
   TABLET / SMALL LAPTOP
   4 CARD
========================================================= */

@media (max-width: 1300px) {

    .game-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            );
    }

}


/* =========================================================
   TABLET
   3 CARD
========================================================= */

@media (max-width: 950px) {

    .provider-header {
        padding:
            15px 4%;

        grid-template-columns:
            130px
            minmax(0, 1fr);

        gap: 12px;
    }

    .update-box {
        grid-column:
            1 / -1;

        width: 100%;
    }

    .provider-title h1 {
        font-size: 25px;
    }

    .game-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );

        gap: 12px;
    }

}


/* =========================================================
   MOBILE
   2 CARD
========================================================= */

@media (max-width: 650px) {

    .provider-header {
        min-height: auto;

        padding:
            14px 3%;

        grid-template-columns:
            1fr 1fr;

        gap: 10px;
    }


    /*
       Nama provider memenuhi baris pertama.
    */

    .provider-title {
        grid-column:
            1 / -1;

        grid-row: 1;

        order: initial;

        padding-bottom: 4px;
    }

    .provider-title h1 {
        font-size: 22px;

        line-height: 1.15;
    }

    .provider-title span {
        margin-top: 4px;

        font-size: 9px;

        letter-spacing: 1.5px;
    }


    /*
       Tombol kembali kiri,
       countdown kanan.
    */

    .back-btn {
        grid-column: 1;

        grid-row: 2;

        width: 100%;
        height: 48px;

        font-size: 11px;
    }

    .update-box {
        grid-column: 2;

        grid-row: 2;

        width: 100%;
        height: 48px;
    }

    .update-box span {
        font-size: 8px;
    }

    .update-box strong {
        font-size: 17px;
    }


    /* NOTICE */

    .rtp-notice {
        width: 94%;

        margin-top: 10px;

        padding: 10px 11px;

        align-items: flex-start;

        font-size: 9px;

        line-height: 1.45;
    }

    .notice-icon {
        margin-top: 1px;

        font-size: 15px;
    }


    /* SEARCH */

    .game-toolbar {
        width: 94%;

        margin-top: 10px;
    }

    .game-search {
        width: 100%;
        height: 44px;
    }

    .game-search input {
        font-size: 12px;
    }


    /* GAME */

    .game-container {
        width: 94%;

        margin-top: 10px;

        margin-bottom: 30px;
    }

    .game-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 9px;
    }

    .game-card {
        border-width: 1px;

        border-radius: 9px;

        contain-intrinsic-size:
            auto 400px;
    }

    .game-info {
        padding: 8px;
    }

    .game-info h2 {
        min-height: 28px;

        font-size: 11px;

        line-height: 1.25;
    }


    /* RTP */

    .rtp-badge {
        right: 5px;
        bottom: 5px;

        min-width: 72px;

        padding:
            4px 5px;
    }

    .rtp-badge span {
        font-size: 7px;
    }

    .rtp-badge strong {
        font-size: 12px;
    }

    .rtp-meter {
        height: 5px;

        margin-top: 6px;
    }


    /* PATTERN */

    .pattern-title {
        margin-top: 9px;

        font-size: 7px;

        letter-spacing: .5px;
    }

    .pattern-box {
        margin-top: 4px;

        padding:
            7px 5px;
    }

    .pattern-values {
        gap: 2px;

        font-size: 9px;
    }

    .pattern-mode {
        min-height: 28px;

        margin-top: 5px;

        font-size: 8px;

        line-height: 1.25;
    }


    /* FOOTER */

    .provider-footer {
        min-height: 60px;

        gap: 9px;
    }

    .provider-footer strong {
        font-size: 20px;
    }

    .provider-footer span {
        font-size: 8px;
    }


    /* LOADING */

    .provider-loading {
        min-height: 330px;

        padding: 25px 15px;
    }

    .provider-loading-box {
        max-width: 300px;

        padding:
            27px 20px;
    }

    .provider-loading-logo {
        font-size: 26px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .provider-header {
        padding-left: 10px;
        padding-right: 10px;
    }

    .provider-title h1 {
        font-size: 19px;
    }

    .back-btn {
        font-size: 10px;
    }

    .update-box strong {
        font-size: 15px;
    }

    .game-container,
    .game-toolbar,
    .rtp-notice {
        width: 96%;
    }

    .game-grid {
        gap: 6px;
    }

    .game-info {
        padding: 6px;
    }

    .game-info h2 {
        font-size: 10px;
    }

    .pattern-values {
        font-size: 8px;
    }

    .pattern-mode {
        font-size: 7px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (
    prefers-reduced-motion:
    reduce
) {

    .game-card,
    .rtp-meter-fill {
        transition: none;
    }

    .provider-loading-spinner {
        animation-duration:
            1.5s;
    }

}