* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font: 15px Arial, sans-serif;
    color: #e5f5f5;
    background: #082328 url("images/background.webp")
        center center / cover no-repeat fixed;
}

header img {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    object-fit: contain;
}

header img:not([hidden]) + h1 {
    display: none;
}

h1 {
    font-size: 65px;
    margin: 0;
    color: #64dce1;
    text-shadow: 0 3px 0 #064d58;
}

h1 span {
    color: #d5e0e4;
}

.ticker {
    background: #087f89;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.banner {
    display: block;
    line-height: 0;
}

.banner img {
    display: block;
    width: 100%;
    height: auto;
}

.actions {
    display: flex;
    gap: 4px;
}

.actions a {
    flex: 1;
    text-align: center;
    padding: 14px;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #6fe2e1;
    background: linear-gradient(
        170deg,
        #8de9e7,
        #087f89 45%,
        #062c34 50%,
        #16838a
    );
}

#providers {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    background: #082c33;
    padding: 10px 5px;
    gap: 5px;
}

button {
    cursor: pointer;
    color: inherit;
    border: 1px solid #2e9fa5;
    background: #10383e;
    border-radius: 5px;
    padding: 10px;
}

#providers button {
    min-width: 0;
    background: transparent;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: bold;
    padding: 12px 4px;
    transition: 0.2s;
}

#providers button img {
    width: 85px !important;
    max-width: 100%;
    height: 55px !important;
    object-fit: contain;
    filter: brightness(1.2);
}

#providers button b {
    display: block;
    margin-bottom: 8px;
}

#providers button:hover,
#providers button.active {
    background: #0b3d45;
    border-color: #00e5e5;
    box-shadow: 0 0 10px #00e5e533;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #061b20;
}

.game-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #092b32;
    border: 1px solid #16717c;
}

.game-filter button {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 5px;
}

.search-box {
    display: flex;
    align-items: center;
    flex: 3;
    min-width: 0;
    background: #123e47;
    border-radius: 5px;
    overflow: hidden;
}

.search-box input {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: none;
    background: transparent;
    color: white;
    outline: none;
}

.search-box span {
    padding: 12px;
    background: #087e90;
}

#heading {
    font-size: 22px;
    margin: 14px 0;
    color: #ffffff;
    text-shadow: 0 2px 5px #04161a;
}

#info {
    background: #082328;
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
}

body.light {
    background: #d9f3f3;
    color: #10383e;
}

.light #heading {
    color: #10383e;
    text-shadow: none;
}

.light .toolbar,
.light .game,
.light #info {
    color: #e5f5f5;
}

@media (max-width: 900px) {
#providers {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
header img {
        width: 90px;
        height: 90px;
    }
#providers {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
.game-filter {
        flex-wrap: wrap;
    }
.search-box {
        flex: 0 0 100%;
    }
#heading {
        font-size: 18px;
    }
}

.game-filter button.active {
    background: #087e90;
    color: #ffffff;
    border-radius: 5px;
    box-shadow: inset 0 0 8px #00c8df44;
}

.game-filter button:hover {
    background: #0b4652;
    color: #64efff;
}

.load-more {
    grid-column: 1 / -1;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: linear-gradient(180deg, #0898ad, #05313c);
    border: 1px solid #00d5e5;
    border-radius: 6px;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.load-more:hover {
    background: #087e90;
}

.auto-loader {
    grid-column: 1 / -1;
    padding: 20px;
    text-align: center;
    color: #64efff;
    font-size: 13px;
    font-weight: bold;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
#providers {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
#providers button img {
        max-width: 100%;
        height: 40px !important;
    }
}

@media (max-width: 480px) {
#providers {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
.game-filter {
        flex-wrap: wrap;
    }
.search-box {
        flex: 0 0 100%;
        min-width: 0;
    }
#heading {
        font-size: 16px;
    }
}

.provider-mini-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
    transform: scale(1.3);
    filter: brightness(1.2);
}

.provider-mini-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transform: none;
}

/* Unified layout: compact information cards */
main {
    width: 96%;
    max-width: 1200px;
    margin: 0 auto;
}
header { display: none; }
#games {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.game {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 6px;
    padding: 8px;
    min-width: 0;
    border: 1px solid #12a8bc;
    border-radius: 7px;
    background: linear-gradient(180deg, #0098ad, #006779 48%, #03434f);
    box-shadow: 0 3px 8px #0005;
    overflow: hidden;
}
.game-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 7px;
}
.game .thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 4px;
    background: #041c24;
    border: 2px solid #032b35;
    border-radius: 6px;
    overflow: hidden;
}
.game .thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.btn-play {
    width: 100%;
    padding: 8px 3px;
    border: 1px solid #19b8cc;
    border-radius: 5px;
    background: linear-gradient(180deg, #00a9c0, #005363);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}
.btn-play:disabled { cursor: default; }
.game .details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
    min-width: 0;
    padding: 8px;
    background: #05313c;
    border-radius: 6px;
    text-align: center;
    color: #fff;
}
.game .pola-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding-bottom: 6px;
    font-size: 14px;
    font-weight: 800;
    border-bottom: 1px solid #34707b;
}
.provider-mini-logo {
    width: 34px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}
.pola-slot-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0 0;
    min-width: 0;
}
.pola-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    align-items: center;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 700;
}
.pola-row span { min-width: 0; overflow-wrap: anywhere; }
.pola-row span:last-child { color: #bffcff; }
.pola-slot-wrap p {
    margin: 4px 0 0;
    color: #c0e4e9;
    font-size: 10px;
    line-height: 1.4;
}
.game .meter {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 22px;
    flex-shrink: 0;
    margin-top: 8px;
    border-radius: 5px;
    background: #eee;
    overflow: hidden;
}
.meter .rtp-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: #bdbdbd;
}
.rtp-green .rtp-fill {
    background: repeating-linear-gradient(45deg, #28a745 0 7px, #59cf80 7px 14px);
}
.rtp-yellow .rtp-fill {
    background: repeating-linear-gradient(45deg, #e5b800 0 7px, #ffdb4d 7px 14px);
}
.rtp-red .rtp-fill {
    background: repeating-linear-gradient(45deg, #dc3545 0 7px, #ff7373 7px 14px);
}
.meter .rtp-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0 2px;
    color: #111;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
@media (max-width: 1000px) {
    #games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    main { width: 98%; }
    #games { grid-template-columns: minmax(0, 1fr); }
    #providers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .game { padding: 6px; }
    .game .pola-title { font-size: 13px; }
}
/* PROVIDER HORIZONTAL */

#providers {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    padding: 8px 0;
    background: #082c33;
    scrollbar-width: thin;
    scrollbar-color: #0898ad #082328;
}

#providers button {
    flex: 1 0 105px;
    min-width: 105px;
    padding: 8px 4px;
    border-radius: 0;
    font-size: 11px;
    text-transform: uppercase;
    white-space: nowrap;
}

#providers button img {
    width: 65px !important;
    height: 45px !important;
    object-fit: contain;
}

#providers button b {
    margin-bottom: 8px;
}

#providers::-webkit-scrollbar {
    height: 5px;
}

#providers::-webkit-scrollbar-thumb {
    background: #0898ad;
    border-radius: 5px;
}

.actions {
    gap: 0;
}

.actions a {
    padding: 12px 5px;
    font-size: 14px;
}/* INDIKATOR PANEL MODE */

.pola-row span:last-child::after {
    content: "▪ ▪ ▪";
    display: block;
    color: #42d9c5;
    font-size: 15px;
    letter-spacing: 2px;
    line-height: 1;
    margin-top: 3px;
}

.details .pola-row {
    margin-bottom: 5px;
    align-items: center;
}
/* Perbaikan label progress bar */
.meter {
    position: relative;
    overflow: hidden;
}

.meter .rtp-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000 !important;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
    z-index: 10;
    text-shadow: none;
}
/* Sembunyikan judul informasi RTP */
#heading {
    display: none !important;
}
/* Tampilan tanggal minimalis */
#date {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.5;
}
.ticker {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, #ff1493 0%, #d10073 100%);
    border-top: 2px solid #ff6bc0;
    border-bottom: 2px solid #8a004a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
    white-space: nowrap;
    padding: 0;
    margin: 0 0 10px 0;
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-width: 200%;
    animation: tickerMove 14s linear infinite;
}

.ticker-track span {
    display: inline-block;
    padding: 6px 50px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: .5px;
}

@keyframes tickerMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}/* Ukuran running text lebih kecil */
.ticker {
    margin-bottom: 4px !important;
    padding: 0 !important;
    border-width: 1px !important;
}

.ticker-track span {
    font-size: 12px !important;
    font-weight: 700;
    padding: 5px 40px !important;
    letter-spacing: 0.2px;
    line-height: 1.4;
}
/* Running text Deep Cyan Metallic */
.ticker {
    background: linear-gradient(
        165deg,
        #78e0e5 0%,
        #259ba6 30%,
        #08717d 65%,
        #032b35 85%,
        #07515e 100%
    ) !important;

    border-top: 1px solid #8ae5eb !important;
    border-bottom: 1px solid #1595a5 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

/* POPUP GAME DEEP CYAN */

#gamePopup {
    width: 340px;
    max-width: 90vw;
    max-height: 85vh;
    padding: 0;
    border: 1px solid #28b9c7;
    border-radius: 8px;
    background: #082e38;
    color: #ffffff;
    box-shadow: 0 0 25px #0009;
    overflow: auto;
}

#gamePopup::backdrop {
    background: rgba(0, 0, 0, 0.75);
}

.popup-header {
    background: linear-gradient(135deg, #159ba9, #034653);
    padding: 16px;
    text-align: center;
    font-weight: 800;
    font-size: 15px;
}

.popup-close {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: white;
    color: black;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
}

.popup-body {
    padding: 15px 20px;
    font-size: 13px;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #ffffff25;
}

.popup-row b {
    text-align: right;
}

.popup-section {
    background: #041e26;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.popup-body p {
    color: #addce1;
    margin: 5px 0 15px;
}

.popup-note {
    padding: 15px;
    background: #086775;
    font-size: 12px;
    text-align: center;
}

.popup-footer {
    display: flex;
}

.popup-footer button,
.popup-footer a {
    flex: 1;
    padding: 13px;
    border: 0;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    color: white;
    cursor: pointer;
    border-radius: 0;
}

.popup-dismiss {
    background: #34545b;
}

.popup-footer a {
    background: linear-gradient(135deg, #25aebc, #034653);
}

/* POPUP STYLE V2 */

#gamePopup {
    width: 405px;
    max-width: 94vw;
    max-height: 94vh;
    background: #303030;
    color: #fff;
    border: none;
    border-radius: 0;
    padding: 0;
    overflow-y: auto;
    box-shadow: 0 8px 30px #0008;
}

#gamePopup::backdrop {
    background: rgba(0, 0, 0, .65);
}

.popup-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #063574;
    padding: 18px 30px;
    font-size: 17px;
    font-weight: 800;
    text-align: center;
}

.popup-close {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 30px;
    height: 30px;
    z-index: 30;
    background: #fff;
    color: #000;
    border-radius: 50%;
    font-size: 19px;
    font-weight: 800;
}

.popup-body {
    padding: 20px 34px;
    background: #303030;
    font-size: 15px;
}

.popup-row {
    padding: 6px 0;
    border-bottom: 2px solid #606060;
}

.popup-section {
    background: #222222;
    padding: 14px;
    font-size: 14px;
    font-weight: 800;
}

.popup-body b {
    font-size: 16px;
}

.popup-body p {
    color: #aaa;
    margin: 7px 0 14px;
    font-size: 14px;
}

.popup-note {
    background: #f5c400;
    color: #000;
    padding: 18px 25px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.popup-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    z-index: 25;
}

.popup-footer button,
.popup-footer a {
    flex: 1;
    padding: 14px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 0;
}

.popup-dismiss {
    background: #555555;
}

.popup-footer a {
    background: #063574;
}

/* Popup compact */
#gamePopup {
    width: 330px !important;
    max-width: 92vw;
    max-height: 90vh;
    scrollbar-width: thin;
}

#gamePopup .popup-header {
    padding: 13px 30px;
    font-size: 14px;
}

#gamePopup .popup-body {
    padding: 12px 20px;
    font-size: 12px;
}

#gamePopup .popup-row {
    padding: 5px 0;
}

#gamePopup .popup-body b {
    font-size: 13px;
}

#gamePopup .popup-body p {
    font-size: 12px;
    margin: 4px 0 10px;
}

#gamePopup .popup-section {
    padding: 10px;
    font-size: 12px;
}

#gamePopup .popup-note {
    padding: 12px;
    font-size: 12px;
}

#gamePopup .popup-footer button,
#gamePopup .popup-footer a {
    padding: 11px;
    font-size: 13px;
}

/* Animasi progress bar */
.rtp-fill {
    background-size: 24px 24px !important;
    animation: rtpMoving 0.8s linear infinite !important;
}

@keyframes rtpMoving {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 24px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rtp-fill {
        animation: none !important;
    }
}
.pola-row span:last-child::after {
    content: "✅ ✅ ✅";
    display: block;
    font-size: 9px;
    letter-spacing: 1px;
    margin-top: 4px;
}
/* Navigasi bawah Deep Cyan */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(
        165deg,
        #39bac5,
        #087480,
        #032d38
    );
    border-top: 1px solid #65dce5;
    padding: 7px 0;
    z-index: 999;
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.bottom-nav a span {
    font-size: 20px;
    line-height: 1;
}

.bottom-nav a:hover {
    color: #80faff;
}

body {
    padding-bottom: 65px;
}
/* Tampilan Recent kosong */
.recent-empty {
    width: 100%;
    height: 32px;
    background: #ffffff;
    margin: 15px 0;
    grid-column: 1 / -1;
}#info {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 10px !important;
    line-height: 1.4;
    padding: 5px !important;
    margin: 5px 0 !important;
    text-align: center;
}/* Tampilan kosong saat Recent belum memiliki game */
#games:empty {
    min-height: 30px;
    background: #ffffff;
    margin: 15px 0;
    padding: 0;
}