/* Login Page Custom Styles */

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Enhanced animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Login form animations */
.login-form {
    animation: fadeInUp 0.8s ease-out;
}

.login-header {
    animation: fadeInDown 0.8s ease-out;
}

.login-card {
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Input focus effects */
.input-group {
    position: relative;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    transform: translateY(-2px);
}

.input-group input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button hover effects */
.btn-login {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: scale(0.98);
}

/* Logo hover effects */
.logo-container {
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.logo-container:hover {
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.2));
}

/* Certification logos */
.cert-logo {
    transition: all 0.3s ease;
    filter: grayscale(20%);
}

.cert-logo:hover {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Background blob animations */
.blob {
    animation: blob 7s infinite;
    filter: blur(40px);
}

.blob:nth-child(2) {
    animation-delay: 2s;
}

.blob:nth-child(3) {
    animation-delay: 4s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
        border-radius: 1rem;
    }

    .logo-container {
        transform: scale(0.8);
    }

    .cert-logo {
        height: 3rem;
    }
}

@media (max-width: 640px) {
    .login-header h1 {
        font-size: 2rem;
    }

    .login-header p {
        font-size: 1rem;
    }
}

/* Loading state for button */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error state animations */
.input-error {
    animation: shake 0.5s ease-in-out;
}

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

/* Success state animations */
.input-success {
    animation: successPulse 0.5s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Floating elements */
.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced focus states */
.focus-ring {
    transition: all 0.2s ease;
}

.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 0 0 1px rgba(59, 130, 246, 0.2);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .glass {
        background: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Print styles */
@media print {
    .login-container {
        background: white !important;
        color: black !important;
    }

    .blob, .glass {
        display: none !important;
    }
}
