/* Mengimpor Font Poppins dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* --- LOGIN PAGE --- */
body {
    margin: 0;
    padding: 0;
    /* Menggunakan font modern */
    font-family: 'Poppins', sans-serif;

    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
    background-size: 400% 400%;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.login-container {
    width: 380px;
    padding: 40px;
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    /* Box Shadow lebih lembut */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    /* Menghapus neonGlow, hanya mempertahankan slideIn */
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container h2 {
    margin-bottom: 30px;
    /* Jarak bawah lebih besar */
    color: #ffffff;
    font-size: 32px;
    /* Ukuran font lebih besar */
    font-weight: 700;
    /* Lebih tebal */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Wrapper untuk Icon dan Input */
.input-group {
    position: relative;
    margin: 15px 0;
}

.login-container input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    /* Padding kiri ditambah untuk ikon */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    /* Background sedikit lebih transparan */
    color: white;
    font-size: 16px;
    /* Ukuran font lebih besar */
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.login-container input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.login-container input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    /* Background sedikit lebih terlihat saat fokus */
    border-color: #ffffff;
    /* Border putih solid saat fokus */
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    /* Ring fokus */
}

/* Style untuk Ikon (membutuhkan elemen <i> atau <span> di HTML) */
.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    pointer-events: none;
    /* Penting agar ikon tidak menghalangi klik input */
}

.login-container button {
    width: 100%;
    padding: 14px;
    /* Padding lebih besar */
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    /* Warna tombol hijau yang lebih profesional */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    /* Ukuran font lebih besar */
    margin-top: 25px;
    /* Jarak atas lebih besar */
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.login-container button:hover {
    transform: translateY(-3px);
    /* Efek hover lebih menonjol */
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.7);
}

.error {
    color: #ff6b6b;
    font-size: 14px;
    background: rgba(255, 107, 107, 0.2);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    /* Jarak bawah lebih besar */
    border-left: 4px solid #ff6b6b;
    text-align: left;
}

/* Style untuk pesan "Belum punya akun?" */
.login-container p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    margin-top: 30px;
    /* Jarak atas lebih besar */
}

.login-container a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.login-container a:hover {
    color: #c7d2ff;
    border-bottom-color: #c7d2ff;
}

/* Tambahan: Styling untuk logo/judul */
.app-title {
    color: #ffffff;
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.app-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: 30px;
    font-weight: 300;
}

/* ============================================
   LOADING EFFECT AROUND LOGIN FORM
   ============================================ */

.login-container.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.login-container.loading::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid transparent;
    border-top: 3px solid #667eea;
    border-right: 3px solid #764ba2;
    border-radius: 18px;
    animation: rotateBorder 1.5s linear infinite;
    z-index: -1;
}

@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   THEME TOGGLE BUTTONS
   ============================================ */

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.theme-toggle button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-toggle button.active {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Light Mode Styles */
body.light-mode {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
}

body.light-mode .login-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.5);
}

body.light-mode .login-container h1,
body.light-mode .login-container p,
body.light-mode .login-container .app-title,
body.light-mode .login-container .app-subtitle {
    color: #333;
}

body.light-mode .login-container input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #333;
}

body.light-mode .login-container input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

body.light-mode .login-container input:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

body.light-mode .input-group i {
    color: rgba(0, 0, 0, 0.6);
}

body.light-mode .login-container button {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

body.light-mode .error {
    color: #d32f2f;
    background: rgba(211, 47, 47, 0.1);
    border-left-color: #d32f2f;
}

body.light-mode .login-container p {
    color: rgba(0, 0, 0, 0.7);
}

body.light-mode .login-container a {
    color: #1976d2;
}

body.light-mode .login-container a:hover {
    color: #0d47a1;
    border-bottom-color: #0d47a1;
}

/* ============================================
   RESPONSIVE DESIGN FOR LOGIN PAGE
   ============================================ */

@media (max-width: 768px) {
    .login-container {
        width: 90%;
        max-width: 380px;
        padding: 30px 20px;
    }

    .app-title {
        font-size: 32px;
    }

    .app-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .login-container h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .login-container input {
        font-size: 14px;
        padding: 10px 10px 10px 40px;
    }

    .input-group i {
        left: 12px;
        font-size: 16px;
    }

    .login-container button {
        font-size: 16px;
        padding: 12px;
        margin-top: 20px;
    }

    .error {
        font-size: 13px;
        padding: 8px;
    }

    .login-container p {
        font-size: 14px;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .login-container {
        width: 95%;
        padding: 20px 15px;
    }

    .theme-toggle {
        top: 5px;
        right: 5px;
    }

    .theme-toggle button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .app-title {
        font-size: 28px;
    }

    .app-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .login-container h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .login-container input {
        font-size: 13px;
        padding: 8px 8px 8px 35px;
    }

    .input-group i {
        left: 10px;
        font-size: 14px;
    }

    .login-container button {
        font-size: 14px;
        padding: 10px;
        margin-top: 15px;
    }

    .error {
        font-size: 12px;
        padding: 6px;
    }

    .login-container p {
        font-size: 13px;
        margin-top: 15px;
    }
}