/* ── Page Loader ─────────────────────────────────── */
#pageLoader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 22px;
    transition: opacity 0.5s ease;
}

#pageLoader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loader-logo img {
    height: 72px;
    width: 72px;
    object-fit: contain;
    opacity: 0.9;
}

.loader-title {
    font-size: 15px;
    font-weight: 500;
    color: #7b4397;
    letter-spacing: 0.3px;
    text-align: center;
}

.loader-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e0d4f0;
    border-top-color: #7b4397;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.loader-msg {
    font-size: 13px;
    color: #888;
    letter-spacing: 0.2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Page Loader ─────────────────────────────────── */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: #ffffff;
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e0d4f0;
    box-shadow: 0 1px 8px rgba(123,67,151,0.08);
}

.logo-left img,
.logo-right img {
    height: 100px;
    width: 100px;
    object-fit: contain;
}

.header-content {
    flex: 1;
    text-align: center;
    padding: 0 30px;
}

.header-content h1 {
    color: #7b4397;
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 4px;
}

.hindi-title {
    color: #dc136c;
    font-size: 21px;
    font-weight: 400;
    margin-bottom: 6px;
}

.organizing-institute {
    color: #2e7d32;
    font-size: 15px;
    font-weight: 400;
}

/* Top Navigation */
.top-nav {
    background: #7b4397;
    padding: 14px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.enrollment-info {
    font-size: 15px;
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 400;
    font-size: 15px;
    transition: opacity 0.25s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #ffffff;
}

.login-container {
    background: transparent;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.login-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    padding-left: 220px;
    margin-bottom: 0;
    background-color: #e8e4f3;
    color: #7b4397;
}

.login-icon svg {
    color: #7b4397;
}

.login-icon h2 {
    font-size: 24px;
    font-weight: 400;
}

/* Form Styles */
#loginForm {
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 220px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 400;
    margin-bottom: 6px;
    color: #444;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 400;
    transition: border-color 0.25s, box-shadow 0.25s;
    background-color: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #9c5d9e;
    box-shadow: 0 0 0 3px rgba(123, 67, 151, 0.1);
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Password Field */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #7b4397;
}

/* CAPTCHA Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.captcha-display {
    background: #2c2c2c;
    color: white;
    padding: 12px 20px;
    border-radius: 3px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    min-width: 140px;
    text-align: center;
    user-select: none;
}

.refresh-captcha {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.refresh-captcha:hover {
    background: #f5f5f5;
    border-color: #7b4397;
}

.refresh-captcha svg {
    color: #666;
}

.refresh-captcha:hover svg {
    color: #7b4397;
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 35px;
}

.btn-login {
    background: #7b4397;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    letter-spacing: 0.4px;
}

.btn-login:hover {
    background: #9c5d9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(123, 67, 151, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.forgot-link {
    color: #7b4397;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.25s;
}

.forgot-link:hover {
    color: #9c5d9e;
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #7b4397;
    color: rgba(255,255,255,0.9);
    text-align: center;
    padding: 18px 20px;
    font-size: 13px;
    font-weight: 400;
}

/* Error Messages */
.error-message {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-group.error input {
    border-color: #d32f2f;
}

.form-group.error .error-message {
    display: block;
}

.auth-error-message {
    background-color: #fff0f0;
    color: #a94442;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #d32f2f;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 400;
}

/* Success Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    #loginForm {
        padding: 40px 100px;
    }
    
    .login-icon {
        padding-left: 100px;
    }
}

@media (max-width: 992px) {
    .header {
        padding: 20px 30px;
    }
    
    .header-content h1 {
        font-size: 24px;
    }

    .hindi-title {
        font-size: 20px;
    }

    .organizing-institute {
        font-size: 15px;
    }
    
    .logo-left img,
    .logo-right img {
        height: 80px;
        width: 80px;
    }
    
    .top-nav {
        padding: 15px 30px;
    }
    
    #loginForm {
        padding: 40px 60px;
    }
    
    .login-icon {
        padding-left: 60px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .logo-left img,
    .logo-right img {
        height: 70px;
        width: 70px;
    }

    .header-content h1 {
        font-size: 20px;
    }

    .hindi-title {
        font-size: 18px;
    }

    .organizing-institute {
        font-size: 14px;
    }

    .top-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
        text-align: center;
    }

    .nav-links {
        gap: 20px;
        justify-content: center;
    }

    .login-container {
        padding: 0;
    }

    #loginForm {
        padding: 30px 30px;
    }

    .login-icon {
        padding-left: 30px;
        padding-right: 30px;
        font-size: 22px;
    }
    
    .login-icon h2 {
        font-size: 22px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="password"] {
        padding: 12px 14px;
        font-size: 15px;
    }

    .captcha-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .captcha-display {
        font-size: 18px;
        padding: 10px 18px;
    }

    .form-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .btn-login {
        width: 100%;
        justify-content: center;
    }
    
    .forgot-link {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px;
    }

    .logo-left img,
    .logo-right img {
        height: 60px;
        width: 60px;
    }

    .header-content h1 {
        font-size: 16px;
    }

    .hindi-title {
        font-size: 15px;
    }

    .organizing-institute {
        font-size: 12px;
    }

    .top-nav {
        padding: 12px 15px;
    }
    
    .enrollment-info {
        font-size: 14px;
    }

    .nav-links a {
        font-size: 14px;
    }

    #loginForm {
        padding: 20px 20px;
    }

    .login-icon {
        padding: 15px 20px;
        font-size: 20px;
    }
    
    .login-icon h2 {
        font-size: 20px;
    }
    
    .login-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="password"] {
        padding: 11px 12px;
        font-size: 14px;
    }
    
    .help-text {
        font-size: 11px;
    }
    
    .captcha-display {
        font-size: 16px;
        padding: 8px 15px;
        min-width: 120px;
    }
    
    .refresh-captcha {
        padding: 8px;
    }
    
    .btn-login {
        padding: 11px 24px;
        font-size: 14px;
    }
    
    .forgot-link {
        font-size: 13px;
    }
    
    .footer {
        padding: 15px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .header-content h1 {
        font-size: 14px;
    }

    .hindi-title {
        font-size: 13px;
    }

    .organizing-institute {
        font-size: 11px;
    }
    
    .logo-left img,
    .logo-right img {
        height: 50px;
        width: 50px;
    }
    
    #loginForm {
        padding: 20px 15px;
    }
    
    .login-icon {
        padding: 12px 15px;
    }
}

