/* General Setup */
body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden; /* Hide potential animation overflow */
    background: #1a237e; /* Dark Blue base color */
    color: #fff;
    user-select:none;
}

/* Animated Particles/Blobs Background Effect */
.main-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.1) 1%, transparent 10%),
        radial-gradient(circle at 90% 90%, rgba(255, 255, 255, 0.1) 1%, transparent 10%);
    background-repeat: repeat;
    background-size: 800px 800px;
    /* Keyframe Animation: Shifting Background */
    animation: backgroundShift 25s linear infinite;
}

@keyframes backgroundShift {
    from { background-position: 0 0; }
    to { background-position: 800px 800px; }
}

/* --- Login Form Container Styling --- */
.user-login-form {
    background: rgba(255, 255, 255, 0.05); /* Slightly transparent white for a glass effect */
    backdrop-filter: blur(5px); /* Blur behind the form */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5); /* Strong, deep shadow */
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 350px;
    z-index: 10; /* Ensure form is above the animated background */
    /* Keyframe Animation: Form Entrance */
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    animation: fadeInScale 0.8s ease-out forwards 0.3s; /* Delay start */
}

@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#Loginfor {
    color: #00bcd4; /* Cyan color for high contrast */
    margin-bottom: 25px;
    font-size: 1.6em;
    letter-spacing: 1px;
}

/* --- Input Fields and Labels --- */
label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 400;
    color: #cfd8dc; /* Light gray label text */
}

.form-control {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.2); /* Slightly dark input background */
    color: #fff;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

/* Focus Effect (Input Animation) */
.form-control:focus {
    border-color: #00bcd4; /* Highlight border with cyan */
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.5); /* Strong glow */
    outline: none;
}

/* Placeholder Styling */
::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* --- Button Styling --- */

.submit-btn, .back-btn {
    margin-top: 20px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

/* Submit Button (Primary) */
.btn-primary {
    background-color: #00bcd4; /* Cyan */
    color: #1a237e; /* Dark Blue Text */
}

/* Hover Effect (Animation) */
.btn-primary:hover {
    background-color: #0097a7;
    transform: translateY(-3px); /* Lift */
    box-shadow: 0 10px 20px rgba(0, 188, 212, 0.4);
}

/* Back Button (Danger/Secondary) */
.btn-danger {
    background-color: #ef5350; /* Red */
    color: #fff;
}

/* Hover Effect (Animation) */
.btn-danger:hover {
    background-color: #e53935;
    transform: translateY(-3px); /* Lift */
    box-shadow: 0 10px 20px rgba(239, 83, 80, 0.4);
}

/* --- CAPTCHA Specific Styles (High-Contrast) --- */
.captcha-group {
    margin: 25px 0 15px 0;
}

.captcha-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px;
    background-color: #3f51b5; /* Deeper blue background for CAPTCHA */
    border: 1px solid #00bcd4;
    border-radius: 6px;
}

#captcha-text {
    font-size: 1.6em;
    font-family: 'Monospace', monospace;
    font-weight: bold;
    color: #ffeb3b; /* Yellow/Gold for visibility */
    user-select: none;
    animation: skewRotate 3s infinite alternate; /* CAPTCHA Animation */
}

/* CAPTCHA Text Animation */
@keyframes skewRotate {
    from { transform: skewX(-5deg) rotate(0deg); }
    to { transform: skewX(5deg) rotate(1deg); }
}

#refresh-captcha {
    background: #00bcd4;
    color: #1a237e;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s;
}

#refresh-captcha:hover {
    background-color: #0097a7;
}

.error-message {
    color: #ffeb3b;
    font-size: 0.9em;
    margin-top: 5px;
    text-align: center;
}
/* Add this to the bottom of your existing style.css */

/* Animation for form failure */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}
.shake {
    animation: shake 0.5s ease-in-out;
}