body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
 
}

.main-container {
    position: relative;
    width: 100%;
    max-width: 400px; /* Set max width to 400px as requested for desktop */
    height: 100vh;
    height: 100dvh; /* For better mobile browser support */
    margin: 0 auto;
    background-image: url('../images/kv-DCfdHA25.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.5); /* Shadow to separate from dark body on desktop */
}

/* Top Navigation */
.top-nav {
    position: absolute;
    top: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.mlbb-logo {
    height: 1.827rem;
    width: auto;
    object-fit: contain;
}

.tenth-logo {
    height: 1.367rem;
    width: auto;
    margin-left: 6px;
    object-fit: contain;
}

.nav-buttons {
    display: flex;
    gap: 0.1rem;
}

.nav-btn {
    background-image: url('../images/btn-draw-nav.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 95px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #5d3a1a;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background-color: transparent;
    padding: 0;
    transition: transform 0.1s;
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Side Button Group */
.side-btn-group {
    position: absolute;
    left: 0.5rem;
    top: 35%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Jarak antar tombol */
}

.side-btn {
    width: 50px; /* Lebar tombol (sesuaikan jika kurang pas) */
    height: 60px; /* Tinggi tombol dibuat sama agar proporsional/bulat */
    background-image: url('../images/btn-group1-DoZZRiZu.webp');
    background-size: 100% 200%; /* Membesarkan image 2x lipat tingginya agar bisa dibagi 2 (Sprite) */
    background-repeat: no-repeat;
    border: none;
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    padding: 0;
}

.side-btn:active {
    transform: scale(0.95);
}

/* Mengambil setengah bagian atas dari gambar */
.profile-btn {
    background-position: top center;
}

/* Mengambil setengah bagian bawah dari gambar */
.gift-btn {
    background-position: bottom center;
}

/* Bottom Section Group */
.bottom-section {
    position: absolute;
    bottom: -8%; /* Atur posisi keseluruhan grup dari dasar layar */
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    padding: 0 1rem;
}

.slogan {
    width: 100%;
    max-width: 450px;
    filter: drop-shadow(0 4px 10px rgba(13, 76, 255, 1));
    margin-bottom: -70px; /* Jarak tetap antar slogan dan tombol agar tidak pernah bertumpuk */
}

/* Start Button Container */
.start-btn-container {
    width: 75%;
    max-width: 320px;
    cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
}

.start-btn-container:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}

.start-btn-img {
    width: 100%;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.3));
}

/* Text inside the start button */
.start-btn-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-weight: 900;
    color: #3b2100;
    letter-spacing: 1px;
    pointer-events: none; /* Important: prevents text from intercepting clicks */
    font-family: "Segoe UI", Arial, sans-serif; /* Fallback for a cleaner sans-serif */
}

/* Modal Overlay Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9); /* Dark background */
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none; /* Hide clicks when inactive */
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto; /* Enable clicks when active */
}

/* Modal Box Styling */
.modal-box {
    position: relative;
    width: 95%;
    max-width: 360px;
    /* aspect-ratio dihapus agar tinggi kotak otomatis menyesuaikan seluruh isi (6 kotak) */
    background-image: url('../images/dia-bg-small-C3GeHljx.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border-radius: 8px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    padding-top: 15px; /* Tambahan ruang atas agar tidak nabrak bingkai emas */
    padding-bottom: 25px; /* Tambahan ruang bawah */
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

/* Modal Frame Decorations */
.modal-top-dec {
    position: absolute;
    /* Menggunakan persentase dari lebar kotak agar tinggi/posisi otomatis mengikuti saat di-resize! */
    top: 0;
    margin-top: -26.6%; 
    left: 50%;
    transform: translateX(-50%);
    width: 104%;
    pointer-events: none;
    z-index: 2;
}

.modal-bottom-dec {
    position: absolute;
    /* Dipatenkan di pinggir bawah kotak, typo 1x diperbaiki ke 1px */
    bottom: 1px;
    left: 45%;
    transform: translateX(-50%);
    width: 90%;
    pointer-events: none;
    z-index: 2;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    bottom: 100%;
    right: 28px;
    margin-bottom: 19px;
    width: 24px;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.modal-close:active {
    transform: scale(0.9);
}

/* Modal Inner Content */
.modal-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    width: 100%;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-title {
    font-size: 1rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    margin: 0;
    margin-top: -8px;
    margin-bottom: 0.8rem;
    /* Huruf kapital dihapus agar sesuai persis dengan referensi "My Rewards" */
}

.modal-desc {
    width: 80%; /* Diperlebar sedikit agar teks punya lebih banyak ruang */
    font-size: clamp(0.65rem, 3.5vw, 0.75rem); /* Font akan menyesuaikan ukuran layar (terkecil 12px, maksimal 14.4px) */
    line-height: 1.2; /* Menambah jarak antar baris teks agar enak dibaca */
    text-shadow: 0 1px 3px rgba(0,0,0,0.6); /* Mempertajam shadow agar kontras dengan background */
    margin: 0 auto;
    margin-top: 10px;
    margin-bottom: 0.8rem;
}

.modal-divider {
    width: 65%;
    height: 10px;
    margin: 0 auto;
    display: block;
}

.modal-body {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: 0 0.8rem;
    margin-top: 10px; /* Jarak dari teks deskripsi */
}

/* Grid untuk Rewards (3 Atas, 3 Bawah) */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 kolom */
    gap: 12px; /* Jarak antar kotak */
    width: 90%;
    margin: 0 auto;
}

/* CSS Murni untuk Kotak Reward berdasarkan Referensi Anda */
.reward-item {
    width: 100%;
    aspect-ratio: 3 / 4; /* Proporsi potret */
    background: linear-gradient(180deg, #c56dfa 0%, #ff899a 50%, #ffe066 100%);
    border: 2px solid #fde46f;
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 0 8px rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 2px 2px 2px;
}

.reward-name {
    font-family: 'Fredoka', sans-serif;
    font-size: 0.5rem;

    color: #fdd941;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 0 2px rgba(0,0,0,0.2);
    text-align: center;
    line-height: 1.2;
    margin-bottom: 2px;
    z-index: 2;
}

.reward-item img {
    max-width: 85%;
    max-height: 65%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Dekorasi mahkota emas di atas kotak */
.reward-item::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='24' viewBox='0 0 60 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 15 C 20 18 8 15 1 10 C 10 13 19 11 27 7 Z' fill='%23fde46f' /%3E%3Cpath d='M30 15 C 40 18 52 15 59 10 C 50 13 41 11 33 7 Z' fill='%23fde46f' /%3E%3Cpath d='M29 13 C 21 15 11 13 4 10 C 11 12 19 10 26 7 Z' fill='%2358d9ff' /%3E%3Cpath d='M31 13 C 39 15 49 13 56 10 C 49 12 41 10 34 7 Z' fill='%2358d9ff' /%3E%3Cpath d='M30 20 C 22 22 12 19 4 14 C 12 17 21 19 28 17 Z' fill='%23fde46f' /%3E%3Cpath d='M30 20 C 38 22 48 19 56 14 C 48 17 39 19 32 17 Z' fill='%23fde46f' /%3E%3Cpolygon points='30,0 36,10 30,22 24,10' fill='%23fde46f' /%3E%3Cpolygon points='30,3 33.5,10 30,19 26.5,10' fill='%2323c8f8' /%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    clip-path: none;
    z-index: 3;
}

/* Permata biru kecil di tengah mahkota (disembunyikan karena sudah tergabung di SVG ::after) */
.reward-item::before {
    display: none;
    z-index: 2;
}

/* ============================
   LOGIN MODAL STYLING
=============================== */
.login-box {
    position: relative;
    width: 90%;
    max-width: 360px;
    background-color: #0d2038;
    border-radius: 12px; 
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .login-box {
    transform: scale(1);
}

.login-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
}

.login-logo {
    width: 65%;
    max-width: 180px;
    margin-bottom: 2rem;
}

.login-primary-btn {
    width: 100%;
    background-color: #1a5383;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-icon-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-icon-svg {
    width: 22px;
    height: 22px;
}

.login-primary-btn:active {
    background-color: #4582b3;
}

.login-divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 0.85rem;
}

.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.login-divider span {
    padding: 0 10px;
    font-weight: 500;
}

.social-login-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
    justify-content: center;
}

.social-btn {
    flex: 1;
    max-width: 120px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.social-btn:active {
    background: #f3f4f6;
}

.login-footer {
    text-align: center;
    font-size: 0.85rem;
}

.login-footer p {
    color: #9ca3af;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.login-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: bold;
}

/* ============================
   TRUEID / VERIFICATION MODAL
=============================== */
.verification-box {
    background-color: #f1f2f6;
}

.verif-close {
    color: #888888;
}

.verif-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333333;
    text-align: center;
}

.verif-input-group {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.verif-input {
    width: 100%;
    background-color: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 0.95rem;
    color: #333;
    outline: none;
    box-sizing: border-box;
}

.verif-input::placeholder {
    color: #9ca3af;
}

.verif-input:focus {
    border-color: #3b82f6;
}

.help-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #80c4e9;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.verif-send-btn {
    width: 100%;
    background: linear-gradient(to bottom, #5086b9, #2b618e);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 14px 0;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 25px;
    cursor: pointer;
}

.verif-send-btn:active {
    background: linear-gradient(to bottom, #2b618e, #1a4a70);
}

.verif-footer p, .verif-footer a {
    color: #6b7280;
}
.verif-footer a {
    color: #3b82f6;
}
.popup-box-login-gg {
    background: #fff;
    max-width: 330px;
    height: auto;
    position: relative;
    margin: 50px auto;
    margin-top: 10%;
    border-radius: 5px;
}

@media only screen and (min-width: 320px) and (max-width: 387px) {
    .popup-box-login-gg 
    { margin-top: 20%; }
}