body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: slideUp 0.6s ease-out;
}

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

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

.login-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6); }
    100% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
}

.login-icon {
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.form-control-lg {
    border-radius: 1rem;
    border: 2px solid rgba(222, 226, 230, 0.8);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
}

.form-control-lg:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.btn-lg {
    border-radius: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-lg:active {
    transform: translateY(-1px);
}

.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.alert {
    border-radius: 1rem;
    border: none;
    backdrop-filter: blur(10px);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

/* Dark theme styles */
html[data-bs-theme='dark'] body {
    background: linear-gradient(-45deg, #2c3e50, #34495e, #2c3e50, #3f4c6b);
}

html[data-bs-theme='dark'] .login-card {
    background: rgba(30, 35, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8f9fa;
}

html[data-bs-theme='dark'] .form-control-lg {
    background: rgba(40, 45, 65, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8f9fa;
}

html[data-bs-theme='dark'] .form-control-lg:focus {
    background: rgba(40, 45, 65, 1);
    border-color: #667eea;
}

html[data-bs-theme='dark'] .form-label {
    color: #e9ecef;
}

html[data-bs-theme='dark'] .theme-toggle {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive design */
@media (max-width: 576px) {
    .login-container {
        padding: 0.5rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem !important;
        border-radius: 1.5rem;
    }
    
    .login-icon-container {
        width: 60px;
        height: 60px;
    }
    
    .login-icon {
        font-size: 2rem;
    }
    
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}