/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(120deg, #f2f8ff, #eefcf7);
    display: flex;
    flex-direction: column;
}

/* Canvas */
#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: -1;
}

/* Login Section */
.login-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
    animation: slideFade 0.9s ease;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 25px; /* Reduced for the alert message space */
    color: #0a2540;
}

/* Alert Message */
.alert-message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.alert-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-message.hidden {
    display: none;
}

/* Inputs */
.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(10, 37, 64, 0.15);
    font-size: 0.95rem;
    outline: none;
}

.input-group input:focus {
    border-color: #0a7cff;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 40px; /* Space for the icon */
}

.password-toggle {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #0a7cff;
}

/* Button (Same as Landing Page) */
.btn {
    width: 100%;
    padding: 14px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn.primary {
    background: #0a7cff;
    color: #fff;
}

.btn.primary:hover {
    background: #005fd1;
}

.btn.secondary {
    background: transparent;
    border: 2px solid #0a7cff;
    color: #0a7cff;
}

.btn.secondary:hover {
    background: #0a7cff;
    color: #fff;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

/* Footer */
.site-footer {
    padding: 18px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(10, 37, 64, 0.08);
}

.site-footer p {
    font-size: 0.9rem;
    color: #4a5568;
}

.site-footer .bharat {
    position: relative;
    font-weight: 600;
    color: #0a2540;
    padding-bottom: 4px;
}

.site-footer .bharat::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        #ff9933,
        #ffffff,
        #138808
    );
    background-size: 300% 100%;
    animation: tricolorFlow 3s ease-in-out infinite;
}

.site-footer .heart {
    color: #e63946;
    margin: 0 6px;
    animation: pulseHeart 1.8s infinite;
}

/* Animations */
@keyframes slideFade {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes tricolorFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Mobile */
@media (max-width: 600px) {
    .login-card {
        padding: 30px 24px;
    }

    .cta-buttons {
        flex-direction: column-reverse;
        gap: 12px;
    }
}
