/* Advanced Modern Login Form Styling */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f0f2f5;
    --text-color: #2c3e50;
    --border-radius: 12px;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    
    position: relative;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    background-image: 
        linear-gradient(45deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.02) 12.5%, transparent 12.5%, transparent 25%,
        rgba(0,0,0,0.02) 25%, rgba(0,0,0,0.02) 37.5%, transparent 37.5%, transparent 50%,
        rgba(0,0,0,0.02) 50%, rgba(0,0,0,0.02) 62.5%, transparent 62.5%, transparent 75%,
        rgba(0,0,0,0.02) 75%, rgba(0,0,0,0.02) 87.5%, transparent 87.5%, transparent 100%);
    background-size: 40px 40px;
    position: relative;
  
    padding-bottom: 100px; /* Space for footer */
}

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

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 3% 25%, rgba(0,0,0,0.02) 0%, transparent 30%),
        radial-gradient(circle at 97% 85%, rgba(0,0,0,0.02) 0%, transparent 30%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

body::after {
    content: '';
    position: absolute;
  
    background: repeating-linear-gradient(
        transparent 0,
        rgba(255,255,255,0.02) 2px,
        transparent 4px
    );
    transform: rotate(-45deg);
    pointer-events: none;
    z-index: 2;
    opacity: 0.3;
}

.login-wrapper {
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    margin-top: 20px; /* Add space below header */
}

.login-container {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    transform: 
        perspective(2000px)
        rotateX(5deg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.login-container:hover {
    transform: 
        perspective(2000px)
        rotateX(0deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 20px;
    position: relative;
    transform: translateZ(50px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-header h2 {
    position: relative;
    z-index: 2;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding: 0 15px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    transform: rotate(-45deg);
    z-index: 1;
}

.login-form {
    transform: translateZ(30px);
    padding: 30px;
    background: linear-gradient(to bottom right, #ffffff, #f9f9f9);
}

.form-group {
    margin-bottom: 25px;
    transform: translateZ(40px);
    transition: transform 0.3s ease;
}

.form-group:hover {
    transform: translateZ(50px) scale(1.02);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
    transform: translateZ(5px);
}

.input-group-prepend {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    z-index: 10;
}

.input-group {
    position: relative;
}

.input-group .form-control {
    padding-left: 40px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateZ(50px) scale(1.02);
    box-shadow: 0 15px 30px rgba(102,126,234,0.3);
}

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

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

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    margin-right: 10px;
}

#Invalidlabel {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .login-container {
        width: 95%;
        margin: 0 auto;
    }
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.login-container {
    animation: fadeIn 0.6s ease-out;
}

@keyframes float {
    0% {
        transform: translateZ(-10px) rotate(0deg);
    }
    50% {
        transform: translateZ(10px) rotate(2deg);
    }
    100% {
        transform: translateZ(-10px) rotate(0deg);
    }
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: rgba(102,126,234,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

/* Accessibility and Focus States */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
   .footer-area
   {
    margin-top: 78000px;
   }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding-bottom: 60px; /* Smaller footer space on mobile */
    }
    
    .login-wrapper {
        padding: 10px 0;
        margin-top: 10px;
    }
    
    .footer-area {
        padding: 10px 0;
    }
}
