/* =======================================================================
   EUROPA – LOGIN-V3.CSS (Premium Theme 3.0)
   1) CSS Variables (Space & Glacial Palette - Dark/Cinematic Only)
   2) Layout & Parallax Background Container
   3) Glassmorphism Card System
   4) Spaceship Airlock & Volumetric Smoke Launch Transition
   5) Premium Form Controls & Captcha
   6) Responsive Adjustments & Keyframes
   ======================================================================= */

/* ===================== 1) VARIABLES ===================== */
body.login-layout {
    --space-bg: #02040a;
    --ocean-deep: #050b18;
    --ice-glow: #8ce0ff;
    --brand-green: #1c8c1c;
    --brand-green-glow: rgba(28, 140, 28, 0.45);
    
    --login-bg: #02040a;
    --card-bg: rgba(6, 12, 24, 0.72);
    --card-border: rgba(140, 224, 255, 0.16);
    --card-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 50px rgba(28, 140, 28, 0.18);
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(140, 224, 255, 0.18);
    --input-text: #f1f5f9;
    --input-placeholder: #64748b;
    --label-color: #94a3b8;
    --link-color: #8ce0ff;
    --link-hover: #ffffff;
    --text-main: #f8fafc;
}

/* Global body overrides for login page (Dark by default) */
body.login-layout {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--login-bg) !important;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

body.login-layout > main {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1 0 auto;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 2.0rem 0 !important;
    box-sizing: border-box;
}

/* Hide theme transition animations that could flash white */
body.login-layout::before {
    display: none !important;
}

/* ===================== 2) PARALLAX BACKDROP ===================== */
.europa-bg-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: #02040a;
    transition: transform 3.0s cubic-bezier(0.76, 0, 0.24, 1), opacity 3.0s ease;
}

/* Deep Space Wrapper that handles mouse parallax */
.europa-bg-space-wrapper {
    position: absolute;
    inset: -50px;
    z-index: 1;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Base Stars Layer */
.stars-base {
    position: absolute;
    inset: 0;
    background-image: url("/img/stars_nebula.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.68;
    animation: stars-twinkle 15s infinite ease-in-out alternate;
}

/* Aurora Borealis Left Layer (Screen Blended highlights) */
.aurora-layer-left {
    position: absolute;
    inset: 0;
    background-image: url("/img/stars_nebula.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    mix-blend-mode: screen;
    mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 75%);
    -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 75%);
    animation: aurora-pulse-left 13s infinite ease-in-out alternate;
    pointer-events: none;
}

/* Aurora Borealis Right Layer (Screen Blended highlights) */
.aurora-layer-right {
    position: absolute;
    inset: 0;
    background-image: url("/img/stars_nebula.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    mix-blend-mode: screen;
    mask-image: linear-gradient(315deg, rgba(0,0,0,0) 25%, rgba(0,0,0,1) 65%, rgba(0,0,0,1) 100%);
    -webkit-mask-image: linear-gradient(315deg, rgba(0,0,0,0) 25%, rgba(0,0,0,1) 65%, rgba(0,0,0,1) 100%);
    animation: aurora-pulse-right 18s infinite ease-in-out alternate;
    pointer-events: none;
}

/* Jupiter Gas Giant Backdrop - Edges faded smoothly to blend with space background */
.europa-bg-jupiter {
    position: absolute;
    width: 650px;
    height: 650px;
    left: -100px;
    top: -120px;
    background-image: url("/img/jupiter_planet.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1.0;
    z-index: 2;
    /* Radial mask that fades the square edges of the image to 100% transparency */
    mask-image: radial-gradient(circle, rgba(0,0,0,1) 78%, rgba(0,0,0,0) 85%);
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 78%, rgba(0,0,0,0) 85%);
}

/* Glacial Crust Floor Layer - Landscape ground view, shifted mask for maximum visibility */
.europa-bg-ice-crust {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 40vh; /* Generous height to showcase the ground landscape */
    background-image: url("/img/europa_ice_crust.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 3;
    /* Mask allows 65% of the ground to be fully visible, then fades the horizon line into space */
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 65%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 65%, rgba(0,0,0,0) 100%);
    
    /* Smooth breathing animation simulating pulsing geothermal energy currents */
    animation: crust-energy-pulse 8s infinite ease-in-out;
}

/* Green atmosphere horizon glow/haze above the ice crust to blend the edge */
.europa-bg-ice-crust::after {
    content: "";
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 90px;
    background: linear-gradient(to bottom, rgba(28, 140, 28, 0.3) 0%, rgba(28, 140, 28, 0) 100%);
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Particles Canvas */
.europa-bg-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* Cinematic Vignette Overlay - darkens the edges of the screen and blends all background images */
.europa-bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(2, 4, 10, 0.05) 0%, rgba(2, 4, 10, 0.85) 90%);
    z-index: 4;
    pointer-events: none;
}

/* ===================== 3) GLASSMORPHISM CARD ===================== */
.login-screen.container {
    margin: auto !important;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    position: relative;
    z-index: 10;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s ease;
}

/* Smoothly shift the login card down to make room for the descending error trapezoid */
body.auth-error-visible .login-screen.container {
    transform: translateY(120px) !important;
}

/* Slower slide up & fade out transition only when active launch covers the screen */
body.launching-active .login-screen.container {
    transform: translateY(-100vh) !important;
    opacity: 0;
    transition: transform 2.5s cubic-bezier(0.76, 0, 0.24, 1), opacity 2.2s ease !important;
}

.login-card {
    border-radius: 28px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow: var(--card-shadow) !important;
    transition: transform 0.4s cubic-bezier(0.15, 0.85, 0.2, 1), box-shadow 0.3s ease;
    animation: slide-up-card 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.login-card:hover {
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.95), 
        0 0 60px rgba(28, 140, 28, 0.28);
}

/* Inner branding wrapper */
.brand-wrap {
    margin-bottom: 1.5rem !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-wrap img {
    height: 150px !important;
    width: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.12)) drop-shadow(0 4px 12px rgba(28, 140, 28, 0.35));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-card:hover .brand-wrap img {
    transform: scale(1.04) translateY(-2px);
}

/* Futuristic Glowing Title */
.login-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.65rem !important;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #ffffff !important;
    margin-bottom: 1.75rem !important;
    text-align: center;
    /* Neon glow effect */
    text-shadow: 
        0 0 8px rgba(28, 140, 28, 0.65),
        0 0 15px rgba(28, 140, 28, 0.45),
        0 0 30px rgba(140, 224, 255, 0.35);
    animation: title-glow 3s infinite ease-in-out alternate;
}

/* Metallic Trapezoid Drop-down Panel */
.metal-trap-panel {
    position: fixed;
    top: -160px; /* Hidden offscreen */
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 145px;
    z-index: 10000;
    clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 110px 10px 110px; /* Inward padding to fit within trapezoid angles */
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: top 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

/* Error panel style */
.metal-trap-panel.error-panel {
    background: 
        repeating-linear-gradient(rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.4) 2px, rgba(0, 0, 0, 0.4) 4px),
        linear-gradient(to bottom, rgba(239, 68, 68, 0.45) 0px, rgba(239, 68, 68, 0.45) 4px, transparent 4px), /* Top red lip */
        linear-gradient(to top, rgba(239, 68, 68, 0.7) 0px, rgba(239, 68, 68, 0.7) 4px, transparent 4px), /* Bottom glowing red line */
        linear-gradient(180deg, #231111 0%, #0c0505 100%);
    color: #fca5a5;
    animation: alert-crt-flicker 0.25s infinite alternate;
}

/* Status panel style */
.metal-trap-panel.status-panel {
    background: 
        repeating-linear-gradient(rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.4) 2px, rgba(0, 0, 0, 0.4) 4px),
        linear-gradient(to bottom, rgba(140, 224, 255, 0.4) 0px, rgba(140, 224, 255, 0.4) 4px, transparent 4px), /* Top celestial blue lip */
        linear-gradient(to top, rgba(140, 224, 255, 0.6) 0px, rgba(140, 224, 255, 0.6) 4px, transparent 4px), /* Bottom celestial blue line */
        linear-gradient(180deg, #101622 0%, #070a0e 100%);
    color: #8ce0ff;
}

.metal-trap-panel.show {
    top: 0px !important;
}

.metal-trap-panel .trap-content {
    width: 100%;
    text-align: left;
}

.metal-trap-panel .trap-header {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    opacity: 0.9;
}
.metal-trap-panel.error-panel .trap-header {
    color: #ef4444;
    text-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}
.metal-trap-panel.status-panel .trap-header {
    color: #8ce0ff;
    text-shadow: 0 0 6px rgba(140, 224, 255, 0.8);
}

.metal-trap-panel .trap-body {
    font-size: 0.77rem;
    line-height: 1.45;
    opacity: 0.95;
}

.metal-trap-panel .term-sym {
    font-weight: bold;
}
.metal-trap-panel.error-panel .term-sym {
    color: #ef4444;
    text-shadow: 0 0 5px #ef4444;
}
.metal-trap-panel.status-panel .term-sym {
    color: #8ce0ff;
    text-shadow: 0 0 5px #8ce0ff;
}

.metal-trap-panel .trap-body::after {
    content: " █";
    animation: alert-cursor-blink 1s step-start infinite;
}
.metal-trap-panel.error-panel .trap-body::after {
    color: #ef4444;
    text-shadow: 0 0 5px #ef4444;
}
.metal-trap-panel.status-panel .trap-body::after {
    color: #8ce0ff;
    text-shadow: 0 0 5px #8ce0ff;
}

@keyframes alert-crt-flicker {
    0% { opacity: 0.985; filter: brightness(0.98); }
    50% { opacity: 1.0; filter: brightness(1.0); }
    100% { opacity: 0.99; filter: brightness(0.99); }
}

@keyframes alert-cursor-blink {
    50% { opacity: 0; }
}

/* Theme switch button styling (Top corner float) */
#themeToggle {
    top: 1.25rem !important;
    right: 1.25rem !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(8px);
}

#themeToggle:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) rotate(18deg);
}

/* ===================== 4) SPACESHIP LAUNCH OVERLAY ===================== */
.launch-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;
    z-index: 99999;
    pointer-events: none;
    overflow: hidden;
}

/* Sliding doors left and right (Futuristic brushed metal styling) */
.launch-door-left,
.launch-door-right {
    position: fixed;
    top: 0;
    width: 50vw;
    height: 100vh;
    height: 100lvh;
    /* Metal gradient + fine carbon fiber stripes */
    background: 
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 2px, transparent 2px, transparent 10px),
        linear-gradient(90deg, #101622 0%, #070a0e 45%, #182234 95%, #05070a 100%);
    box-shadow: 
        inset -8px 0 25px rgba(0, 0, 0, 0.95), 
        inset 8px 0 25px rgba(0, 0, 0, 0.95),
        0 0 45px rgba(0, 0, 0, 0.8);
    transition: transform 2.5s cubic-bezier(0.76, 0, 0.24, 1); /* Slower (2.5s) heavy sliding door */
    z-index: 2; /* CRITICAL: Must be above the smoke (z-index: 1) so it stays fully opaque and dark */
    opacity: 1 !important; /* Forces door to never fade or wash out */
}

.launch-door-left {
    left: 0;
    transform: translateX(-100%);
    border-right: 4px solid rgba(28, 140, 28, 0.45);
}

.launch-door-right {
    right: 0;
    transform: translateX(100%);
    border-left: 4px solid rgba(28, 140, 28, 0.45);
}

/* Horizontal panel grooves on the steel doors */
.door-panel-lines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, transparent 0px, transparent 120px, rgba(0, 0, 0, 0.45) 120px, rgba(0, 0, 0, 0.45) 122px, rgba(255, 255, 255, 0.03) 122px, rgba(255, 255, 255, 0.03) 124px);
    opacity: 0.95;
}

/* Mechanical details on left door (Airlock console) */
.door-console {
    position: absolute;
    right: 35px;
    top: 45%;
    width: 140px;
    height: 100px;
    background: #090e16;
    border: 2px solid #233044;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.8), inset 0 0 10px rgba(0,0,0,0.9);
    padding: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-content: flex-start;
    opacity: 0.9;
}

/* Console LEDs */
.console-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}
.led-red {
    color: #ef4444;
    background: #ef4444;
    animation: blink-fast 0.6s infinite alternate;
}
.led-green {
    color: #22c55e;
    background: #22c55e;
    animation: blink-slow 1.6s infinite alternate;
}
.led-blue {
    color: #3b82f6;
    background: #3b82f6;
    animation: blink-slow 1.1s infinite alternate;
}

/* Laser sweep scan line */
.console-scanner {
    width: 100%;
    height: 2px;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    position: absolute;
    left: 0;
    animation: scan-sweep 2.0s infinite ease-in-out;
}

/* Mechanical details on right door (Magnetic Lock Latch) */
.door-lock-mechanism {
    position: absolute;
    left: 35px;
    top: 45%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #0d131f;
    border: 3px solid #25334a;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lock Latch indicator - Starts with neutral CELESTIAL BLUE (#8ce0ff) during closing */
.lock-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #8ce0ff; /* Celestial Blue neutral */
    box-shadow: 0 0 15px #8ce0ff;
    transition: background 0.5s ease 2.0s, box-shadow 0.5s ease 2.0s; /* Turns green at 2.0s on successful launch */
    animation: pulse-lock-celestial 1.5s infinite ease-in-out;
}

/* Glowing mechanical details on spaceship doors when closed */
.launch-door-left::after,
.launch-door-right::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--brand-green);
    box-shadow: 0 0 15px var(--brand-green);
    opacity: 0;
    transition: opacity 0.5s ease 2.0s;
}

.launch-door-left::after { right: 0; }
.launch-door-right::after { left: 0; }

/* Volumetric smoke screen container - rendering BEHIND the doors (z-index: 1) */
.launch-smoke {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;
    opacity: 0;
    transition: opacity 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1; /* Render behind the doors so the doors stay clean, dark and clear */
    pointer-events: none;
    overflow: hidden;
}

/* Multi-layered animated clouds representing volumetric mist */
.smoke-cloud {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.96;
    transform-origin: center;
}

.cloud-1 {
    background: radial-gradient(circle, rgba(255,255,255,0.98) 0%, rgba(200,240,200,0) 70%);
    width: 120vw;
    height: 120vh;
    left: -20%;
    top: -20%;
    animation: smoke-drift-1 12s infinite ease-in-out alternate;
}

.cloud-2 {
    background: radial-gradient(circle, rgba(240,250,255,0.95) 0%, rgba(180,210,240,0) 70%);
    width: 140vw;
    height: 140vh;
    right: -25%;
    bottom: -25%;
    animation: smoke-drift-2 15s infinite ease-in-out alternate;
}

.cloud-3 {
    background: radial-gradient(circle, rgba(255,255,255,0.96) 0%, rgba(220,240,220,0) 75%);
    width: 110vw;
    height: 110vh;
    left: 15%;
    bottom: 10%;
}

.cloud-4 {
    background: radial-gradient(circle, rgba(235,255,240,0.92) 0%, rgba(190,220,200,0) 70%);
    width: 100vw;
    height: 100vh;
    right: 10%;
    top: 10%;
}

/* Active Launch State triggered via body class (Turns green) */
body.launching-active .launch-door-left {
    transform: translateX(0);
}

body.launching-active .launch-door-right {
    transform: translateX(0);
}

body.launching-active .launch-door-left::after,
body.launching-active .launch-door-right::after {
    opacity: 1;
}

body.launching-active .launch-smoke {
    opacity: 1;
}

body.launching-active .lock-indicator {
    background: #8ce0ff !important; /* Keep celestial blue neutral during closing */
    box-shadow: 0 0 15px #8ce0ff !important;
    animation: pulse-lock-celestial 1.5s infinite ease-in-out !important;
}

/* Slide login page content UP and fade out */
body.launching-active .login-screen.container {
    transform: translateY(-100vh);
    opacity: 0;
}

body.launching-active .europa-bg-container {
    transform: translateY(-20vh);
    opacity: 0.3;
}

/* ===================== AUTHENTICATION FAIL CODES ===================== */
/* Forces doors to start closed and indicator to be RED */
body.auth-failed-active .launch-door-left {
    transform: translateX(0) !important;
    transition: none !important;
}

body.auth-failed-active .launch-door-right {
    transform: translateX(0) !important;
    transition: none !important;
}

body.auth-failed-active .lock-indicator {
    background: #8ce0ff !important; /* Starts celestial blue on failed reload */
    box-shadow: 0 0 15px #8ce0ff !important;
    animation: pulse-lock-celestial 1.5s infinite ease-in-out !important;
    transition: background 0.2s ease, box-shadow 0.2s ease !important;
}

body.auth-failed-red .lock-indicator {
    background: #ef4444 !important; /* RED for failure */
    box-shadow: 0 0 20px #ef4444 !important;
    animation: pulse-lock 1.0s infinite ease-in-out !important;
}

body.auth-failed-active .launch-smoke {
    opacity: 0.96 !important;
    transition: none !important;
}

/* Triggers doors opening after fail closed (2.5s duration) */
body.auth-failed-open .launch-door-left {
    transform: translateX(-100%) !important;
    transition: transform 2.5s cubic-bezier(0.76, 0, 0.24, 1) !important;
}

body.auth-failed-open .launch-door-right {
    transform: translateX(100%) !important;
    transition: transform 2.5s cubic-bezier(0.76, 0, 0.24, 1) !important;
}

body.auth-failed-open .launch-smoke {
    opacity: 0 !important;
    filter: blur(40px) !important;
    transition: opacity 2.5s ease, filter 2.5s ease !important;
}

/* ===================== 5) FORM CONTROLS ===================== */
.login-card label.form-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--label-color) !important;
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.login-card .form-control {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--input-text) !important;
    border-radius: 14px !important;
    padding: 0.8rem 1.1rem !important;
    font-size: 0.95rem !important;
    transition: all 0.25s ease;
}

.login-card .form-control::placeholder {
    color: var(--input-placeholder) !important;
    opacity: 0.6;
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--brand-green) !important;
    box-shadow: 0 0 0 4px var(--brand-green-glow) !important;
}

/* Verification/Captcha Styling */
.captcha-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 10px;
}

.captcha-img {
    height: 44px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background-color: #ffffff;
}

.btn-refresh-captcha {
    border-radius: 10px !important;
    height: 44px;
    width: 44px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-refresh-captcha:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    transform: rotate(90deg);
}

/* Premium Glow Action Button */
#btnEnter {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    padding: 0.9rem !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, var(--brand-green) 0%, #259425 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px var(--brand-green-glow) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#btnEnter:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(28, 140, 28, 0.7) !important;
    filter: brightness(1.06);
}

#btnEnter:active {
    transform: translateY(0);
}

/* ===================== VALIDATION STYLING ===================== */
.was-validated .form-control:invalid {
    border-color: rgba(220, 53, 69, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15) !important;
}

.was-validated .form-control:valid {
    border-color: rgba(28, 140, 28, 0.45) !important;
}

.invalid-feedback {
    color: #fca5a5 !important;
    font-size: 0.775rem !important;
    margin-top: 0.4rem;
}

/* Spinner adjustments */
.spinner-border {
    width: 1.15rem;
    height: 1.15rem;
}

/* ===================== 6) KEYFRAMES & TRANSITIONS ===================== */
@keyframes stars-twinkle {
    0% {
        opacity: 0.55;
        transform: scale(1.0);
    }
    100% {
        opacity: 0.75;
        transform: scale(1.02);
    }
}

@keyframes aurora-pulse-left {
    0%, 100% {
        opacity: 0.02;
        transform: scale(1.02) translate(-5px, -5px) rotate(0deg);
        filter: blur(22px) hue-rotate(-8deg) brightness(0.9);
    }
    50% {
        opacity: 0.58;
        transform: scale(1.05) translate(8px, 5px) rotate(0.5deg);
        filter: blur(25px) hue-rotate(12deg) brightness(1.25);
    }
}

@keyframes aurora-pulse-right {
    0%, 100% {
        opacity: 0.55;
        transform: scale(1.06) translate(5px, 8px) rotate(0.4deg);
        filter: blur(26px) hue-rotate(15deg) brightness(1.2);
    }
    50% {
        opacity: 0.02;
        transform: scale(1.03) translate(-8px, -5px) rotate(-0.4deg);
        filter: blur(23px) hue-rotate(-12deg) brightness(0.85);
    }
}

@keyframes title-glow {
    0% {
        text-shadow: 
            0 0 8px rgba(28, 140, 28, 0.6),
            0 0 15px rgba(28, 140, 28, 0.3);
    }
    100% {
        text-shadow: 
            0 0 16px rgba(28, 140, 28, 0.95),
            0 0 25px rgba(140, 224, 255, 0.75),
            0 0 40px rgba(28, 140, 28, 0.5);
    }
}

@keyframes crust-energy-pulse {
    0% {
        filter: brightness(0.8) saturate(95%);
    }
    50% {
        filter: brightness(1.15) saturate(120%);
    }
    100% {
        filter: brightness(0.8) saturate(95%);
    }
}

@keyframes slide-up-card {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Blinking Console LEDs */
@keyframes blink-fast {
    0% { opacity: 0.25; }
    100% { opacity: 1.0; }
}
@keyframes blink-slow {
    0% { opacity: 0.15; }
    100% { opacity: 1.0; }
}

/* Laser sweep animation */
@keyframes scan-sweep {
    0% { top: 0%; opacity: 0.3; }
    50% { top: 98%; opacity: 1.0; }
    100% { top: 0%; opacity: 0.3; }
}

/* Latch lock pulse animation */
@keyframes pulse-lock {
    0% { box-shadow: 0 0 8px #ef4444; }
    50% { box-shadow: 0 0 22px #ef4444; }
    100% { box-shadow: 0 0 8px #ef4444; }
}

/* Latch lock celestial pulse animation */
@keyframes pulse-lock-celestial {
    0% { box-shadow: 0 0 8px #8ce0ff; }
    50% { box-shadow: 0 0 22px #8ce0ff; }
    100% { box-shadow: 0 0 8px #8ce0ff; }
}

/* Volumetric smoke drift animations */
@keyframes smoke-drift-1 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(6vw, 4vh) scale(1.1) rotate(60deg); }
}

@keyframes smoke-drift-2 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(-6vw, -4vh) scale(1.05) rotate(-60deg); }
}

/* Responsive fixes */
@media (max-width: 576px) {
    .europa-bg-jupiter {
        width: 380px;
        height: 380px;
        left: -100px;
        top: -80px;
    }
    .europa-bg-ice-crust {
        height: 32vh;
    }
    .brand-wrap img {
        height: 120px !important;
    }
    .login-card {
        border-radius: 24px !important;
        margin: 0 10px;
        padding: 1.5rem !important;
    }
    .login-title {
        font-size: 1.35rem !important;
        letter-spacing: 0.12em;
    }
    /* Responsive adjustment for Trapezoid */
    .metal-trap-panel {
        width: 100%;
        height: 155px;
        top: -170px;
        padding: 20px 45px 10px 45px;
        clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
    }
    .metal-trap-panel .trap-body {
        font-size: 0.7rem;
    }
    .metal-trap-panel .trap-header {
        font-size: 0.6rem;
    }
    .door-console {
        right: 15px;
        width: 100px;
        height: 80px;
        padding: 8px;
    }
    .door-lock-mechanism {
        left: 15px;
        width: 80px;
        height: 80px;
    }
    .lock-indicator {
        width: 30px;
        height: 30px;
    }
}

/* Disable backdrop-filter on mobile/tablet screens to prevent Android Chrome compositor bugs */
@media (max-width: 768px) {
    .login-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(6, 12, 24, 0.93) !important;
    }
    #themeToggle {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .login-title {
        animation: none !important;
        text-shadow: 
            0 0 10px rgba(28, 140, 28, 0.8),
            0 0 20px rgba(28, 140, 28, 0.5) !important;
    }
}
