body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, #6a11cb, #2575fc); /* Gradient background */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    /* Added transition for smoother theme changes */
    transition: background-color 0.5s ease;
}
.login-card {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* Soft shadow */
    padding: 2.5rem;
    animation: fadeIn 1s ease-out;
    width: 100%; /* Ensure it takes full width of its column */
    max-width: 500px; /* Limit max width for larger screens */
    /* Added subtle hover effect and transition */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.login-card:hover {
    transform: translateY(-5px); /* Lift card slightly on hover */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-card .card-header {
    background-color: transparent;
    border-bottom: none;
    padding-bottom: 1.5rem;
    position: relative;
}
.login-card .card-header h3 {
    color: #2575fc; /* Primary color for heading */
    font-weight: 700;
    margin-bottom: 0;
    font-size: 2.2rem;
}
.login-card .card-header h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #6a11cb; /* Accent color under heading */
    margin: 10px auto 0;
    border-radius: 2px;
    /* Added animation for the underline */
    animation: expandUnderline 1.5s ease-out forwards;
}
@keyframes expandUnderline {
    from { width: 0; }
    to { width: 60px; }
}
.form-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}
.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}
.form-control:focus {
    border-color: #b27fe9;
    box-shadow: 0 0 0 0.25rem rgba(106, 17, 203, 0.25);
    outline: none;
    /* Added subtle scale effect on focus */
    transform: scale(1.01);
}
.btn-primary {
    background-color: #2575fc;
    border-color: #2575fc;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
    background-color: #1a5bbd;
    border-color: #1a5bbd;
    transform: translateY(-3px); /* Increased lift on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}
.alert {
    border-radius: 8px;
    font-size: 0.95rem;
    /* Added fade in for alerts */
    animation: fadeInAlert 0.5s ease-out;
}
@keyframes fadeInAlert {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.text-center a {
    color: #6a11cb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.text-center a:hover {
    color: #2575fc;
    text-decoration: underline;
}

/* Password Toggle Specific Styles */
.password-input-group {
    position: relative;
}
.password-input-group .form-control {
    padding-right: 3rem; /* Make space for the button */
}
.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #6c757d;
    z-index: 10;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.password-toggle-btn:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.05);
}
.password-toggle-btn:focus {
    outline: none;
    box-shadow: none;
}

/* --- Dark Mode Styles --- */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(to right, #2c085b, #0e2a5f); /* Darker gradient */
        color: #e0e0e0; /* Lighter text for dark background */
    }
    .login-card {
        background-color: #2b2b2b; /* Darker card background */
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4); /* Stronger dark shadow */
    }
    .login-card:hover {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5); /* Enhanced dark shadow on hover */
    }
    .login-card .card-header h3 {
        color: #68baed;
    }
    .login-card .card-header h3::after {
        background-color: #2575fc;
    }
    .form-label {
        color: #c0c0c0;
    }
    .form-control {
        background-color: #3a3a3a;
        border-color: #555;
        color: #e0e0e0;
    }
    .form-control:focus {
        border-color: #2575fc;
        box-shadow: 0 0 0 0.25rem rgba(37, 117, 252, 0.25);
    }
    .btn-primary {
        color: #ffffff;
        background-color: #139cf0;
        border-color: #118dcb;
    }
    .btn-primary:hover {
        background-color: #4a0b8e;
        border-color: #4a0b8e;
    }
    .alert-danger {
        background-color: #6b2e2e;
        border-color: #6b2e2e;
        color: #ffcccc;
    }
    .alert-success {
        background-color: #2e6b2e;
        border-color: #2e6b2e;
        color: #ccffcc;
    }
    .alert-warning {
        background-color: #6b6b2e;
        border-color: #6b6b2e;
        color: #ffffcc;
    }
   
    .text-center a:hover {
        color: #1124cb;
    }
    .password-toggle-btn {
        color: #b0b0b0;
    }
    .password-toggle-btn:hover {
        color: #e0e0e0;
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Password Toggle Specific Styles */
.password-input-group {
    position: relative; /* Penting: agar posisi absolut tombol berfungsi relatif terhadap div ini */
}

.password-input-group .form-control {
    padding-right: 3rem; /* Memberi ruang agar tombol tidak menutupi teks password */
}

.password-toggle-btn {
    position: absolute;
    right: 10px; /* Jarak dari sisi kanan input */
    top: 50%; /* Posisikan vertikal di tengah */
    transform: translateY(-50%); /* Geser ke atas 50% dari tingginya sendiri untuk senter yang sempurna */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #6c757d;
    z-index: 10; /* Pastikan tombol di atas input */
    padding: 0.25rem 0.5rem; /* Menambahkan padding untuk area klik yang lebih mudah */
    border-radius: 5px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.password-toggle-btn:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.05); /* Sedikit background pada hover */
}
.password-toggle-btn:focus {
    outline: none;
    box-shadow: none;
}

/* --- Dark Mode Styles --- */
@media (prefers-color-scheme: dark) {
    /* ... (Gaya dark mode yang sudah ada) ... */

    .password-toggle-btn {
        color: #b0b0b0; /* Warna ikon lebih terang di dark mode */
    }
    .password-toggle-btn:hover {
        color: #e0e0e0;
        background-color: rgba(255, 255, 255, 0.1);
    }
}
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Let body background show */
    z-index: -1; /* Place it behind the content */
    top: 0;
    left: 0;
}
/* Ensure content is above particles */
.container {
    position: relative;
    z-index: 1;
}
/* ... (kode CSS sebelumnya) ... */

.form-check-label {
    color: #555; /* Default color for light mode */
    font-weight: 400; /* Sesuaikan jika perlu */
}

/* --- Dark Mode Styles --- */
@media (prefers-color-scheme: dark) {
    /* ... (gaya dark mode yang sudah ada) ... */

    .form-check-label {
        color: #666666; /* Warna putih atau sangat terang untuk dark mode */
    }
}