:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #f093fb;
    --background-dark: #1a1a2e;
    --background-light: #16213e;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    overflow-x: hidden;
}

.container-fluid {
    padding: 0;
}

.row {
    margin: 0;
    min-height: 100vh;
}

/* Login Section - Now 1/3 width */
.login-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: relative;
    padding: 1.5rem;
}

.login-container {
    width: 100%;
    max-width: 380px;
    animation: slideInLeft 0.8s ease-out;
}

.brand-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.brand-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.brand-access {
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.form-floating {
    position: relative;
}

.form-control {
    border: 2px solid #e1e5e9;
    border-radius: var(--border-radius);
    padding: 0.9rem 0.75rem 0.4rem 2.2rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 1);
}

.form-floating label {
    padding-left: 2.2rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 10;
    font-size: 0.9rem;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.9rem;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.demo-credentials {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.8rem;
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* Video Section - Now 2/3 width */
.video-section {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.video-bg.loaded {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        rgba(102, 126, 234, 0.7) 0%,
        rgba(118, 75, 162, 0.5) 50%,
        rgba(240, 147, 251, 0.3) 100%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-content {
    text-align: center;
    color: var(--text-light);
    animation: fadeInUp 1s ease-out 0.5s both;
}

.video-logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.video-content h3 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.video-content p {
    font-size: 1.4rem;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.video-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Design */
@media (max-width: 992px) {
    /* Stack vertically on smaller screens */
    .row {
        flex-direction: column;
    }

    .login-section {
        order: 1;
        min-height: 50vh;
        padding: 1.2rem;
    }

    .video-section {
        order: 2;
        min-height: 50vh;
    }

    .video-container {
        height: 50vh;
    }
}

@media (max-width: 768px) {
    .login-section {
        min-height: 60vh;
        padding: 1rem;
    }

    .video-section {
        min-height: 40vh;
    }

    .video-container {
        height: 40vh;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .video-content h3 {
        font-size: 2.5rem;
    }

    .video-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .login-section {
        padding: 0.8rem;
    }

    .login-container {
        max-width: 100%;
    }

    .video-container {
        height: 35vh;
    }

    .video-content h3 {
        font-size: 1.8rem;
    }

    .video-content p {
        font-size: 1rem;
    }
}

/* Performance optimizations */
.video-bg, .video-overlay, .video-content {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

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