/* ==========================================
   1. GLOBAL STYLES & RESETS
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #040814;
    overflow: hidden;
    color: #fff;
}

/* ==========================================
   2. MAIN WRAPPER (Full Background Image)
   ========================================== */
.login-wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: flex-end; /* Card ko screen ke right side push karne ke liye */
    align-items: center;
    padding-right: 10%; /* Right edge se premium spacing */
    background: linear-gradient(rgba(4, 8, 20, 0.1), rgba(4, 8, 20, 0.4)), 
                url("images/robot_banner.jpg") no-repeat center center;
    background-size: cover;
    position: relative;
    z-index: 1;
}

/* Mobile responsive ke liye centering */
@media (max-width: 900px) {
    .login-wrapper {
        justify-content: center;
        padding-right: 0;
        background: linear-gradient(rgba(4, 8, 20, 0.6), rgba(4, 8, 20, 0.8)), 
                    url("images/robot_banner.jpg") no-repeat center center;
    }
}

/* ==========================================
   3. TRUE GLASSMORPHISM CARD
   ========================================== */
.form-container {
    z-index: 2;
}

.login-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 45px 40px;
    width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    
    /* Smooth Entrance Animation */
    animation: fadeInUp 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

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

.login-card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.login-card .subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 35px;
}

/* ==========================================
   4. INPUT FIELDS WITH ICONS
   ========================================== */
.input-box {
    position: relative;
    margin-bottom: 22px;
    text-align: left;
    display: flex;
    align-items: center;
}

.input-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.input-box input {
    width: 100%;
    padding: 16px 16px 16px 52px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-box input:focus {
    border-color: #00b4d8;
    background: rgba(15, 23, 42, 0.8);
    outline: none;
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
    transform: translateY(-1px); /* Chhota sa lift effect */
}

.login-btn:active {
    transform: scale(0.98); /* Click karne par dabne wala effect */
}

.input-box input:focus ~ i {
    color: #00b4d8; /* Focus hone par icon ka color cyan ho jayega */
}

/* Password Eye Icon Wrapper */
.toggle-password {
    position: absolute;
    right: 18px; /* Yeh padding input ke andar le aayegi */
    cursor: pointer;
    color: #64748b;
    z-index: 10;
    display: flex;
    align-items: center;
}
.toggle-password:hover i {
    color: #fff;
}

/* ==========================================
   5. BUTTON & LINKS
   ========================================== */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #0056b3, #0077b6);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.5);
}

.login-btn:disabled {
    background: #1e293b;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.links {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    font-size: 0.88rem;
    padding: 0 5px; /* Side se halka sa gap */
}

.links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.links a:hover {
    color: #00b4d8;
    text-decoration: underline;
}

/* ==========================================
   6. FLASH MESSAGES (Alert Cards)
   ========================================== */
.flash-messages {
    width: 100%;
    margin-bottom: 20px;
}

.flash {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    animation: fadeIn 0.4s ease;
}

.flash.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid #ef4444;
    color: #f87171;
}

.flash.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid #10b981;
    color: #34d399;
}

/* ==========================================
   7. INTERACTIVE EFFECTS (Cursor Glow)
   ========================================== */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card ke andar wale logo ka size aur spacing */
.card-logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(0, 180, 216, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 18px rgba(0, 180, 216, 0.6));
    }
}

/* ==========================================
   LOGIN PAGE: MENTOR VISUAL LAYOUT
   ========================================== */
.login-page {
    justify-content: flex-end;
    padding: 68px clamp(28px, 8vw, 150px) 44px;
    background-color: #06152a;
    background-image: url("images/login-mentor-hero.png");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: auto 100%;
}

.login-home-link {
    position: absolute;
    top: 28px;
    right: clamp(28px, 5vw, 90px);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #dcecf8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.login-home-link:hover {
    color: #00d4ff;
}

.login-page .form-container {
    width: min(100%, 430px);
}

.login-page-card {
    width: 100%;
    padding: 32px 34px 26px;
    text-align: left;
    background: rgba(5, 24, 47, 0.94);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-top: 4px solid #00d4ff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
}

.login-page-card .card-logo {
    display: block;
    width: 64px;
    margin: 0 auto 15px;
}

.portal-label {
    color: #00d4ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-align: center;
}

.login-page-card h2 {
    margin: 7px 0 6px;
    color: #ffffff;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
}

.login-page-card .subtitle {
    margin-bottom: 26px;
    color: #bdcede;
    text-align: center;
}

.login-page-card .input-box {
    display: block;
    margin-bottom: 17px;
}

.login-page-card .input-box label {
    display: block;
    margin-bottom: 7px;
    color: #e9f5fc;
    font-size: 13px;
    font-weight: 600;
}

.login-page-card .input-box > i {
    top: calc(50% + 13px);
    color: #8ba6bd;
}

.login-page-card .input-box input {
    min-height: 52px;
    padding: 13px 45px 13px 48px;
    border: 1px solid rgba(188, 216, 234, 0.45);
    border-radius: 8px;
    background: #071a2f;
    color: #ffffff;
}

.login-page-card .input-box input::placeholder {
    color: #91a8ba;
}

.login-page-card .input-box input:focus {
    border-color: #00d4ff;
    background: #081f38;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.login-page-card .toggle-password {
    top: calc(50% + 13px);
    right: 16px;
}

.login-page-card .login-btn {
    margin-top: 6px;
    border-radius: 8px;
    background: #00bfe9;
    box-shadow: 0 8px 20px rgba(0, 191, 233, 0.2);
    color: #041529;
}

.login-page-card .login-btn:hover {
    background: #27d8fb;
    box-shadow: 0 10px 24px rgba(0, 212, 255, 0.34);
}

.login-page-card .links {
    margin-top: 20px;
    padding: 0;
}

.login-page-card .links a {
    color: #53dffd;
    font-weight: 600;
}

.secure-access {
    margin-top: 19px;
    padding-top: 16px;
    border-top: 1px solid rgba(160, 199, 224, 0.22);
    color: #b8d2e4;
    font-size: 13px;
    text-align: center;
}

.secure-access i {
    margin-right: 8px;
    color: #00d4ff;
}

.register-page-card {
    max-height: calc(100dvh - 34px);
    overflow-y: auto;
    padding-top: 20px;
    padding-bottom: 18px;
}

.register-page-card .card-logo {
    width: 50px;
    margin-bottom: 8px;
}

.register-page-card h2 {
    margin-top: 5px;
    font-size: 28px;
}

.register-page-card .subtitle {
    margin-bottom: 13px;
    line-height: 1.5;
}

.register-page-card .input-box {
    margin-bottom: 9px;
}

.register-page-card .input-box input {
    min-height: 44px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.register-page-card .login-btn {
    margin-top: 4px;
}

.register-page-card .links {
    margin-top: 12px;
    flex-wrap: wrap;
    row-gap: 3px;
}

.register-page-card .secure-access {
    margin-top: 10px;
    padding-top: 10px;
}

@media (max-width: 900px) {
    .login-page {
        min-height: 100dvh;
        height: auto;
        padding: 86px 20px 28px;
        justify-content: center;
        align-items: flex-start;
        overflow-y: auto;
        background-position: 35% center;
        background-size: cover;
    }

    .login-page::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: rgba(2, 13, 29, 0.62);
    }

    .login-home-link {
        top: 22px;
        right: 20px;
    }

    .login-page .form-container {
        width: min(100%, 430px);
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 78px 15px 22px;
    }

    .login-home-link {
        font-size: 13px;
        top: 20px;
        right: 16px;
    }

    .login-page-card {
        padding: 28px 20px 23px;
    }

    .login-page-card h2 {
        font-size: 30px;
    }

    .register-page-card h2 {
        font-size: 27px;
    }

    .login-page-card .links {
        font-size: 13px;
    }
}
