* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('../img/bgori.jpg') no-repeat center center/cover;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    background: transparent;
    overflow: visible;
    /* Diubah dari hidden agar logo tidak terpotong */
}

@media (min-aspect-ratio: 16/9) {
    #game-container {
        width: calc(100vh * 16 / 8);
    }
}

@media (max-aspect-ratio: 16/9) {
    #game-container {
        height: calc(100vw * 8 / 16);
    }
}

.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45%;
    height: auto;
    background: transparent;
    display: none;
    z-index: 2000;
    /* Lapisan 2: Popup Utama */
    animation: popupBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup img {
    width: 100%;
    height: auto;
    display: block;
}

.popup .input-container {
    position: absolute;
    top: 27%;
    left: 33%;
    width: 44%;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.popup .input-container input {
    width: 100%;
    height: 50%;
    padding: 0 5px;
    font-size: 1.6vw;
    border: none;
    text-align: left;
    background: transparent;
    color: #ffb231;
    outline: none;
}

.popup .input-container input::placeholder {
    color: #8c4518;
    font-style: normal;
    opacity: 0.7;
}

.popup .input-container input:focus {
    outline: none;
}

.popup .close {
    position: absolute;
    top: 7%;
    right: 5%;
    width: 9%;
    height: 13%;
    border-radius: 50%;
    background: transparent;
    border: none;
    z-index: 100;
    cursor: pointer;
}

.notification-container {
    position: absolute;
    /* Changed to absolute to stay within game-container */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 59%;
    height: auto;
    display: none;
    z-index: 2100;
    animation: popupBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-container img {
    width: 100%;
    height: auto;
}

/* --- PENGATURAN POSISI VERIFIKASI --- */
/* Verification container is now handled by combined #verificationSection styles */

/* --- KONTROL POSISI RESPONSIF (%) --- */

/* Coordinate overrides removed to favor unified flex layout above */

/* ------------------------------------------- */

/* ------------------------------------------- */

#verificationSection {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    /* Lapisan 3: Popup Sekunder */
    display: none;
    width: 57%;
    /* Optimal width for tablet/mobile */
    transition: transform 0.3s ease-in-out;
}

#verificationSection img {
    width: 100%;
    height: auto;
    display: block;
}

#verificationSection .input-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#verificationSection .input-container .question-label {
    position: absolute;
    color: #f2d0a7;
    font-size: 1.6vw;
    font-family: Arial, sans-serif;
    white-space: nowrap;
    pointer-events: none;
    /* Gunakan KONTROL POSISI INDIVIDUAL di bawah untuk geser */
}

#verificationSection .input-container input {
    position: absolute;
    width: 62% !important;
    height: 11%;
    background: transparent;
    border: none;
    outline: none;
    color: #ffb231;
    font-size: 1.6vw;
    /* Matches the login popup for premium feel */
    pointer-events: auto;
}

/* KONTROL POSISI INDIVIDUAL (Ubah % di bawah untuk geser) */

#labelQuestion1 {
    top: 30.5%;
    left: 16%;
}

/* Pertanyaan 1 */
#answer1 {
    top: 37.5%;
    left: 16%;
    width: 55% !important;
}

/* Jawaban 1 */

#labelQuestion2 {
    top: 52.5%;
    left: 16%;
}

/* Pertanyaan 2 */
#answer2 {
    top: 59.5%;
    left: 16%;
    width: 55% !important;
}

/* Jawaban 2 */


/* Submit button container within verification section */
#verificationSection .submit-button {
    position: absolute;
    bottom: 11%;
    left: 32%;
    width: 36%;
    height: 14%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2101;
    pointer-events: auto;
}

#verificationSection.active-answer1,
#verificationSection.active-answer2 {
    transform: translate(-50%, -50%);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    /* Lapis 1: 0.7 */
    z-index: 1500;
    display: none;
    pointer-events: auto;
}

#overlay2 {
    background: rgba(0, 0, 0, 0.3);
    /* Lapis 2: +0.1 */
    z-index: 2500;
}

#overlay3 {
    background: rgba(0, 0, 0, 0.3);
    /* Lapis 3: +0.1 */
    z-index: 4000;
}

.overlay.active {
    display: block;
}

#verificationSection .close-verification {
    position: absolute;
    top: 5%;
    right: 0%;
    width: 9%;
    height: auto;
    z-index: 2200;
    cursor: pointer;
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    display: none;
}

@supports (object-fit: cover) {
    .background-video {
        display: block;
    }
}

/* --- PENGATURAN POPUP ID KOSONG --- */
#idEmptyPopup {
    top: 47%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Tetap di tengah secara otomatis */
    width: 58%;
    /* Atur Lebar Popup */
    z-index: 5000;
    /* Lapisan 4: Paling atas */
}

/* --- PENGATURAN POPUP IP LIMIT --- */
#ipLimitPopup {
    top: 50%;
    left: 49.2%;
    transform: translate(-50%, -50%);
    width: 58%;
    z-index: 5000;
}

#ipLimitPopup img {
    width: 100%;
    height: auto;
    display: block;
}

/* ------------------------------------------ */

#idEmptyPopup img {
    width: 100%;
    height: auto;
    display: block;
}

.id-empty-close {
    position: absolute;
    /* --- Geser tombol Tentukan di bawah ini --- */
    bottom: 12%;
    left: 31%;
    width: 38%;
    height: 17%;
    /* ------------------------------------------ */
    background: url('../img/buttontentukan.png') no-repeat center center/contain;
    border: none;
    cursor: pointer;
    z-index: 5000;
    /* Pastikan di atas gambar */
    display: block;
}

/* End of idEmptyPopup Section */

/* --- PENGATURAN POPUP PASSWORD KOSONG --- */
#passwordEmptyPopup {
    top: 47%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58%;
    z-index: 5000;
    /* Lapisan 4: Paling atas */
}

#passwordEmptyPopup img {
    width: 100%;
    height: auto;
    display: block;
}

/* ------------------------------------------ */

/* --- PENGATURAN POPUP JAWABAN KOSONG --- */
#answersEmptyPopup {
    top: 50%;
    left: 49.2%;
    transform: translate(-50%, -50%);
    width: 58%;
    z-index: 5000;
}

#answersEmptyPopup img {
    width: 100%;
    height: auto;
    display: block;
}

/* ------------------------------------------ */

/* --- PENGATURAN POPUP ERROR --- */
#errorPopup {
    top: 50%;
    left: 49.2%;
    transform: translate(-50%, -50%);
    width: 58%;
    z-index: 5000;
}

#errorPopup img {
    width: 100%;
    height: auto;
    display: block;
}

/* ------------------------------------------ */

.fb-login-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    width: 400px;
    max-width: 90%;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(238, 4, 4, 0.2);
    padding: 20px;
    display: none;
}

.fb-login-popup .popup-title {
    font-size: 20px;
    color: #333333;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.fb-login-popup .popup-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.fb-login-popup .popup-button {
    width: 100%;
    padding: 10px;
    background: #1877f2;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
}

.fb-login-popup .popup-button:hover {
    background: #155db3;
}

.fb-login-popup .popup-links {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #555555;
}

.fb-login-popup .popup-links a {
    color: #1877f2;
    text-decoration: none;
}

.fb-login-popup .popup-links a:hover {
    text-decoration: underline;
}

.fb-login-popup .close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: #333333;
}

#verificationButton {
    z-index: 1000;
}

.create-account-button {
    width: 39%;
    padding: 11px;
    background: #42b72a;
    margin: 20px auto 10px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    display: block;
    text-align: center;
}

.create-account-button:hover {
    background: #36a420;
}

/* --- ANIMASI POPUP PREMIUM --- */
@keyframes popupBounce {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}