/* ==========================================================================
   HOLLYWOOD-GRADE 3D AUTOMOTIVE CINEMATIC LOGIN STYLESHEET
   I AutoFin Enterprise Ecosystem – 2026 Director's Edition
   ========================================================================== */

/* Fullscreen 3D Canvas */
#cinematic3DCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    display: block;
    background-color: #030712;
}

/* Base Body Adjustments */
body.cinematic-active {
    background-color: #030712 !important;
    overflow-x: hidden;
}

/* Cinematic Anamorphic Letterbox Bars (Top & Bottom 2.39:1 Cinema Feel) */
.cinema-letterbox {
    position: fixed;
    left: 0;
    right: 0;
    height: 38px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.75) 70%, transparent 100%);
    z-index: 20;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}
.cinema-letterbox-top {
    top: 0;
}
.cinema-letterbox-bottom {
    bottom: 0;
    height: 42px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.75) 70%, transparent 100%);
}

/* Atmospheric Vignette & Film Grain Overlay */
.cinema-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at 40% 50%, transparent 45%, rgba(3, 7, 18, 0.55) 85%, rgba(3, 7, 18, 0.92) 100%);
}

/* Director's Telemetry HUD Controls (Top Left & Top Right) */
.cinema-hud-bar {
    position: fixed;
    top: 14px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 30;
    pointer-events: auto;
}

.cinema-hud-badge {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
}

.cinema-rec-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: recPulse 1.2s infinite ease-in-out;
}
@keyframes recPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.85); }
}

.cinema-hud-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Audio Toggle Button */
.btn-cinema-control {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.btn-cinema-control:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}
.btn-cinema-control.active {
    background: rgba(37, 99, 235, 0.3);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

/* Skip Intro Pill */
.btn-cinema-skip {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #f8fafc;
}
.btn-cinema-skip:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(6, 182, 212, 0.85));
    border-color: #ffffff;
    color: #ffffff;
}

/* Scene 04 Brand Watermark / Sweep Reveal */
.cinema-brand-watermark {
    position: fixed;
    top: 45%;
    left: 48%;
    transform: translate(-50%, -50%) scale(0.92);
    z-index: 25;
    pointer-events: none;
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    background: radial-gradient(circle at center, rgba(3, 7, 18, 0.75) 0%, transparent 75%);
    padding: 30px 50px;
    border-radius: 30px;
}
.cinema-brand-watermark.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.cinema-brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 44px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 35%, #94a3b8 65%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    margin-bottom: 6px;
}
.cinema-brand-subtitle {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 5px;
    color: rgba(56, 189, 248, 0.95);
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

/* Login Hero Layering Over 3D Scene */
.login-hero {
    position: relative;
    z-index: 10 !important;
    background: transparent !important;
    min-height: 100vh;
}

/* Left Hero Content: Cinematic Framing */
.cinematic-left-hero {
    position: relative;
    z-index: 12;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Login Card Container Elevation */
.login-card-wrapper {
    position: relative;
    z-index: 15 !important;
}

.login-card-container {
    background: rgba(11, 20, 38, 0.82) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(56, 189, 248, 0.28) !important;
    box-shadow: 
        0 35px 80px -15px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(37, 99, 235, 0.22),
        inset 0 1px 2px rgba(255, 255, 255, 0.18) !important;
    animation: loginCardSettle 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardSettle {
    0% {
        opacity: 0.85;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Camera Shake Effect Class applied to viewport container during Hero Pass */
.camera-shake-active {
    animation: heroPassShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes heroPassShake {
    10%, 90% { transform: translate3d(-1px, 1px, 0); }
    20%, 80% { transform: translate3d(2px, -1.5px, 0); }
    30%, 50%, 70% { transform: translate3d(-2px, 1.5px, 0); }
    40%, 60% { transform: translate3d(1.5px, -1px, 0); }
}

/* Speed Blur Lines / Optical Streak Effect */
.speed-optical-streak {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100vw;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.8), rgba(255, 255, 255, 0.95), rgba(56, 189, 248, 0.8), transparent);
    filter: blur(1px);
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    transform: translateY(-50%) scaleX(0.2);
    transition: opacity 0.2s ease, transform 0.4s ease;
}
.speed-optical-streak.active {
    opacity: 0.85;
    transform: translateY(-50%) scaleX(1);
}

/* Responsive Adaptations */
@media (max-width: 991.98px) {
    .cinema-hud-bar {
        top: 10px;
        left: 12px;
        right: 12px;
    }
    .cinema-hud-badge {
        font-size: 9.5px;
        padding: 4px 10px;
    }
    .btn-cinema-control {
        font-size: 11px;
        padding: 5px 10px;
    }
    .cinema-brand-watermark {
        display: none;
    }
    .login-card-container {
        background: rgba(11, 20, 38, 0.92) !important;
        backdrop-filter: blur(24px) !important;
        padding: 28px 24px !important;
    }
}

/* Reduced Motion Preference Respect */
@media (prefers-reduced-motion: reduce) {
    #cinematic3DCanvas {
        display: none;
    }
    .camera-shake-active {
        animation: none !important;
    }
    .speed-optical-streak {
        display: none;
    }
}
