.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    animation: rotate 20s linear infinite;
    opacity: 0.5;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out;
    width: 100%;
}

.logo-container img {
    max-width: 200px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeIn 1s ease-out 0.3s both;
    width: 100%;
}

.login-header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

.login-form {
    animation: fadeIn 0.8s ease-out 0.4s both;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    animation: slideIn 0.5s ease-out 0.6s both;
    width: 100%;
    position: relative;
}

.form-label {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    text-align: left;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.form-group:focus-within .form-label {
    color: #3498db;
}

.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-floating > .form-control {
    height: 3.5rem;
    padding: 1rem 0.75rem;
    border-radius: 12px;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: all 0.2s ease-in-out;
    color: #7f8c8d;
    font-weight: 500;
    z-index: 2;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 1;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    background-color: white;
    padding: 0 0.5rem;
    color: #3498db;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Add icon to inputs */
.form-floating::before {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.form-floating:nth-child(1)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237f8c8d'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}


.form-floating:focus-within::before {
    opacity: 0.8;
}

/* Add focus ring animation */
.form-control:focus::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 14px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    z-index: -1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* Style for invalid inputs */
.form-control.is-invalid {
    border-color: #e74c3c;
    background-image: none;
    padding-right: 1rem;
    background: linear-gradient(to bottom, #fff5f5, #fff0f0);
}

.form-control.is-invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Add hover effect */
.form-control:hover:not(:focus) {
    border-color: #bdc3c7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn {
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out 0.8s both;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.btn-primary:hover::after {
    transform: translateX(100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.form-check-input {
    margin-right: 0.5rem;
    margin-top: 0;
}

.form-check-input:checked {
    background-color: #3498db;
    border-color: #3498db;
    transform: scale(1.1);
}

.form-check-label {
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.form-check-label:hover {
    color: #3498db;
}

.text-primary {
    color: #3498db !important;
    transition: all 0.2s ease;
    position: relative;
}

.text-primary:hover {
    color: #2980b9 !important;
}

.text-primary::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3498db;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.text-primary:hover::after {
    transform: scaleX(1);
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    font-size: 0.9rem;
    width: 100%;
    margin-top: 1rem;
}

.alert i {
    font-size: 1.1rem;
}

.error-message {
    flex: 1;
}

.form-control {
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    padding: 1rem 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    color: #2c3e50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    outline: none;
}

.form-control::placeholder {
    color: #95a5a6;
    opacity: 0.7;
}

/* Add loading state for the submit button */
.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

ul {
    list-style-type: none;
}

.password-field-container {
    position: relative;
    display: flex;
    align-items: center;
}
.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    cursor: pointer;
    padding: 6px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.password-toggle-btn:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #ced4da;
}
.password-toggle-btn i {
    font-size: 14px;
}
.password-input {
    padding-right: 45px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Add focus styles for better accessibility */
.form-control:focus,
.btn-primary:focus,
.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.25);
}

/* Add responsive adjustments */
@media (max-width: 576px) {
    .login-box {
        padding: 2rem;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .form-floating > .form-control {
        height: 3.25rem;
    }
    
    .form-floating > label {
        padding: 0.75rem 0.75rem;
    }
}