/* Login Page Styles - Optimized and separated from HTML */

/* Video Background - Professional loading without white flash */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
    pointer-events: none;
    min-width: 100%;
    min-height: 100%;
    /* Smooth fade-in transition */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Show video when loaded */
.video-background.loaded {
    opacity: 1;
}

/* Fallback background image (matches video first frame) */
.video-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/login-poster.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Overlay for better readability */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 247, 250, 0.2);
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .video-overlay {
        background: rgba(245, 247, 250, 0.3);
    }
}

/* Body background - use poster image instead of gradient */
body.login-page {
    /* Use poster image as background - matches video exactly */
    background-image: url('../images/login-poster.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #031017;
    min-height: 100vh;
    padding-bottom: 2rem;
    position: relative;
    transition: background-image 0.5s ease;
}

/* Once video loads, remove background image (video will show) */
body.login-page.video-loaded {
    background-image: none;
    background: transparent;
}

/* Content positioning */
.hero-section,
.login-wrapper {
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    background-color: rgba(128, 72, 185, 0.47);
    backdrop-filter: blur(77px) saturate(180%);
    -webkit-backdrop-filter: blur(77px) saturate(180%);
    color: #212529;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15),
                0 4px 15px rgba(0, 0, 0, 0.1),
                0 0 50px rgba(182, 130, 243, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
    color: #212529;
}

.hero-section .lead {
    font-size: 1.2rem;
    margin-bottom: 0;
    color: #212529;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Login Card */
.login-wrapper {
    max-width: 450px;
    margin: 0 auto;
}

.login-card {
    background-color: rgba(128, 72, 185, 0.47);
    backdrop-filter: blur(77px) saturate(180%);
    -webkit-backdrop-filter: blur(77px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15),
                0 4px 15px rgba(0, 0, 0, 0.1),
                0 0 50px rgba(182, 130, 243, 0.3);
    padding: 2rem;
    margin-bottom: 2rem;
}

.login-title {
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #212529;
    margin-bottom: 1.5rem;
}

.form-control, .input-group .form-control {
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.form-control:focus {
    border-color: var(--primary, #4AB0FF);
    box-shadow: 0 0 0 0.2rem rgba(74, 176, 255, 0.25);
}

.input-group {
    border-radius: 10px;
    overflow: hidden;
}

.input-group .form-control {
    border-right: none;
}

.input-group .form-control:focus {
    border-right: none;
    z-index: 3;
}

.btn-primary {
    background: #2563eb;
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    font-weight: 600;
    padding: 0.75rem;
    transition: all 0.3s ease;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    color: #ffffff;
}

.btn-success {
    background: #28a745;
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
    font-weight: 600;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

#togglePassword {
    background-color: white;
    color: #6c757d;
    padding: 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    border-left: none;
    border-radius: 0 10px 10px 0;
    box-shadow: none;
}

#togglePassword:hover {
    color: var(--primary, #4AB0FF);
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

#togglePassword:focus {
    box-shadow: none;
    border-color: var(--primary, #4AB0FF);
    z-index: 3;
}

#id_password {
    border-right: none;
    border-radius: 10px 0 0 10px;
}

.input-group:focus-within #togglePassword {
    border-color: var(--primary, #4AB0FF);
}

.input-group:focus-within .form-control {
    border-color: var(--primary, #4AB0FF);
}

.fingerprint-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9em;
}

.fingerprint-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fingerprint-loading {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.fingerprint-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.forgot-password-link {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #212529;
    text-decoration: underline;
}

.login-card .text-muted {
    color: #6c757d !important;
}

.login-card .form-label {
    color: #212529;
}

.login-card hr {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
}

