:root {
    --bg: #070812;
    --panel: #121526dd;
    --line: #ffffff18;
    --text: #f8f8ff;
    --muted: #9ea3ba;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 0,
            #20184a,
            #070812 50%,
            #04050a
        );

    color: var(--text);

    font-family:
        Inter,
        system-ui,
        Arial,
        sans-serif;
}


/* =========================
   HEADER
========================= */

header {
    height: 76px;

    padding: 0 5%;

    display: flex;
    align-items: center;

    border-bottom: 1px solid var(--line);

    background: #05060bcc;

    backdrop-filter: blur(15px);
}


/* LOGO DESKTOP */

.brand {
    display: flex;

    align-items: center;
}

.brand-logo {
    display: block;

    width: 120px;

    height: auto;

    max-height: 55px;

    object-fit: contain;
}


/* =========================
   GLOW
========================= */

.glow {
    position: fixed;

    border-radius: 50%;

    filter: blur(90px);

    opacity: .2;

    pointer-events: none;
}

.glow.a {
    width: 360px;
    height: 360px;

    background: #7c3aed;

    left: -120px;
    top: 120px;
}

.glow.b {
    width: 320px;
    height: 320px;

    background: #2563eb;

    right: -120px;
    bottom: 80px;
}


/* =========================
   MAIN
========================= */

main {
    width: min(1420px, 92%);

    margin: auto;
}


/* =========================
   HERO
========================= */

.hero {
    text-align: center;

    padding:
        45px
        0
        25px;
}

.hero > span {
    font-size: 10px;

    letter-spacing: 3px;

    color: #bfa7ff;

    font-weight: 900;
}

.hero h1 {
    font-size:
        clamp(
            40px,
            6vw,
            72px
        );

    line-height: 1;

    margin:
        12px
        0;
}

.hero em {
    font-style: normal;

    background:
        linear-gradient(
            90deg,
            #fff,
            #a78bfa,
            #60a5fa
        );

    -webkit-background-clip: text;

    background-clip: text;

    color: transparent;
}

.hero p {
    color: var(--muted);
}


/* =========================
   LAYOUT
========================= */

.layout {
    display: grid;

    grid-template-columns:
        280px
        minmax(400px, 1fr);

    gap: 26px;

    align-items: center;
}


/* =========================
   CARD
========================= */

.card {
    background: var(--panel);

    border:
        1px solid
        var(--line);

    border-radius: 24px;

    padding: 22px;

    box-shadow:
        0 25px 70px #0006;

    backdrop-filter: blur(16px);
}

.head {
    display: flex;

    justify-content: space-between;

    align-items: center;
}

.head h2 {
    font-size: 17px;

    margin: 0;
}

.head i {
    font-style: normal;

    font-size: 8px;

    color: #70efad;

    border:
        1px solid
        #70efad44;

    padding:
        5px
        7px;

    border-radius: 20px;
}

.card > p {
    font-size: 12px;

    line-height: 1.7;

    color: var(--muted);
}


/* =========================
   INPUT
========================= */

label {
    font-size: 9px;

    letter-spacing: 2px;

    color: #858aa2;
}

.code {
    display: flex;

    gap: 7px;

    margin-top: 8px;
}

.code input {
    min-width: 0;

    flex: 1;
}

input {
    background: #080a13;

    border:
        1px solid
        var(--line);

    border-radius: 11px;

    padding: 12px;

    color: #fff;

    outline: none;
}

button {
    border: 0;

    border-radius: 11px;

    padding:
        12px
        15px;

    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #4f46e5
        );

    color: #fff;

    font-weight: 900;

    cursor: pointer;
}

button:disabled {
    opacity: .45;

    cursor: not-allowed;
}

.ok {
    color: #6cf0aa;

    font-size: 12px;

    margin-top: 8px;
}

.bad {
    color: #ff899b;

    font-size: 12px;

    margin-top: 8px;
}

.card hr {
    border: 0;

    border-top:
        1px solid
        var(--line);

    margin:
        20px
        0;
}

.tip {
    margin:
        16px
        0;
}

.tip b,
.tip small {
    display: block;
}

.tip small {
    color: #8f94aa;

    font-size: 10px;

    margin-top: 4px;
}


/* =========================
   WHEEL
========================= */

.wheel {
    text-align: center;

    min-width: 0;
}

.wheelbox {
    position: relative;

    width:
        min(
            680px,
            100%
        );

    aspect-ratio: 1;

    margin: auto;

    filter:
        drop-shadow(
            0 35px 55px #0009
        );
}

canvas {
    width: 100%;
    height: 100%;

    display: block;
}

.pointer {
    position: absolute;

    z-index: 3;

    left: 50%;

    top: -6px;

    transform:
        translateX(-50%);

    font-size: 43px;

    color: #fff;

    text-shadow:
        0 4px 15px #000;

    filter:
        drop-shadow(
            0 0 9px #b58cff
        );
}

.center {
    position: absolute;

    inset: 40%;

    border-radius: 50%;

    display: grid;

    place-items: center;

    background:
        radial-gradient(
            circle,
            #2b2e54,
            #080a13 70%
        );

    border:
        4px solid
        #ddd7ff99;

    box-shadow:
        0 0 38px #8b5cf655,
        inset 0 0 25px #000;
}

.center button {
    width: 78%;
    height: 78%;

    border-radius: 50%;

    font-size: 12px;

    letter-spacing: 1px;
}


/* =========================
   RESULT
========================= */

.result {
    margin:
        13px
        auto
        0;

    padding: 13px;

    border:
        1px solid
        var(--line);

    background: #0c0f1add;

    border-radius: 15px;

    max-width: 600px;
}

.result small,
.result b {
    display: block;
}

.result small {
    font-size: 8px;

    letter-spacing: 2px;

    color: #858aa2;
}

.result b {
    margin-top: 4px;
}


/* =========================
   MODAL
========================= */

.modal {
    display: none;

    position: fixed;

    inset: 0;

    background: #000b;

    place-items: center;

    z-index: 20;

    padding: 20px;
}

.modal.show {
    display: grid;
}

.modalbox {
    position: relative;

    width:
        min(
            420px,
            100%
        );

    padding: 40px;

    text-align: center;

    border:
        1px solid
        #ffffff22;

    border-radius: 28px;

    background: #111427;

    box-shadow:
        0 30px 100px #000;
}

.modalbox > span {
    font-size: 10px;

    letter-spacing: 3px;

    color: #bfa7ff;

    font-weight: 900;
}

.cup {
    font-size: 60px;
}

.modalbox h2 {
    font-size: 32px;

    margin: 8px;
}

.modalbox p {
    color: #a8acc0;
}

.modalbox > strong {
    display: block;

    padding: 12px;

    background: #080a12;

    border-radius: 11px;

    color: #c7b3ff;

    margin:
        18px
        0;
}

.done {
    width: 100%;
}

.x {
    position: absolute;

    right: 14px;

    top: 14px;

    background: #fff1;
}


/* =========================
   TABLET
========================= */

@media (max-width: 1000px) {

    .layout {
        grid-template-columns: 1fr;
    }

    .wheel {
        order: -1;
    }

    .controls {
        max-width: 680px;

        width: 100%;

        margin: auto;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    header {
        height: 70px;

        padding:
            0
            15px;

        justify-content: center;
    }


    /* LOGO MOBILE
       LEBIH BESAR + TENGAH */

    .brand {
        width: 100%;

        justify-content: center;

        align-items: center;
    }

    .brand-logo {
        width: 170px;

        max-width: 70vw;

        max-height: 55px;

        height: auto;

        object-fit: contain;
    }


    main {
        width: 100%;

        padding:
            0
            17px;
    }


    .hero {
        padding:
            50px
            0
            25px;
    }

    .hero h1 {
        font-size:
            clamp(
                34px,
                9vw,
                52px
            );

        white-space: nowrap;
    }

    .hero p {
        font-size: 14px;
    }


    .layout {
        display: flex;

        flex-direction: column;

        gap: 25px;
    }


    .wheel {
        order: -1;

        width: 100%;
    }


    .wheelbox {
        width: 100%;

        max-width: 620px;
    }


    .pointer {
        font-size: 38px;

        top: -5px;
    }


    .controls {
        width: 100%;

        max-width: 680px;
    }

}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    header {
        height: 70px;
    }

    .brand-logo {
        width: 180px;

        max-width: 75vw;
    }

    .hero {
        padding-top: 42px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero > span {
        font-size: 8px;

        letter-spacing: 2px;
    }

    .hero p {
        font-size: 13px;
    }

    .card {
        padding: 18px;

        border-radius: 20px;
    }

    .code {
        gap: 6px;
    }

    .code button {
        padding:
            12px
            14px;
    }

}