/* ==========================================================================
   1. DESIGN SYSTEM VARIABLES (DARK OBSIDIAN & TUEBA NEON GLOW)
   ========================================================================== */
:root {
    --bg-night: #050B14;
    --tueba-blue: #0062E3;
    --tueba-navy: #003F9E;
    --tueba-cyan: #00D2FF;
    --tueba-glow: rgba(0, 98, 227, 0.45);
    --card-glass: rgba(10, 20, 38, 0.72);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-focus: #00D2FF;
    --text-main: #FFFFFF;
    --text-muted: #8FA2BF;
    --text-dim: #556B8D;

    /* Physics */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-night);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. INTERACTIVE PARTICLES & AURORA BACKGROUND CANVAS (60fps)
   ========================================================================== */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Deep Aurora Gradient Spheres */
.aurora-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.38;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    animation: orbFloat 20s infinite alternate ease-in-out;
}
.aurora-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #0052CC 0%, rgba(0, 82, 204, 0) 70%);
    top: -150px;
    left: -150px;
}
.aurora-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #00D2FF 0%, rgba(0, 210, 255, 0) 70%);
    bottom: -120px;
    right: -100px;
    animation-duration: 25s;
    animation-delay: -6s;
}
.aurora-3 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, #4F46E5 0%, rgba(79, 70, 229, 0) 70%);
    top: 40%;
    left: 55%;
    animation-duration: 18s;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(40px, 50px, 0) scale(1.1); }
    100% { transform: translate3d(-35px, 20px, 0) scale(0.92); }
}

/* ==========================================================================
   3. MASTER GLASS AUTH CARD (LINEAR & ACETERNITY STYLE)
   ========================================================================== */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 980px;
    border-radius: 28px;
    background: var(--card-glass);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--border-glass);
    box-shadow: 
        0 30px 80px -20px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .auth-container:not(.auth-container-error) {
        animation: cardReveal 0.8s var(--ease-out-expo);
    }
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to { opacity: 1; transform: none; }
}

/* Interactive Mouse Spotlight layer */
.spotlight-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(650px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 210, 255, 0.08), transparent 45%);
    z-index: 1;
    transition: opacity 0.3s;
}

/* ==========================================================================
   4. LEFT SHOWCASE: 3D GLOWING EMBLEM & BRAND IDENTITY
   ========================================================================== */
.showcase-side {
    flex: 0 0 45%;
    max-width: 45%;
    padding: 56px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(175deg, rgba(0, 63, 158, 0.25) 0%, rgba(5, 11, 20, 0.4) 100%);
}

/* 3D Glass Orb around University Emblem */
.logo-orb-wrap {
    position: relative;
    width: 136px;
    height: 136px;
    margin: 12px auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulsing Orbital Rings */
.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(0, 210, 255, 0.35);
    animation: rotateOrbit 30s linear infinite;
}
.orbit-ring-1 {
    width: 168px;
    height: 168px;
}
.orbit-ring-2 {
    width: 200px;
    height: 200px;
    border-style: dotted;
    border-color: rgba(0, 98, 227, 0.3);
    animation-duration: 45s;
    animation-direction: reverse;
}

@keyframes rotateOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-glass-sphere {
    position: relative;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(0, 98, 227, 0.25));
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    box-shadow: 
        0 15px 35px rgba(0, 63, 158, 0.5),
        0 0 50px rgba(0, 210, 255, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatLogo 6s ease-in-out infinite alternate;
}

@keyframes floatLogo {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.logo-img-3d {
    width: 82px;
    height: 82px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* Brand Typography */
.brand-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: var(--tueba-cyan);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 14px;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10B981;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.brand-title-gradient {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    background: linear-gradient(135deg, #FFFFFF 30%, #A5C9FF 70%, var(--tueba-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.brand-sub-univ {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0;
}

/* ==========================================================================
   5. RIGHT AUTH FORM: SLEEK, MODERN & ZERO-CLUTTER
   ========================================================================== */
.auth-side {
    flex: 0 0 55%;
    max-width: 55%;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.auth-header {
    margin-bottom: 28px;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.auth-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Modern Notification Alerts */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 22px;
    animation: slideDownAlert 0.35s var(--ease-out-expo);
}

@keyframes slideDownAlert {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #FCA5A5;
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6EE7B7;
}

/* Clean Modern Input Fields */
.field-group {
    margin-bottom: 20px;
}

.field-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    font-weight: 600;
    color: #CBD5E1;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.field-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 15px;
    color: var(--text-dim);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s var(--ease-smooth);
    z-index: 3;
}

.modern-input {
    width: 100%;
    height: 48px;
    padding: 10px 44px 10px 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: 14px;
    color: #FFFFFF;
    font-family: inherit;
    outline: none;
    transition: all 0.25s var(--ease-smooth);
}

.modern-input::placeholder {
    color: rgba(143, 162, 191, 0.5);
    font-weight: 400;
}

.modern-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--tueba-cyan);
    box-shadow: 0 0 0 3.5px rgba(0, 210, 255, 0.18), 0 0 20px rgba(0, 210, 255, 0.15);
}

.modern-input:focus ~ .field-icon {
    color: var(--tueba-cyan);
}

/* Toggle Password Button */
.btn-toggle-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-dim);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    z-index: 4;
}

.btn-toggle-eye:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

/* Caps Lock Warning Dropdown */
.caps-pill {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #FCD34D;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 6px;
}

.caps-pill.active {
    display: flex;
}

/* Form Options (Remember & Help) */
.form-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 12.5px;
}

.custom-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--text-muted);
}

.custom-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--tueba-blue);
    cursor: pointer;
    border-radius: 4px;
}

.link-forgot {
    color: var(--tueba-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.link-forgot:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* ==========================================================================
   6. ACETERNITY SHIMMER GLOW BUTTON (60fps)
   ========================================================================== */
.btn-shimmer-submit {
    position: relative;
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, #0052CC 0%, #0066FF 50%, #00D2FF 100%);
    background-size: 200% auto;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 
        0 6px 24px -2px rgba(0, 102, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: all 0.3s var(--ease-spring);
    overflow: hidden;
    user-select: none;
}

.btn-shimmer-submit:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px -2px rgba(0, 210, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
}

.btn-shimmer-submit:active {
    transform: translateY(0) scale(0.98);
}

.btn-shimmer-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Subtle Light Sweep */
.btn-shimmer-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
}

.btn-shimmer-submit:hover::before {
    left: 150%;
    transition: left 0.8s ease-in-out;
}

.btn-shimmer-submit .arrow-icon {
    transition: transform 0.2s var(--ease-out-expo);
}

.btn-shimmer-submit:hover .arrow-icon {
    transform: translateX(4px);
}

/* Bottom Nav & Support */
.auth-footer-nav {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.link-portal-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.link-portal-home:hover {
    color: #FFFFFF;
}

.link-portal-home i {
    transition: transform 0.2s;
}

.link-portal-home:hover i {
    transform: translateX(-3px);
}

.security-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
}

.security-flag i {
    color: #10B981;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN (MOBILE & TABLET OPTIMIZED)
   ========================================================================== */
@media (max-width: 991.98px) {
    .auth-container {
        flex-direction: column;
        max-width: 480px;
        border-radius: 22px;
    }

    .showcase-side {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 36px 28px 24px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .logo-orb-wrap {
        width: 100px;
        height: 100px;
        margin-bottom: 16px;
    }

    .logo-glass-sphere {
        width: 94px;
        height: 94px;
    }

    .logo-img-3d {
        width: 60px;
        height: 60px;
    }

    .orbit-ring {
        display: none;
    }

    .brand-title-gradient {
        font-size: 22px;
    }

    .brand-sub-univ {
        margin-bottom: 0;
    }

    .auth-side {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 32px 28px;
    }

    .auth-title {
        font-size: 22px;
    }
}

@media (max-width: 575.98px) {
    body {
        padding: 12px;
    }
    .showcase-side, .auth-side {
        padding: 24px 20px;
    }
}
