/* Additional Modern Login Animations */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Enhanced animations for better user experience */
.login-card {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Enhanced floating shapes */
.shape {
    animation: float 8s ease-in-out infinite;
}

.shape:nth-child(odd) {
    animation-direction: reverse;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
    }
    25% { 
        transform: translateY(-15px) rotate(90deg) scale(1.1); 
    }
    50% { 
        transform: translateY(-30px) rotate(180deg) scale(0.9); 
    }
    75% { 
        transform: translateY(-15px) rotate(270deg) scale(1.1); 
    }
}

/* Enhanced button hover effects */
.user-type-btn {
    position: relative;
    overflow: hidden;
}

.user-type-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.user-type-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Enhanced form focus effects */
.form-control {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

/* Enhanced loading animation */
.spinner {
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Enhanced error message animation */
.error-message {
    animation: slideInDown 0.5s ease-out, shake 0.5s ease-in-out 0.5s;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Enhanced logo animation */
.logo-container img {
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(2deg); }
}

/* Enhanced card hover effects */
.welcome-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Enhanced role card animations */
.role-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.role-card:hover .role-icon {
    animation: bounce 0.6s ease-in-out;
}

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

/* Enhanced feature item animations */
.feature-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(102, 126, 234, 0.25);
}

.feature-item:hover .feature-icon {
    animation: rotate 0.6s ease-in-out;
}

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

/* Responsive enhancements */
@media (max-width: 768px) {
    .login-card {
        animation: slideUpMobile 0.8s ease-out;
    }
    
    @keyframes slideUpMobile {
        from {
            opacity: 0;
            transform: translateY(30px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    .role-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }
    
    .form-control {
        background: rgba(40, 40, 40, 0.9);
        border-color: #444;
        color: #fff;
    }
    
    .form-control:focus {
        background: rgba(50, 50, 50, 0.9);
        border-color: #667eea;
    }
    
    .user-type-btn {
        background: rgba(40, 40, 40, 0.8);
        color: #ccc;
    }
    
    .role-card {
        background: rgba(40, 40, 40, 0.8);
        color: #fff;
    }
    
    .feature-item {
        background: rgba(102, 126, 234, 0.2);
        color: #fff;
    }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for accessibility */
.user-type-btn:focus,
.login-btn:focus,
.form-control:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-card {
        border: 2px solid #000;
    }
    
    .form-control {
        border: 2px solid #000;
    }
    
    .user-type-btn {
        border: 2px solid #000;
    }
}
