* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

/* ==========================================
   DEFAULT / MOBILE MODE STYLING
   ========================================== */
body {
    background: #0a090e url('assets/backgroundmobile.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 15px;
    overflow-x: hidden;
}

.main-container {
    width: 100%;
    max-width: 480px;
    margin: auto;
}

/* Header Logo Mobile */
.header-mobile {
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.header-mobile .logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.brand-logo-desktop {
    display: none;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Wheel Section Mobile */
.wheel-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.wheel-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto;
}

.wheel-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden; /* Mengunci Potongan Pizza di Dalam Lingkaran */
}

.wheel-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    z-index: 1;
    transition: transform 5s cubic-bezier(0.15, 0.90, 0.15, 1.00);
}

/* ==========================================
   POSISI & UKURAN POTONGAN PIZZA (1.png - 8.png)
   ========================================== */
.slice {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transform-origin: 50% 50%;
}

.slice img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -92%); /* Pas di dalam bingkai tanpa menutup teks */
    width: 43%;                       /* Mekar penuh mengisi latar biru */
    height: 42%;
    object-fit: contain;
    display: block;
}

/* Rotasi Melingkar 8 Slot (45 Deg Per Slice) */
.slice-1 { transform: rotate(0deg); }
.slice-2 { transform: rotate(45deg); }
.slice-3 { transform: rotate(90deg); }
.slice-4 { transform: rotate(135deg); }
.slice-5 { transform: rotate(180deg); }
.slice-6 { transform: rotate(225deg); }
.slice-7 { transform: rotate(270deg); }
.slice-8 { transform: rotate(315deg); }

/* Bingkai Mobile */
.wheel-frame {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('assets/wheelbingkaimobile.png') no-repeat center center;
    background-size: 100% 100%;
    z-index: 2;
    pointer-events: none;
    transform: translateY(-3px);
}

.spinner-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 65px;
    height: 65px;
    z-index: 3;
    pointer-events: none;
}

.pointer {
    position: absolute;
    top: -18px; left: 50%;
    transform: translateX(-50%);
    width: 42px; height: auto;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
}

/* Form Section & Glass Transparan */
.form-section {
    width: 100%;
}

.glass-card-transparent {
    background: rgba(18, 16, 25, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 16px;
    padding: 20px 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.form-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.form-card input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
}

.form-card input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.spin-btn-wrapper {
    margin: 2px 0;
}

.spin-img-btn {
    width: 110px;
    height: 110px;
    cursor: pointer;
    transition: transform 0.2s;
}

/* BUTTON LIVECHAT & BONUS */
.button-group {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 5px;
}

.btn-action {
    flex: 1;
    padding: 8px 10px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-livechat { background: linear-gradient(135deg, #008cba, #005f7f); color: #fff; }
.btn-bonus { background: linear-gradient(135deg, #2e7d32, #1b5e20); color: #fff; }

.animate-btn {
    position: relative;
    overflow: hidden;
}

.animate-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    filter: brightness(1.2);
}

/* Modals */
.modal {
    display: flex;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 999;
    cursor: pointer;
}

#resultModal { display: none; }

.modal-content {
    max-width: 90%;
    width: 380px;
    text-align: center;
    border: 2px solid #ffd700;
    cursor: default;
}

.modal-content h2 { color: #ffd700; font-size: 18px; margin-bottom: 10px; }
.modal-content p { font-size: 14px; line-height: 1.5; color: #ddd; margin-bottom: 15px; }

.welcome-btn-group { display: flex; flex-direction: column; gap: 10px; }
.btn-welcome-spin { padding: 10px; background: linear-gradient(135deg, #ffd700, #ff8c00); border: none; border-radius: 6px; font-weight: bold; cursor: pointer; }
.btn-welcome-claim { padding: 10px; background: #008cba; color: #fff; text-decoration: none; border-radius: 6px; font-weight: bold; }

.alert-warning {
    background: rgba(255, 215, 0, 0.1); border: 1px solid #ffd700;
    color: #fff; padding: 10px; margin: 15px 0; font-size: 12px; border-radius: 6px;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes bouncePointer {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes glowEffect {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4)); }
    50% { filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.8)); }
}

@keyframes popupShow {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-pulse { animation: pulse 3s infinite ease-in-out; }
.animate-bounce-pointer { animation: bouncePointer 1.5s infinite ease-in-out; }
.animate-glow { animation: glowEffect 2s infinite ease-in-out; }
.animate-popup { animation: popupShow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* ==========================================
   DESKTOP MODE STYLING (MIN-WIDTH: 992px)
   ========================================== */
@media (min-width: 992px) {
    body {
        background: #0a090e url('assets/backgroundesk.png') no-repeat center center fixed;
        background-size: cover;
    }

    .main-container {
        max-width: 1000px;
    }

    .header-mobile {
        display: none;
    }

    .content-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 60px;
    }

    .wheel-section {
        flex: 1;
    }

    .wheel-wrapper {
        width: 450px;
        height: 450px;
    }

    .slice img {
        width: 43%;
        height: 42%;
        top: 50%;
        transform: translate(-50%, -92%);
    }

    .wheel-frame {
        background: url('assets/wheelbingkaidesk.png') no-repeat center center;
        background-size: 100% 100%;
        transform: translateY(-4.5px);
    }

    .pointer {
        width: 58px;
        top: -26px;
    }

    .spinner-icon {
        width: 85px;
        height: 85px;
    }

    .form-section {
        flex: 1;
        max-width: 420px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .brand-logo-desktop {
        display: block;
        text-align: center;
        margin-bottom: 15px;
    }

    .brand-logo-desktop .logo {
        max-width: 250px;
        height: auto;
        filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
    }

    .glass-card-transparent {
        padding: 25px 20px;
    }

    .form-card input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-action {
        padding: 10px 14px;
        font-size: 13px;
    }

    .spin-img-btn {
        width: 125px;
        height: 125px;
    }
}