/* OVERLAY */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* BOX MODAL */
.modal-box {
    background: #ffffff;
    width: 400px;
    max-width: 90%;
    border-radius: 18px;
    padding: 25px 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    animation: zoomIn .3s ease;
    position: relative;
}

/* ANIMASI */
@keyframes zoomIn {
    from {
        transform: scale(.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* TITLE */
.modal-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* FORM INPUT */
.modal-box input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    outline: none;
    transition: 0.2s;
    font-size: 14px;
}

.modal-box input:focus {
    border-color: #2ea44f;
    box-shadow: 0 0 0 2px rgba(46,164,79,0.15);
}

/* BUTTON */
.modal-box button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2ea44f, #1f883d);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.modal-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* LINK SWITCH */
.modal-box p {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.modal-box a {
    color: #2ea44f;
    text-decoration: none;
    font-weight: 600;
}

/* CLOSE BUTTON */
.close-modal {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.close-modal i {
    font-size: 20px;
    color: #555;
}

.close-modal:hover {
    background: #e53935;
    transform: scale(1.1) rotate(90deg);
}

.close-modal:hover i {
    color: #fff;
}

/* WRAPPER */
.form-wrapper {
    position: relative;
    min-height: 380px;
}

.form-content {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.35s ease;
    pointer-events: none;
}

.form-content.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* LOGIN REGISTER SWITCH */
#loginBox, #registerBox {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all .4s ease;
    display: none;
}

#loginBox.active, #registerBox.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}
/* --- NOTIFIKASI LOGIN/REGISTER --- */
.login-notif {
    padding: 12px 15px;
    border-radius: 10px; /* Sudut membulat */
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px; /* Jarak antara icon dan text */
    
    /* Animasi muncul */
    animation: slideInDown 0.4s ease forwards;
    opacity: 0;
    transform: translateY(-10px);
}

/* Animasi Keyframes */
@keyframes slideInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- VARIAN SUKSES (HIJAU) --- */
.login-notif.success {
    background-color: #d1e7dd;
    color: #0f5132;
    animation: fadeIn 3s ease;

}

/* Menambahkan Icon Ceklis otomatis via CSS */
.login-notif.success::before {
    content: '\f00c'; /* Kode FontAwesome untuk Check */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 16px;
}

/* --- VARIAN ERROR (MERAH) --- */
.login-notif.error {
    background-color: #f8d7da;
    color: #842029;
    animation: fadeIn 3s ease;

}

/* Menambahkan Icon Tanda Seru otomatis via CSS */
.login-notif.error::before {
    content: '\f06a'; /* Kode FontAwesome untuk Exclamation Circle */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 16px;
}

@keyframes fadeIn {
    from { opacity:0; transform: translateY(-10px);}
    to { opacity:1; transform: translateY(0);}
}
