@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --bg-overlay: rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: url('images/login_bg.png') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(5px);
    z-index: -1;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: #fff;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #a29bfe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff !important;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: auto !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 16px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.3s ease;
    font-size: 18px;
    z-index: 10;
}

.password-toggle:hover {
    color: #fff;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 10px 15px -3px rgba(108, 92, 231, 0.3);
}

.btn-login:hover {
    background: #5b4cc4;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(108, 92, 231, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.alert {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.alert-success { background: rgba(46, 204, 113, 0.2); border: 1px solid rgba(46, 204, 113, 0.3); color: #2ecc71; }
.alert-danger { background: rgba(231, 76, 60, 0.2); border: 1px solid rgba(231, 76, 60, 0.3); color: #e74c3c; }

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}
