/* Modern Login Page - Glassmorphism Design */

/* Layered background: Original image + animated gradient + interactive particles.js */
body.login-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    /* Layer 1: Original background image */
    background-image: url('../images/Main_resize.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
}

/* Layer 2: Semi-transparent animated gradient overlay */
body.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.75) 0%, rgba(118, 75, 162, 0.75) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 1;
    pointer-events: none;
}


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

/* Layer 3: Interactive particles.js network with mouse hover/click effects */






/* Main login container */
.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Modern glassy grey card */
.login-card {
    width: 320px;
    max-height: 560px;
    background: rgba(230, 235, 240, 0.85);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Card subtle glow effect for glassmorphism */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: 20px;
    z-index: -1;
}

/* Logo styling */
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 80px;
    height: auto;
    filter: brightness(1.2);
}

/* Title styling */
.login-title {
    text-align: center;
    color: #666666;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

/* Form group styling */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

/* Modern input styling */
.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    background: #ffffff;
    color: #333333;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-align: center;
    line-height: normal;
    display: flex;
    align-items: center;
}

.form-control::placeholder {
    color: transparent;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

/* Floating label system */
.floating-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666666;
    font-size: 14px;
    pointer-events: none;
    transition: all 0.3s ease;
    transform-origin: center;
}

.form-control:focus + .floating-label,
.form-control:not(:placeholder-shown) + .floating-label {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.8);
}

/* Password toggle button */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #333333;
}

/* Enhanced button styling */
.btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
}

.btn-login:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* Loading state */
.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Remember me checkbox */
.form-check {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.form-check-input {
    margin-right: 10px;
    accent-color: #007bff;
}

.form-check-label {
    color: #666666;
    font-size: 14px;
    cursor: pointer;
}

/* Links styling */
.login-links {
    text-align: center;
    margin-top: 25px;
}

.login-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.login-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Validation messages */
.text-danger {
    color: #ff6b6b !important;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Responsive design */
@media (max-width: 480px) {
    .login-card {
        width: 90%;
        max-width: 300px;
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .floating-label {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 320px) {
    .login-card {
        width: 95%;
        padding: 25px 15px;
    }
}

/* Focus states for accessibility */
.form-control:focus,
.btn-login:focus,
.form-check-input:focus {
    outline: 2px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-card {
        background: rgba(230, 235, 240, 1);
        backdrop-filter: none;
        border: 2px solid #000000;
    }
    
    .form-control {
        background: #ffffff;
        border: 2px solid #000000;
    }
}

/* Performance optimizations for animations */
.login-page::before,
.login-page::after,
.login-container::before {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .login-page::before,
    .login-page::after,
    .login-container::before {
        animation: none !important;
    }
    
    .login-page::after {
        background: linear-gradient(45deg, rgba(102, 126, 234, 0.75) 0%, rgba(118, 75, 162, 0.75) 100%);
        background-size: 100% 100%;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}