body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    position: relative;
}

.sparticles-container {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.sparticles-container canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    animation: starfall 15s linear infinite;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 
        0 0 4px #fff,
        0 0 8px #fff,
        0 0 12px #fff,
        0 0 16px #5f91ff,
        0 0 20px #5f91ff;
}

@keyframes starfall {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

td[data-label="Game"] {
    align-items: center;
    gap: 10px;
}

/* Wrapper opsional kolom Game */
.game-cell {
    position: relative;
    display: block;
    padding: 6px 10px;
    border-radius: 10px;
}

@media (min-width: 769px) {
  #leaderboardTable tbody tr.provider-pragmatic,
  #leaderboardTable tbody tr.provider-pgsoft,
  #leaderboardTable tbody tr.provider-habanero,
  #leaderboardTable tbody tr.provider-nolimit {
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: auto 75%;
    background-color: rgba(0, 0, 0, 0.);
    background-blend-mode: multiply;
  }
  /* #leaderboardTable tbody tr.provider-pragmatic { background-image: url('img/provider-pp.png'); }
  #leaderboardTable tbody tr.provider-pgsoft { background-image: url('img/provider-pgsoft.png'); }
  #leaderboardTable tbody tr.provider-habanero { background-image: url('img/provider-habanero.png'); }
  #leaderboardTable tbody tr.provider-nolimit { background-image: url('img/provider-nolimit.png'); } */
}

@media (max-width: 768px) {
  #leaderboardTable tbody tr.provider-pragmatic,
  #leaderboardTable tbody tr.provider-pgsoft,
  #leaderboardTable tbody tr.provider-habanero,
  #leaderboardTable tbody tr.provider-nolimit {
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 100%;
    background-color: transparent;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1200px rgba(0, 0, 0, 0.50); /* overlay gelap tipis */
  }
  #leaderboardTable tbody tr.provider-pragmatic { background-image: url('img/pragmatic.png'); }
  #leaderboardTable tbody tr.provider-pgsoft { background-image: url('img/pgsoft.png'); }
  #leaderboardTable tbody tr.provider-habanero { background-image: url('img/habanero.png'); }
  #leaderboardTable tbody tr.provider-nolimit { background-image: url('img/nolimitcity.png'); }
}

.game-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body {
    margin: 0;
    padding: 0;
    background-image: url('img/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: Arial, sans-serif;
}

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 1200px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

h1 {
    color: #ff0000;
    text-align: center;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0% { text-shadow: 0 0 10px #ff0000; }
    50% { text-shadow: 0 0 20px #ff0000, 0 0 30px #ff4444; }
    100% { text-shadow: 0 0 10px #ff0000; }
}

.leaderboard {
    backdrop-filter: blur(5px);
    border: 2px solid #ff0000;
    border-radius: 10px;
    padding: 15px;
}

.filters select {
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    outline: none;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

th {
    background: #ff0000;
    color: white;
    padding: 12px;
}

tr:hover {
    background: rgba(255, 0, 0, 0.1);
    transition: 0.3s;
}

th, td {
    padding: 15px;
    color: #ffffff;
}

th {
    background: rgba(0, 255, 0, 0.1);
    font-weight: bold;
}

/* Header sortable khusus PC */
@media (min-width: 769px) {
  .th-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
  }
  .th-sortable:hover {
    background: rgba(255, 255, 255, 0.15);
  }
  /* Sembunyikan dropdown Sort By di PC */
  #sortBy, #sortByBottom { display: none; }
  .mobile-controls-bottom { display: none; }
}

tr {
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

tr:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #ffffff;
}

.leaderboard {
    background: rgb(107, 2, 2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filters {
    margin-bottom: 20px;
}

select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #fff600;
}

th {
    background-color: #ff0000;
    font-weight: bold;
}

tr:hover {
    background-color: #2b1f1f8a;
}

.view-proof {
    padding: 6px 12px;
    background-color: #4CAF50;
    color: rgba(0, 0, 0, 0.623);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.view-proof:hover {
    background-color: #45a049;
}

.filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.date-filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-filter {
    padding: 8px;
    border-radius: 4px;
    border: 2px solid #ddd;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
}

.reset-button {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Player Avatar Style */
.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ffca00;
    overflow: hidden;
    box-shadow: 0 0 10px rgb(204, 255, 0, 50%);
}

.game-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 13px;
    padding: 2px;
}

.view-proof {
    padding: 8px 15px;
    background: linear-gradient(45deg, #ff0000, #ccca00);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.view-proof:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

/* Modal Animations */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.zoom-in {
    opacity: 1;
    animation: modalZoomIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.zoom-out {
    opacity: 0;
    animation: modalZoomOut 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#imageModal {
    display: none;
}

.stars {
  will-change: transform;
  transform: translateZ(0);
}

.modal-figure {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}
.modal-figure img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border: 3px solid #fbff00;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    opacity: 0;
    transform: none;
    transition: opacity 0.4s ease;
}
  
.image-reveal {
    animation: revealImage 0.3s ease-in-out forwards;
}

@keyframes revealImage {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-figure img.image-reveal {
  opacity: 1;
}

.modal-figure img.image-hide {
  transform: scale(0.9);
  opacity: 0;
}

@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalZoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.close {
    position: absolute;
    top: -12px;
    right: -12px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}
@media (max-width: 480px) {
  .close {
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  /* Perbesar gambar pada mobile mendekati layar penuh */
  .modal-figure {
    max-width: 90vw;
    max-height: 90vh;
  }
  .modal-figure img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
  }
}

@media (max-width: 768px) {
  .modal-figure {
    max-width: 90vw;
    max-height: 90vh;
  }
  .modal-figure img {
    max-width: 90vw;
    max-height: 90vh;
  }
}

@keyframes floatButton {
    0% {
        transform: translateY(0) rotate(0);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0);
    }
}

.close:hover {
    animation: none;
    transform: scale(1.2) rotate(180deg);
    color: #ff0000;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

/* Tambahkan CSS berikut untuk responsive design */
@media screen and (max-width: 768px) {
    body {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        padding: px;
        margin-bottom: 60px;
    }

    .stars {
        position: fixed;
        z-index: -1;
    }

    table {
        border: 0;
        margin-bottom: 40px;
    }

    table thead {
        display: none;
    }

    table tr {
        margin-bottom: 1rem;
        display: block;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(5px);
    }

    table td {
        display: block;
        text-align: right;
        padding: 12px;
        position: relative;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Hapus aturan persegi untuk kolom Game di HP agar tidak mengubah ukuran asli */
    td[data-label="Game"] .game-cell {
        background: none;
        border-radius: 0;
        display: block;
        padding: 0;
    }

    table td:last-child {
        border-bottom: 0;
    }

    table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }

    .player-info, .game-container {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }

    .game-icon {
        width: 32px;
        height: 32px;
    }

    .player-avatar {
        width: 32px;
        height: 32px;
    }

    #gameFilter, #sortBy, #gameFilterBottom, #sortByBottom {
        width: 100%;
        margin-bottom: 1rem;
    }

    .mobile-controls-bottom {
        margin-top: 10px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #leaderboardBody {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        overflow-y: visible;
    }

    td[data-label="Rank"] {
        font-size: 2em;
        font-weight: bold;
        color: #00ff00;
        text-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    }

    .filters {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .sort-btn {
        width: 100%;
        padding: 12px;
    }
}

/* Untuk layar yang sangat kecil */
@media screen and (max-width: 480px) {
    #leaderboardBody {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.5em;
    }
}

/* Tambahkan label untuk mobile view */
@media screen and (max-width: 768px) {
    td::before {
        content: attr(data-label);
        font-size: 0.8em;
        text-transform: uppercase;
        color: #00ff00;
        margin-bottom: 5px;
        display: block;
    }
}

@media screen and (max-width: 768px) {
    td[data-label="Proof"]::before {
        display: none;
    }

    td[data-label="Proof"] {
        text-align: center;
    }
}

.clock-display {
    text-align: center;
    font-size: 1.2em;
    margin: 10px 0;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff00;
}

.sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 10px 0 0 10px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-item {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    padding: 8px;
    border-radius: 5px;
}

.menu-item i {
    font-size: 20px;
    width: 25px;
    text-align: center;
}

/* PC Hover Effects Only */
@media (min-width: 769px) {
    .menu-item span {
        width: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: width 0.3s ease;
        font-size: 14px;
    }

    .sidebar:hover .menu-item span {
        width: 100px;
        margin-left: 10px;
    }

    .menu-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(-5px);
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: none;
        border-radius: 0;
        padding: 8px;
        background: rgba(0, 0, 0, 0.95);
        transition: none;
    }

    .sidebar-menu {
        flex-direction: row;
        justify-content: space-around;
    }

    .menu-item {
        flex-direction: column;
        text-align: center;
        padding: 5px;
    }

    .menu-item i {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .menu-item span {
        width: auto;
        font-size: 11px;
    }

    .close {
        top: -10px;
        right: -10px;
    }
}

@media (max-width: 320px) {
    .sidebar {
        padding: 5px;
    }

    .menu-item i {
        font-size: 14px;
    }

    .menu-item span {
        font-size: 10px;
    }
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.pagination button {
    padding: 8px 16px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.pagination button:hover {
    background: #34495e;
}

.pagination button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

#pageInfo {
    color: white;
    font-size: 14px;
}

#entriesPerPage {
    padding: 8px;
    border-radius: 4px;
    background: #2c3e50;
    color: white;
    border: 1px solid #34495e;
}

/* Tombol sort Wins (atas & bawah) */
.sort-wins-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #ff0000, #ccca00);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.win-sort-controls.bottom {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

@media (min-width: 769px) {
  .sort-wins-btn { width: auto; }
}

@media (max-width: 768px) {
  .sort-wins-btn { width: 100%; }
}

/* Tambahkan CSS untuk animasi dan styling */
.hidden-row {
    display: none;
}

.show-more-container {
    text-align: center;
    margin: 20px 0;
}

.show-more-btn {
    background: linear-gradient(180deg, #Ca0000, #a40000);
    border: none;
    padding: 10px 40px;
    border-radius: 10px;
    color: #fff;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    align-self: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* tombol navigasi */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.slide-right { animation: slideRight 0.25s ease-out forwards; }
.slide-left  { animation: slideLeft  0.25s ease-out forwards; }

@keyframes slideRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.modal-nav-container {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 1001;
}

.modal-nav-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #ff0000;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-nav-btn:hover:not(:disabled) {
    background: #cc0000;
    transform: translateY(-2px);
}

.modal-nav-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.slide-animation {
    animation: slideChange 0.3s ease-in-out;
}

@keyframes slideChange {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media screen and (max-width: 768px) {
    .modal-nav {
        padding: 12px;
        font-size: 18px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* --- 2. SETTING WADAH SALJU --- */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* WAJIB: Agar website tetap bisa diklik */
    z-index: 999999;      /* Layer paling atas */
    overflow: hidden;
}

/* --- 3. SETTING PARTIKEL SALJU --- */
.snowflake {
    position: absolute;
    top: -50px;
    color: #FFF;          /* Inti salju tetap putih */
    font-size: 20px;
    user-select: none;
    opacity: 0.9;
    will-change: transform; /* Optimasi performa agar tidak lag */
}

/* --- 4. ANIMASI JATUH --- */
@keyframes fall {
    0% { transform: translateY(-50px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0.7; }
}
