body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: float 6s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 45px;
    animation: slideInUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: transform 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

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

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

.auth-header h2 {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.auth-form .form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.auth-form .input-group {
    margin-bottom: 5px;
}

.auth-form .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.auth-form .form-control {
    border-left: none;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.auth-form .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.auth-form .form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.auth-form .form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.auth-form .input-group:focus-within .input-group-text {
    border-color: #86b7fe;
    background-color: #e7f1ff;
    transition: all 0.3s ease;
}

.auth-form .input-group:focus-within .form-control {
    border-color: #86b7fe;
}

.auth-form .input-group.is-valid .input-group-text {
    border-color: #198754;
}

.auth-form .input-group.is-invalid .input-group-text {
    border-color: #dc3545;
}

.auth-form .btn-primary {
    padding: 12px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-form a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.auth-form a:hover {
    text-decoration: underline;
}

#togglePassword {
    border-left: none;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem;
}

.alert {
    border-radius: 8px;
    font-size: 0.9rem;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-left: 8px;
}

.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-meter {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-meter-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.strength-meter-fill.weak {
    width: 33%;
    background: #dc3545;
}

.strength-meter-fill.medium {
    width: 66%;
    background: #ffc107;
}

.strength-meter-fill.strong {
    width: 100%;
    background: #198754;
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.strength-text.weak {
    color: #dc3545;
}

.strength-text.medium {
    color: #ffc107;
}

.strength-text.strong {
    color: #198754;
}

.invalid-feedback,
.valid-feedback {
    display: block;
    font-size: 0.875rem;
    margin-top: 5px;
}

.invalid-feedback {
    color: #dc3545;
}

.valid-feedback {
    color: #198754;
}

@media (max-width: 576px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-container {
        padding: 15px;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
}
