/* General resets and body styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #333;
}

/* Container for login/signup forms */
.signup-container, .login-container, .captcha-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

/* Headings styling */
h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

/* Form input styling */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* Submit button styling */
button {
    background-color: #007BFF;
    color: white;
    padding: 12px;
    width: 100%;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* Error message styling */
#errorMessage {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 1rem;
}

/* Link to login or sign up page */
p {
    margin-top: 1.5rem;
    font-size: 14px;
}

p a {
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
}

p a:hover {
    text-decoration: underline;
}

/* Button container for side-by-side buttons */
.button-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.button-container button {
    flex: 1;
    padding: 8px;
    font-size: 14px;
}

/* CAPTCHA Modal Styles */
.captcha-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.captcha-modal-content {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 550px; /* Increased max-width */
    width: 98%; /* Slightly increased width */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    margin: 0.7rem;
}

.captcha-modal-content h2 {
    margin-bottom: 0.7rem;
    color: #333;
    font-size: 1.8rem;
}

.captcha-modal-content p {
    margin-bottom: 0.7rem;
    color: #666;
    font-size: 1.2rem;
}

.captcha-modal-content label {
    display: block;
    margin: 0.5rem 0 0.3rem;
    font-size: 1.2rem;
}

.captcha-modal-content input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.captcha-modal-content button {
    background-color: #007BFF;
    color: white;
    padding: 8px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.captcha-modal-content button:hover {
    background-color: #0056b3;
}

.captcha-modal-content #captchaErrorMessage {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.2rem;
    color: #aaa;
    cursor: pointer;
}

.close-btn:hover {
    color: #333;
}

.captcha-images {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.image-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.image-container {
    position: relative;
    flex: 1 1 calc(45% - 5px);
    margin-bottom: 5px;
}

.captcha-image {
    width: 100%;
    height: auto;
    border: 2px solid #ccc;
    border-radius: 4px;
}

.image-number {
    position: absolute;
    top: 4px;
    left: 4px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1px 3px;
    font-size: 0.7rem;
    border-radius: 3px;
}

.captcha-options {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 5px;
}

/* Media Queries for Smaller Screens */
@media (max-width: 600px) {
    .captcha-modal-content {
        padding: 0.5rem;
        font-size: 0.8rem;
        max-width: 90%; /* Ensure it remains responsive */
    }

    .captcha-modal-content h2 {
        font-size: 1rem;
    }

    .captcha-image {
        width: 80px;
        height: 80px;
    }

    .captcha-options {
        flex-direction: column;
        align-items: center;
    }
}

