* {
    box-sizing: border-box;
}

:root {
    --gold-1: #ffd54a;
    --gold-2: #f4b400;
    --gold-3: #d89200;
    --dark-1: #07111f;
    --dark-2: #0d1b2e;
    --dark-3: #13253e;
    --dark-4: #f1aa0e;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    min-height: 100%;
    color: #fff;
    overflow-x: hidden;
    background: transparent;
}

.member-bg {
    position: fixed;
    inset: 0;
    background: url('https://i.imgur.com/vSuA9ND.png') center center / cover no-repeat;
    transform: scale(1.04);
    filter: blur(0);
    z-index: 0;
}

.member-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 196, 0, 0.08), transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(255, 196, 0, 0.06), transparent 25%),
        linear-gradient(135deg, rgba(4, 12, 24, 0.72), rgba(9, 19, 35, 0.86));
    z-index: 1;
}

.member-wrap,
.play-wrap {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 600px) minmax(320px, 460px);
    align-items: center;
    justify-content: center;
    gap: 42px;
    padding: 40px 28px;
}

.wheel-preview,
.wheel-area {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
}

/* =========================
   INDEX STATIC WHEEL
========================= */

.static-wheel {
    width: 520px;
    height: 520px;
    max-width: 100%;
    border-radius: 50%;
    border: 8px solid var(--gold-1);
    background: radial-gradient(circle at center, #fff1a8 0%, #ffd54a 36%, #e6a800 100%);
    box-shadow:
        0 0 0 6px rgba(255, 213, 74, 0.14),
        0 0 30px rgba(255, 200, 0, 0.30),
        0 0 80px rgba(255, 180, 0, 0.18);
    position: relative;
}

.static-wheel::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 0, 0, 0.28);
}

.wheel-center {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0a0f16;
    border: 6px solid var(--gold-1);
    box-shadow: 0 0 20px rgba(255, 196, 0, 0.35);
}

/* =========================
   INDEX CENTER LOGO
========================= */

.index-wheel-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, #f4d54a, #d89a00);
    border: 6px solid #ffd54a;
    box-shadow:
        0 0 24px rgba(255, 200, 0, 0.65),
        inset 0 0 18px rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.index-wheel-center-logo img {
    width: 95%;   /* 🔥 FULL biar lebih gede */
    height: 95%;
    object-fit: contain;
}

/* =========================
   PLAY WHEEL
========================= */

.wheel-area {
    position: relative;
    width: 520px;
    height: 520px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wheelCanvas {
    display: block;
    width: 520px;
    height: 520px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 3;
    border-radius: 50%;
    border: 8px solid var(--gold-1);
    background: radial-gradient(circle at center, #fff1a8 0%, #ffd54a 36%, #e6a800 100%);
    box-shadow:
        0 0 0 6px rgba(255, 213, 74, 0.14),
        0 0 30px rgba(255, 200, 0, 0.30),
        0 0 80px rgba(255, 180, 0, 0.18);
}

.wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 56px solid #ff3b30;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
    z-index: 8;
}

/* =========================
   LIGHTS AROUND WHEEL
========================= */

.wheel-lights {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 564px;
    height: 564px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

.wheel-light {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px;
    border-radius: 50%;
    background: #ffd54a;
    box-shadow:
        0 0 6px #ffd54a,
        0 0 12px #f4b400,
        0 0 18px rgba(255, 213, 74, 0.9);
    transform:
        rotate(calc(var(--i) * 15deg))
        translateY(-282px);
    animation: blinkWheel 1s infinite alternate;
    animation-delay: calc(var(--i) * 0.05s);
}

@keyframes blinkWheel {
    0% {
        opacity: 0.35;
        background: #fff3a3;
        box-shadow:
            0 0 4px #fff3a3,
            0 0 8px #f4b400,
            0 0 14px rgba(255, 213, 74, 0.45);
    }
    100% {
        opacity: 1;
        background: #ffd54a;
        box-shadow:
            0 0 8px #ffd54a,
            0 0 18px #f4b400,
            0 0 30px rgba(255, 213, 74, 1);
    }
}

/* =========================
   PLAY CENTER LOGO
========================= */

.wheel-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #f4d54a, #d89a00);
    border: 5px solid #ffd54a;
    box-shadow:
        0 0 20px rgba(255, 200, 0, 0.6),
        inset 0 0 18px rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 7;
    animation: wheelLogoGlow 2s infinite alternate;
    overflow: hidden;
}

.wheel-center-logo img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    display: block;
}

@keyframes wheelLogoGlow {
    from {
        box-shadow:
            0 0 10px rgba(255, 200, 0, 0.35),
            inset 0 0 10px rgba(255, 255, 255, 0.20);
    }
    to {
        box-shadow:
            0 0 30px rgba(255, 200, 0, 0.95),
            inset 0 0 18px rgba(255, 255, 255, 0.30);
    }
}

/* =========================
   PANEL
========================= */

.member-panel {
    width: 100%;
    background: rgba(10, 19, 34, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    backdrop-filter: blur(10px);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 34px 28px;
    text-align: center;
}

.logo-box {
    display: inline-block;
    margin-bottom: 18px;
    padding: 10px 18px;
    border: 3px solid var(--gold-1);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 201, 53, 0.20), rgba(255, 179, 0, 0.08));
    color: var(--gold-1);
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(255, 208, 70, 0.18);
    line-height: 1.05;
}

.logo-box img {
    max-width: 25px;
}

.member-panel h2 {
    margin: 4px 0 18px;
    font-size: 30px;
    line-height: 1.15;
    color: #fff;
}

.member-panel p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.90);
    font-size: 16px;
}

/* =========================
   FORM
========================= */

.member-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.member-form input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #222;
    font-size: 16px;
    text-align: center;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.08);
}

.member-form input::placeholder {
    color: #8a8a8a;
}

.member-form button,
.ghost-btn,
#spinButton,
#copyClaimBtn,
#closePopup {
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .4px;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 10px 18px rgba(244, 180, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.member-form button:hover,
.ghost-btn:hover,
#spinButton:hover,
#copyClaimBtn:hover,
#closePopup:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffc928, #e3a100);
    margin-top: 2px;
}

#spinButton:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.btn-back {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: transparent;
    border: 2px solid #f4b400;
    color: #f4b400;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #f4b400;
    color: #000;
}

.btn-music {
    margin-top: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 2px solid #f4b400;
    background: transparent;
    color: #f4b400;
    cursor: pointer;
    font-weight: bold;
}

.btn-music:hover {
    background: #f4b400;
    color: #000;
}

.member-error {
    margin: 0 0 16px;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(220, 53, 69, 0.18);
    border: 1px solid rgba(255, 99, 99, 0.28);
    color: #ffd4d4;
    font-size: 14px;
}

/* =========================
   POPUP
========================= */

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99;
}

.popup-card {
    width: 100%;
    max-width: 430px;
    background: linear-gradient(180deg, #101b31, #0a1222);
    border: 2px solid var(--gold-1);
    border-radius: 24px;
    padding: 28px 22px;
    text-align: center;
    box-shadow:
        0 18px 60px rgba(0, 0, 0, 0.42),
        0 0 40px rgba(255, 196, 0, 0.16);
}

.popup-card h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 30px;
    color: var(--gold-1);
}

.popup-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    display: block;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.popup-name {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}

.popup-desc {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
}

.popup-note {
    margin-top: 16px;
    color: #ffe58d;
    font-weight: 700;
    font-size: 15px;
}

.popup-token {
    margin-top: 12px;
    color: #fff;
    font-size: 15px;
}

.hidden {
    display: none !important;
}

/* =========================
   TABLET
========================= */

@media (max-width: 1024px) {
    .member-wrap,
    .play-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 26px 18px 36px;
    }

    .member-panel {
        max-width: 560px;
        margin: 0 auto;
    }

    .static-wheel,
    #wheelCanvas {
        width: 420px;
        height: 420px;
    }

    .wheel-area {
        width: 420px;
        height: 420px;
    }

    .wheel-lights {
        width: 460px;
        height: 460px;
    }

    .wheel-light {
        transform:
            rotate(calc(var(--i) * 15deg))
            translateY(-230px);
    }

    .logo-box {
        font-size: 34px;
    }

    .logo-box img {
    max-width: 25px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 640px) {
    .member-wrap,
    .play-wrap {
        padding: 18px 12px 26px;
        gap: 18px;
    }

    .member-panel {
        padding: 24px 16px;
        border-radius: 18px;
    }

    .logo-box {
        font-size: 28px;
        padding: 10px 14px;
    }

    .logo-box img {
    max-width: 25px;
    }

    .member-panel h2 {
        font-size: 24px;
    }

    .member-panel p {
        font-size: 15px;
    }

    .static-wheel {
        width: 330px;
        height: 330px;
    }

    .wheel-area {
        width: 330px;
        height: 380px;
        margin: 0 auto;
        position: relative;
    }

    #wheelCanvas {
        width: 330px;
        height: 330px;
        position: absolute;
        top: 54%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .wheel-lights {
        width: 356px;
        height: 356px;
        top: 54%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .wheel-light {
        width: 12px;
        height: 12px;
        margin: -6px;
        transform:
            rotate(calc(var(--i) * 15deg))
            translateY(-178px);
    }

    .wheel-pointer {
        top: 14px;
        left: 50%;
        transform: translateX(-50%);
    }

    .wheel-center-logo {
        width: 92px;
        height: 92px;
    }

    .index-wheel-center-logo {
        width: 180px;
        height: 180px;
    }

    .popup-card {
        padding: 24px 16px;
        border-radius: 18px;
    }

    .popup-image {
        width: 150px;
        height: 150px;
    }

    .popup-name {
        font-size: 22px;
    }
}

/* =========================
   FIX INDEX POSITION
========================= */

.wheel-preview {
    position: relative;
    width: 330px;
    height: 420px;
    margin: 0 auto;
}

/* Wheel posisi */
.static-wheel {
    position: absolute;
    top: 40px; /* 🔥 ini yang bikin center */
    left: 50%;
    transform: translateX(-50%);
    width: 330px;
    height: 330px;
}

/* Lampu mengikuti wheel */
.index-wheel-lights {
    position: absolute;
    top: 205px; /* 🔥 sejajarin sama wheel */
    left: 50%;
    width: 356px;
    height: 356px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.index-wheel-light {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px;
    border-radius: 50%;
    background: #ffd54a;
    box-shadow:
        0 0 6px #ffd54a,
        0 0 12px #f4b400,
        0 0 18px rgba(255, 213, 74, 0.9);
    transform:
        rotate(calc(var(--i) * 15deg))
        translateY(-178px);
    animation: blinkWheel 1s infinite alternate;
}

/* Logo tengah */
.index-wheel-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 230px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 3;
}

.index-wheel-center-logo::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, #f4d54a, #d89a00);
    border: 6px solid #ffd54a;
    box-shadow:
        0 0 24px rgba(255, 200, 0, 0.65),
        inset 0 0 18px rgba(255,255,255,0.25);
    z-index: 0;
}

.index-wheel-center-logo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Jarak ke panel */
.member-panel {
    margin-top: 10px;
}