* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
    background:
        radial-gradient(
            circle at 50% -10%,
            #a91b30,
            #30070f 48%,
            #0d0305
        );
    min-height: 100vh;
}

.wrap {
    width: min(1200px, 94%);
    margin: auto;
}


/* =========================================================
   TOP / HEADER
========================================================= */

.top {
    padding: 18px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.brand {
    font-weight: 900;
    font-size: 21px;
    text-align: center;
}

.brand small {
    display: block;
    color: #ffd65c;
    font-size: 10px;
    letter-spacing: 2px;
    margin-top: 4px;
}


/* =========================================================
   LINK
========================================================= */

a {
    color: #ffd75d;
    text-decoration: none;
}


/* =========================================================
   BUTTON
========================================================= */

button {
    cursor: pointer;
    border: 1px solid #ffd15a;
    border-radius: 9px;
    padding: 9px 13px;
    font-weight: 800;
    color: #fff;
    background:
        linear-gradient(
            #e43b4d,
            #951022
        );
}

button:hover {
    filter: brightness(1.12);
}

button.danger {
    background: #68101c;
    border-color: #a84552;
}

button.secondary {
    background: #351018;
    border-color: #7b3440;
}


/* =========================================================
   INPUT & SELECT
========================================================= */

input,
select {
    width: 100%;
    padding: 10px;
    background: #100306;
    color: #fff;
    border: 1px solid #71303a;
    border-radius: 8px;
    outline: 0;
}

input::placeholder {
    color: #9d7e82;
}

input:focus,
select:focus {
    border-color: #ffd15a;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    text-align: center;
    padding: 25px 0 20px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    margin: 0 0 8px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 5px 12px #000;
}

.hero h1 span {
    color: #ffd75d;
}

.hero p {
    margin: 0;
    color: #ead8da;
    font-size: 14px;
}


/* =========================================================
   BANNER SLIDER
   ORIGINAL BANNER: 1500 x 293 PIXELS
========================================================= */

.banner {
    position: relative;

    width: 100%;

    aspect-ratio: 1500 / 293;

    height: auto;

    overflow: hidden;

    border: 2px solid #f5c34d;

    border-radius: 17px;

    background: #620b19;

    box-shadow: 0 15px 35px #0008;
}


/* =========================================================
   SLIDES
========================================================= */

.slides {
    width: 100%;
    height: 100%;

    display: flex;

    transition:
        transform 0.5s ease;
}

.slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
}


/* =========================================================
   SLIDER IMAGE
========================================================= */

.slide img {
    display: block;

    width: 100%;
    height: 100%;

    /*
       CONTAIN AGAR BANNER 1500x293
       TIDAK TERPOTONG
    */
    object-fit: contain;

    object-position: center center;

    background: #620b19;
}


/* =========================================================
   FALLBACK SLIDER
========================================================= */

.fallback {
    width: 100%;
    height: 100%;

    display: grid;
    place-content: center;

    text-align: center;

    font-size:
        clamp(
            24px,
            4vw,
            46px
        );

    font-weight: 900;

    padding: 20px;
}

.fallback b {
    color: #ffd75d;
}


/* =========================================================
   SLIDER ARROW
========================================================= */

.arrow {
    position: absolute;

    top: 50%;

    transform:
        translateY(-50%);

    border-radius: 50%;

    width: 42px;
    height: 42px;

    padding: 0;

    font-size: 25px;

    background: #160508cc;

    display: flex;

    align-items: center;
    justify-content: center;

    z-index: 5;
}

.arrow:hover {
    background: #000c;
}

.prev {
    left: 12px;
}

.next {
    right: 12px;
}


/* =========================================================
   SLIDER DOTS
========================================================= */

.dots {
    position: absolute;

    bottom: 9px;

    width: 100%;

    text-align: center;

    z-index: 5;
}

.dot {
    display: inline-block;

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #fff7;

    margin: 0 4px;

    cursor: pointer;
}

.dot.on {
    background: #ffd15a;

    box-shadow:
        0 0 8px #ffd15a;
}


/* =========================================================
   EVENT BADGES
========================================================= */

.badges {
    display: flex;

    justify-content: center;

    gap: 8px;

    flex-wrap: wrap;

    padding: 15px 0;
}

.badge {
    padding: 8px 13px;

    border: 1px solid #97515b;

    background: #3a1017;

    border-radius: 99px;

    color: #ffe59b;

    font-weight: 800;

    text-align: center;
}


/* =========================================================
   CARD
========================================================= */

.card {
    margin: 18px 0;

    background: #1b070bdc;

    border: 1px solid #762b37;

    border-radius: 15px;

    overflow: hidden;

    box-shadow:
        0 12px 30px #0007;
}


/* =========================================================
   CARD HEADER
========================================================= */

.head {
    padding: 15px 17px;

    border-bottom:
        1px solid #57212a;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;
}

.head h2 {
    margin: 0;

    font-size: 19px;
}


/* =========================================================
   CARD BODY
========================================================= */

.body {
    padding: 16px;
}


/* =========================================================
   GRID
========================================================= */

.grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 9px;
}

.wide {
    grid-column: span 2;
}


/* =========================================================
   TABLE
========================================================= */

.table {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;

    border-collapse: collapse;

    min-width: 820px;

    table-layout: fixed;
}

th,
td {
    padding: 13px 15px;

    border-bottom:
        1px solid #45151d;

    text-align: center;

    vertical-align: middle;
}

th {
    font-size: 12px;

    color: #ffd96a;

    background: #280a10;

    white-space: nowrap;

    text-align: center;
}

tbody tr {
    transition:
        background 0.2s ease;
}

tbody tr:hover {
    background: #3a0e16;
}


/* =========================================================
   TABLE COLUMN WIDTH - DESKTOP
========================================================= */

table th:nth-child(1),
table td:nth-child(1) {
    width: 12%;
}

table th:nth-child(2),
table td:nth-child(2) {
    width: 22%;
}

table th:nth-child(3),
table td:nth-child(3) {
    width: 24%;
}

table th:nth-child(4),
table td:nth-child(4) {
    width: 18%;
}

table th:nth-child(5),
table td:nth-child(5) {
    width: 24%;
}


/* =========================================================
   RANK
========================================================= */

.rank {
    font-weight: 900;
    font-size: 18px;
    text-align: center;
}

.gold {
    color: #ffd34e;
}

.silver {
    color: #ddd;
}

.bronze {
    color: #d79a60;
}


/* =========================================================
   USER ID
========================================================= */

.uid {
    font-weight: 900;
    color: #fff;
    text-align: center;
}


/* =========================================================
   TOTAL TO
========================================================= */

.to {
    text-align: center;

    font-weight: 900;

    color: #ffe17d;

    white-space: nowrap;
}


/* =========================================================
   WEBSITE
========================================================= */

.site {
    color: #dcbfc2;

    font-weight: 600;

    text-align: center;

    white-space: nowrap;
}


/* =========================================================
   HADIAH
========================================================= */

.prize {
    color: #ffe17d;

    font-weight: 800;

    text-align: center;

    white-space: nowrap;
}


/* =========================================================
   SIMULASI
========================================================= */

.sim {
    display: inline-block;

    font-size: 10px;

    color: #ffc45b;

    border:
        1px solid #8a5a22;

    border-radius: 4px;

    padding: 2px 4px;

    margin-left: 5px;

    vertical-align: middle;
}


/* =========================================================
   EMPTY DATA
========================================================= */

.empty {
    text-align: center;

    padding: 35px;

    color: #b99da1;
}


/* =========================================================
   HELP / STATUS
========================================================= */

.help,
.status {
    font-size: 12px;

    color: #bda5a8;

    line-height: 1.5;
}


/* =========================================================
   NOTICE
========================================================= */

.notice {
    padding: 10px 12px;

    border:
        1px solid #82512c;

    background: #2c160d;

    color: #ffdca0;

    border-radius: 9px;

    font-size: 12px;

    margin-bottom: 12px;
}


/* =========================================================
   FILTER
========================================================= */

.filters {
    display: flex;

    gap: 8px;

    flex-wrap: wrap;
}

.filters input {
    width: 180px;
}


/* =========================================================
   ADMIN BANNER LIST
========================================================= */

.banner-list {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(160px, 1fr)
        );

    gap: 9px;

    margin-top: 12px;
}

.banner-item {
    background: #100306;

    border:
        1px solid #602630;

    border-radius: 9px;

    overflow: hidden;
}

.banner-item img {
    width: 100%;

    height: 82px;

    object-fit: cover;

    display: block;
}

.banner-item div {
    padding: 6px;

    display: flex;

    justify-content: space-between;

    gap: 5px;

    align-items: center;

    font-size: 11px;
}


/* =========================================================
   LOGIN
========================================================= */

.login {
    max-width: 420px;

    margin: 35px auto;
}


/* =========================================================
   HIDDEN
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    text-align: center;

    color: #927b7f;

    font-size: 12px;

    padding: 30px;
}


/* =========================================================
   TABLET
   <= 760PX

   DESKTOP DI ATAS 760PX TIDAK BERUBAH
========================================================= */

@media (max-width: 760px) {

    .grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .wide {
        grid-column: span 2;
    }


    /* -----------------------------------------
       BANNER
    ----------------------------------------- */

    .banner {
        width: 100%;

        aspect-ratio: 1500 / 293;

        height: auto;

        border-radius: 12px;
    }


    /* -----------------------------------------
       HEADER CARD
    ----------------------------------------- */

    .head {
        align-items: flex-start;

        flex-direction: column;
    }


    /* -----------------------------------------
       FILTER
    ----------------------------------------- */

    .filters {
        width: 100%;
    }

    .filters input {
        width: 100%;
    }

}


/* =========================================================
   MOBILE
   <= 600PX

   TABLE FULL SCREEN TANPA SCROLL SAMPING
========================================================= */

@media (max-width: 600px) {

    /* -----------------------------------------
       CARD
    ----------------------------------------- */

    .card {
        width: 100%;

        margin-left: 0;
        margin-right: 0;
    }


    /* -----------------------------------------
       CARD HEADER
    ----------------------------------------- */

    .head {
        padding: 11px 10px;

        gap: 9px;
    }

    .head h2 {
        font-size: 14px;

        line-height: 1.3;
    }


    /* -----------------------------------------
       FILTER
    ----------------------------------------- */

    .filters {
        width: 100%;

        display: flex;

        gap: 5px;
    }

    .filters input {
        width: 50%;

        min-width: 0;

        padding: 8px 7px;

        font-size: 11px;
    }


    /* =====================================================
       TABLE MOBILE
       TIDAK BOLEH SCROLL KE SAMPING
    ===================================================== */

    .table {
        width: 100%;

        overflow-x: hidden;
    }

    table {
        width: 100%;

        /*
           Override min-width desktop
        */
        min-width: 0 !important;

        /*
           Paksa browser membagi
           lebar menjadi 5 kolom
        */
        table-layout: fixed;

        border-collapse: collapse;
    }


    /* -----------------------------------------
       TABLE CELL
    ----------------------------------------- */

    th,
    td {
        padding: 8px 3px;

        font-size: 9px;

        line-height: 1.2;

        text-align: center;

        vertical-align: middle;

        white-space: normal;

        overflow-wrap: anywhere;
    }


    /* -----------------------------------------
       TABLE HEADER
    ----------------------------------------- */

    th {
        font-size: 8px;

        font-weight: 900;

        padding: 8px 2px;

        white-space: normal;
    }


    /* =====================================================
       LEBAR KOLOM MOBILE
    ===================================================== */

    /* JUARA */
    table th:nth-child(1),
    table td:nth-child(1) {
        width: 9%;
    }


    /* USER ID */
    table th:nth-child(2),
    table td:nth-child(2) {
        width: 21%;
    }


    /* TOTAL TO */
    table th:nth-child(3),
    table td:nth-child(3) {
        width: 26%;
    }


    /* WEBSITE */
    table th:nth-child(4),
    table td:nth-child(4) {
        width: 18%;
    }


    /* HADIAH */
    table th:nth-child(5),
    table td:nth-child(5) {
        width: 26%;
    }


    /* =====================================================
       TABLE DATA
    ===================================================== */

    .rank {
        font-size: 13px;

        font-weight: 900;
    }

    .uid {
        font-size: 9px;

        font-weight: 900;

        /*
           Jika User ID terlalu panjang,
           boleh turun baris
        */
        word-break: break-all;
    }

    .to {
        font-size: 9px;

        white-space: normal;

        word-break: normal;
    }

    .site {
        font-size: 9px;

        white-space: normal;

        overflow-wrap: anywhere;
    }

    .prize {
        font-size: 9px;

        white-space: normal;

        word-break: normal;
    }


    /* =====================================================
       SIMULASI LABEL
    ===================================================== */

    .sim {
        display: inline-block;

        font-size: 6px;

        line-height: 1;

        padding: 2px 3px;

        margin-left: 1px;

        border-radius: 3px;
    }


    /* =====================================================
       BADGES
    ===================================================== */

    .badges {
        gap: 4px;

        padding: 10px 0;
    }

    .badge {
        font-size: 9px;

        padding: 6px 8px;
    }


    /* =====================================================
       HERO
    ===================================================== */

    .hero {
        padding: 18px 0 14px;
    }

    .hero h1 {
        font-size: 25px;

        line-height: 1.15;
    }

    .hero p {
        font-size: 11px;
    }


    /* =====================================================
       BANNER
    ===================================================== */

    .banner {
        width: 100%;

        aspect-ratio: 1500 / 293;

        height: auto;

        border-radius: 9px;

        border-width: 1px;
    }


    /* =====================================================
       SLIDER ARROW
    ===================================================== */

    .arrow {
        width: 32px;

        height: 32px;

        font-size: 20px;
    }

    .prev {
        left: 6px;
    }

    .next {
        right: 6px;
    }


    /* =====================================================
       DOT
    ===================================================== */

    .dots {
        bottom: 5px;
    }

    .dot {
        width: 7px;

        height: 7px;

        margin: 0 3px;
    }


    /* =====================================================
       FOOTER
    ===================================================== */

    footer {
        font-size: 9px;

        padding: 20px 5px;
    }
}


/* =========================================================
   EXTRA SMALL PHONE
   <= 380PX
========================================================= */

@media (max-width: 380px) {

    th,
    td {
        padding: 6px 2px;

        font-size: 8px;
    }


    th {
        font-size: 7px;
    }


    .rank {
        font-size: 11px;
    }


    .uid,
    .to,
    .site,
    .prize {
        font-size: 8px;
    }


    .sim {
        font-size: 5px;

        padding: 1px 2px;
    }


    .head h2 {
        font-size: 13px;
    }


    .hero h1 {
        font-size: 22px;
    }

}


/* =========================================================
   VERY SMALL PHONE
   <= 340PX
========================================================= */

@media (max-width: 340px) {

    th,
    td {
        padding: 5px 1px;

        font-size: 7px;
    }

    th {
        font-size: 6.5px;
    }

    .rank {
        font-size: 10px;
    }

    .uid,
    .to,
    .site,
    .prize {
        font-size: 7px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .hero p {
        font-size: 10px;
    }

    .badge {
        font-size: 8px;
        padding: 5px 7px;
    }

}