/* =========================================
   FONTS (tetap pakai nama lama, swap aktif)
========================================= */

@font-face {
    font-family: 'OpenSans-Regular';
    src: url('../fonts/OpenSans-Regular.ttf');
    font-display: swap
}

@font-face {
    font-family: 'OpenSans-Bold';
    src: url('../fonts/OpenSans-Bold.ttf');
    font-display: swap
}

@font-face {
    font-family: 'OpenSans_Condensed-Bold';
    src: url('../fonts/OpenSans_Condensed-Bold.ttf');
    font-display: swap
}


/* =========================================
   TOKENS
========================================= */

:root {
    --bg: #0C0F10;
    --panel: #171717;
    --gold: #D7C34A;
    --muted: #A0A0A0;
    --border: #28323D;
    --radius: 1rem;
    /* Komponen */
    --btn-h: 44px;
    --btn-px: 18px;
    --btn-radius: 12px;
    --btn-font: 16px;
    --pct-h: 22px;
    --pct-font: 13px;
}


/* =========================================
   BASE
========================================= */

*,
*::before,
*::after {
    box-sizing: border-box
}

html {
    font-size: 16px
}

@media (max-width:1023px) {
    html {
        font-size: 1.8vw
    }
}

@media (max-width:800px) {
    html {
        font-size: 2.112676vw
    }
}

@media (max-width:500px) {
    html {
        font-size: 3.2vw
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: #FFF;
    font-family: 'OpenSans-Regular', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none
}

.container {
    width: 100%;
    max-width: 1084px;
    padding: .5rem 1rem 0;
    margin: auto
}


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

.header__wrap {
    background: var(--panel);
    height: 6rem;
    border-bottom: 2px solid var(--gold)
}

.header__container {
    display: flex;
    align-items: center;
    height: 100%
}

.header__logo {
    display: block;
    height: 3.375rem
}

@media (max-width:1023px) {
    .header__wrap {
        height: 7.66rem
    }
    .header__container {
        justify-content: center
    }
    .header__logo {
        height: 5.4rem
    }
}

@media (max-width:500px) {
    .header__wrap {
        height: 6.5rem
    }
    .header__logo {
        height: 4.33rem
    }
}


/* =========================================
   RUNNING TICKER
========================================= */

.running__container {
    margin: 2rem auto
}

.running__wrap {
    background: linear-gradient(to right, #D9874D, #BB7504 10%, #FEFABD 50%, #FEFABD 55%, #DEC873, #FEFABD);
    color: #000;
    height: 2.25rem;
    display: grid;
    align-items: center;
    grid-template-columns: auto 1fr;
    gap: .5rem
}

.running__icon {
    height: 1.5rem;
    padding-left: 1rem
}

@keyframes ticker {
    from {
        transform: translateX(100%)
    }
    to {
        transform: translateX(-100%)
    }
}

.running__ticker-wrap {
    position: relative;
    overflow: hidden
}

.running__ticker {
    white-space: nowrap;
    animation: ticker 20s linear infinite
}

@media (max-width:1023px) {
    .running__container {
        margin: auto;
        padding: 0
    }
}


/* =========================================
   BANNER
========================================= */

.banner__container {
    position: relative
}

.banner__bg {
    position: absolute;
    inset: 0;
    left: 1rem;
    right: 1rem;
    background: url(../images/gasgasss.jfif) center/cover no-repeat;
    border-radius: var(--radius)
}

.banner__wrap {
    position: relative;
    display: grid;
    grid-template-columns: 30% 70%;
    padding: 1.5rem
}

.banner__text {
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.banner__title {
    font-size: 3.5rem;
    line-height: 1;
    text-transform: uppercase;
    font-family: 'OpenSans_Condensed-Bold', sans-serif;
    padding-right: 1rem
}

.banner__button {
    background: linear-gradient(#F7B70D, #C38510) padding-box, linear-gradient(35deg, #FCE05C 25%, #ED9502 40%, #FEFEFE 55%, #FCD112 70%) border-box;
    color: #000;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, .25);
    border-radius: var(--radius);
    border: 2px solid transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 12rem;
    height: 3rem;
    font-size: 1.5rem;
    font-family: 'OpenSans_Condensed-Bold', sans-serif;
    letter-spacing: .02em;
    margin-bottom: 1.5rem
}

@media (max-width:1023px) {
    .banner__bg {
        border-radius: 0;
        left: 0;
        right: 0
    }
    .banner__wrap {
        padding: 1.5rem 0
    }
    .banner__title {
        font-size: 2.333333rem
    }
    .banner__button {
        width: 9rem;
        height: 2.666667rem;
        border-radius: .666667rem
    }
}

@media (max-width:500px) {
    .banner__wrap {
        grid-template-columns: 40% 60%
    }
    .banner__title {
        font-size: 2rem
    }
}


/* =========================================
   GAME ITEM
========================================= */

.game-item {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    text-align: center
}

.game-item__img-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 100% 0 0;
    border-radius: 16px
}

.game-item__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease
}

.game-item__hover {
    position: absolute;
    inset: 0;
    background: #0c0f10c5;
    opacity: 0;
    transition: opacity .18s ease
}

.game-item__button {
    position: absolute;
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    min-height: var(--btn-h);
    padding: 8px var(--btn-px);
    border-radius: var(--btn-radius);
    font-weight: 800;
    font-size: var(--btn-font);
    letter-spacing: .3px;
    color: #fff;
    background: linear-gradient(#F7B70D, #C38510) padding-box, linear-gradient(35deg, #FCE05C 25%, #ED9502 40%, #FEFEFE 55%, #FCD112 70%) border-box;
    border: 2px solid transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    opacity: 0;
    transition: opacity .18s ease, transform .12s ease;
    pointer-events: none
}

.game-item__img-wrap:hover .game-item__img {
    transform: scale(1.06)
}

.game-item__img-wrap:hover .game-item__hover {
    opacity: 1
}

.game-item__img-wrap:hover .game-item__button {
    opacity: 1;
    transform: translate(50%, 50%) scale(1.02);
    pointer-events: auto
}

.game-item__button:active {
    transform: translate(50%, 50%) scale(.98)
}


/* =========================================
   PERCENT BAR (full, tanpa putih)
========================================= */


/* Biarkan .percent__wrap ada di HTML tapi transparan agar tidak mengganggu */

.percent__wrap {
    width: 100%;
    margin: 10px 0 8px;
    padding: 0;
    background: transparent;
    border-radius: 0
}


/* === Progress Bar: full, warna + animasi berjalan === */

.percent {
    width: 100%;
    height: 22px;
    background: #111;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px #1e1e1e;
}

.percent__bar {
    height: 100%;
    border-radius: inherit;
    transition: width .28s ease;
    /* Warna utama dari class (.green/.yellow/.red) via background-color */
    background-color: currentColor;
    /* Overlay strip transparan supaya tetap terlihat warna utamanya */
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .12) 0 12px, transparent 12px 24px);
    background-size: 40px 100%;
    animation: pct-move .8s linear infinite;
    color: #27c24c;
    /* default (hijau) jika class warna belum terpasang */
}

@keyframes pct-move {
    from {
        background-position: 0 0
    }
    to {
        background-position: 40px 0
    }
}


/* Map class warna -> set color (dipakai oleh currentColor) */

.percent__bar.green {
    color: #27c24c;
}

.percent__bar.yellow {
    color: #f7b500;
}

.percent__bar.red {
    color: #ff3b30;
}

.percent__value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
    pointer-events: none;
    z-index: 2;
}

@media (max-width:480px) {
    .percent {
        height: 18px
    }
    .percent__value {
        font-size: 11px
    }
}

.progress-container {
    width: 200px;
    /* panjang bar */
    height: 25px;
    /* tinggi bar */
    background: #111;
    /* warna background bar */
    border: 2px solid #333;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 82%;
    /* persentase */
    height: 100%;
    background: linear-gradient( 90deg, #28a745 25%, #34d058 50%, #28a745 75%);
    background-size: 40px 100%;
    animation: move 1s linear infinite;
    /* animasi jalan */
    position: relative;
}

.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-weight: bold;
    color: #fff;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 14px;
}


/* Animasi strip berjalan */

@keyframes move {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 40px 0;
    }
}


/* =========================================
   CTA BUTTONS
========================================= */

.button__container {
    margin: 2rem auto 0;
    display: flex;
    justify-content: center
}

.button__wrap {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem
}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 16.25rem;
    height: 3.5rem;
    border-radius: var(--radius);
    font-size: 1.75rem;
    text-transform: uppercase;
    box-shadow: .25rem .25rem .5rem rgba(0, 0, 0, .25);
    font-family: 'OpenSans_Condensed-Bold', sans-serif;
    border: none
}

@media (max-width:1023px) {
    .button__container {
        margin: 0;
        padding: 0
    }
    .button__wrap {
        gap: 0;
        width: 100%
    }
    .button {
        width: 100%;
        height: 4.5rem;
        border-radius: 0
    }
}

.button-login,
.button-register {
    color: var(--gold);
    background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(to right, #D9874D, #BB7504 10%, #FEFABD 50%, #FEFABD 55%, #DEC873, #FEFABD);
    border: 1px solid silver
}

.button-facebook,
.button-whatsapp {
    color: #3DFF6B;
    background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(to right, #D9874D, #BB7504 10%, #FEFABD 50%, #FEFABD 55%, #DEC873, #FEFABD);
    border-top: 4px solid var(--gold);
    border-bottom: 4px solid #FEFABD
}


/* =========================================
   TIME
========================================= */

.time-container {
    margin: 1.5rem auto;
    text-align: center
}

#realDatetime {
    text-transform: uppercase
}


/* =========================================
   PROVIDER (SPLIDE)
========================================= */

.provider__splide {
    position: relative
}

.provider__wrap {
    position: relative;
    background: var(--panel);
    border-radius: var(--radius);
    padding: 1rem 2rem
}

.provider__wrap .splide__slide {
    padding: 0
}

.provider__item-img {
    width: 100%;
    display: block
}


/* panah center kiri/kanan */

.provider__wrap .splide__arrows {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2
}

.provider__wrap .splide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    display: grid;
    place-items: center;
    pointer-events: auto;
    cursor: pointer
}

.provider__wrap .splide__arrow--prev {
    left: 8px
}

.provider__wrap .splide__arrow--next {
    right: 8px
}

.provider__wrap .splide__arrow svg {
    width: 1rem;
    height: 1rem
}

@media (max-width:1023px) {
    .provider__wrap {
        border-radius: 0;
        padding: 1rem 1.5rem
    }
}

@media (max-width:500px) {
    .provider__wrap .splide__arrow {
        display: none
    }
}


/* =========================================
   SEARCH
========================================= */

.search-game__container {
    margin: 1.5rem auto 1rem;
    display: flex;
    justify-content: end
}

.search-game__wrap {
    position: relative;
    width: 26.75rem;
    height: 2.5rem;
    background: #28323D;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 0 1rem;
    gap: .5rem;
    cursor: text
}

.search-game__icon {
    width: 1.5em;
    height: 1.5em
}

.search-game__input {
    background: transparent;
    color: #F5F5F5;
    border: none;
    outline: none
}

@media (max-width:1023px) {
    .search-game__container {
        margin: 1rem 0 .5rem
    }
    .search-game__wrap {
        width: 100%;
        border-radius: .666667rem
    }
}


/* =========================================
   LIST GAME
========================================= */

.list-game__container {
    margin: 0 auto 5rem;
    padding: 0 .5rem;
    display: flex;
    flex-wrap: wrap
}

.list-game__item {
    flex-basis: calc((100% - 5rem)/5);
    margin: .5rem;
    color: inherit;
    transition: transform .2s ease, opacity .2s ease;
    overflow: hidden;
    opacity: 1
}

.list-game__item:hover {
    transform: translateY(-2px)
}

.list-game__item--hidden {
    flex-basis: 0!important;
    opacity: 0;
    margin: 0
}

@media (max-width:1023px) {
    .list-game__container {
        margin-bottom: 2.5rem
    }
    .list-game__item {
        flex-basis: calc((100% - 3rem)/3)
    }
}

@media (max-width:500px) {
    .list-game__item {
        flex-basis: calc((100% - 2rem)/2)
    }
}


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

.footer__wrap {
    background: linear-gradient(180deg, #03D959 0%, #03D959 185.27%);
    padding: 2rem 0;
    text-align: center
}

.footer__title {
    font-family: 'OpenSans_Condensed-Bold', sans-serif;
    color: #FFF;
    letter-spacing: .02em;
    font-size: 2.5rem
}

.footer__wrap b {
    font-family: 'OpenSans_Condensed-Bold', sans-serif;
    color: #03D959;
    font-size: 1.25em
}

.copyright__container {
    padding: 1.5rem;
    text-align: center;
    color: var(--muted)
}

.copyright__container b {
    font-family: 'OpenSans_Condensed-Bold', sans-serif;
    color: #FFF;
    font-size: 1.25em
}

@media (max-width:1023px) {
    .copyright__container {
        padding: 1.25rem
    }
}

@media (max-width:500px) {
    .copyright__container {
        padding: 1rem
    }
}


/* =========================================
   REDUCE MOTION
========================================= */

@media (prefers-reduced-motion:reduce) {
    * {
        animation-duration: .01ms!important;
        animation-iteration-count: 1!important;
        transition-duration: .01ms!important;
        scroll-behavior: auto!important
    }
}