/* Reset Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f0f2f5; /* Warna background modern (mirip Facebook/Google) */
    background-image: linear-gradient(135deg, #f0f2f5 0%, #e0e7ff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loading-logo {
    width: 100px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.loading-title {
    color: #6d1fff;
    font-size: 2rem;
    font-weight: 700;
}

.loading-subtitle {
    color: #666;
    margin-top: 5px;
}

/* Container Login */
.container {
    width: 100%;
    max-width: 420px; /* Lebar maksimal agar tidak terlalu lebar di PC */
    opacity: 0; /* Untuk efek fade-in */
    transition: opacity 0.5s ease;
}

.login-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Bayangan halus */
    text-align: center;
}

.card-header .form-logo {
    width: 80px;
    margin-bottom: 15px;
}

.card-header h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 5px;
}

.card-header p {
    color: #888;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Alert Error */
.alert-error {
    background: #ffecec;
    color: #d63031;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ffcece;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 40px; /* Space untuk icon kiri dan kanan */
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    background: #fdfdfd;
}

.input-wrapper input:focus {
    border-color: #6d1fff;
    background: white;
    box-shadow: 0 0 0 4px rgba(109, 31, 255, 0.1);
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #aaa;
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #6d1fff;
}

/* Captcha Styling */
.captcha-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
}

#captchaCanvas {
    border-radius: 5px;
    background: #fff;
    border: 1px solid #eee;
}

.btn-refresh {
    background: none;
    border: none;
    color: #6d1fff;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: transform 0.3s;
}

.btn-refresh:hover {
    transform: rotate(180deg);
}

#captchaInput {
    width: 120px;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

/* Buttons & Links */
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.forgot-link {
    color: #6d1fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #6d1fff, #9e69ff);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(109, 31, 255, 0.4);
    background: linear-gradient(to right, #5a18d6, #8c5ce6);
}

.btn-login:active {
    transform: translateY(0);
}

/* Animasi */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Mobile Responsiveness (Otomatis karena menggunakan Max-Width) */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .captcha-group {
        flex-direction: column;
    }
    
    #captchaInput {
        width: 100%;
    }
}