/* Add variables for light and dark themes */
:root {
    --background-color-light: #f2f2f2; /* Light mode background color */
    --background-color-dark: #0d0d0d; /* Darker black for body in dark mode */
    --text-color-light: #000; /* Light mode text color */
    --text-color-dark: #fff; /* Dark mode text color */
    --footer-bg-light: #fff; /* Light mode footer color */
    --footer-bg-dark: #2c2c2c; /* Light black for footer and navbar in dark mode */
    --container-bg-neo: #c4ff63; /* Neo green background for containers */
    --container-surround-light: #e0e0e0; /* Light surround for containers in light mode */
    --container-surround-dark: #0d0d0d; /* Dark black surround for containers in dark mode */
    --input-bg-light: #f1f1f1;
    --input-bg-dark: #444444;
}

/* Light theme */
[data-bs-theme="light"] {
    --background-color: var(--background-color-light);
    --text-color: var(--text-color-light);
    --footer-bg: var(--footer-bg-light); /* Same light background for footer and navbar */
    --navbar-bg: var(--footer-bg-light); /* Same light background for footer and navbar */
    --container-surround: var(--container-surround-light); /* Light gray around containers */
    --input-bg: var(--input-bg-light);
}

/* Dark theme */
[data-bs-theme="dark"] {
    --background-color: var(--background-color-dark); /* Darker black for surrounding areas */
    --text-color: var(--text-color-dark);
    --footer-bg: var(--footer-bg-dark); /* Light black for footer */
    --navbar-bg: var(--footer-bg-dark); /* Light black for navbar (same as footer) */
    --container-surround: var(--container-surround-dark); /* Dark black surround for containers */
    --input-bg: var(--input-bg-dark);
}

/* Apply theme-aware colors */
body {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Header and Footer Styling */
header, footer, nav.navbar {
    background-color: var(--footer-bg); /* Use same background for navbar and footer */
    color: var(--text-color);
}

/* Container 1 and 2 styling - Neo green background in all themes */
.container1 {
    background-color: var(--container-bg-neo); /* Fixed neo green background */
    color: black; /* Force black text color regardless of theme */
    padding: 30px 20px;
    text-align: center;
    width: 100%;
    max-width: 900px;
    border-radius: 5px;
    margin-top: 20px;
    box-shadow: 0px 4px 6px var(--container-surround); /* Light or dark border based on theme */
    position: absolute; /* Position it relative to the viewport */
    top: 50%; /* Move to the middle vertically */
    left: 50%; /* Move to the middle horizontally */
    transform: translate(-50%, -50%); /* Offset by 50% of its own size */
}

    /* Ensure text inside the text-section is always black */
    .container1 .text-section p,
    .container2 .text-section p {
        color: black; /* Force black text for all <p> inside text-section */
    }


/* Additional styling for container1 */
.container1 {
    padding: 50px;
    width: 800px;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}



/* Blue button styling */
.blue-button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
}

    .blue-button:hover {
        background-color: var(--button-bg); /* Maintain hover color */
    }

/* Neo button styling */
.neo-button {
    background-color: var(--container-bg-neo); /* Neo green background */
    color: black; /* Fixed black text */
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
}

    .neo-button:hover {
        background-color: #a0cc52; /* Change hover color */
    }

/* Logo and text sections */
.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.logo img {
    width: 600px;
    height: 200px;
    margin-right: 10px;
}

.text-section h1 {
    font-size: 48px;
    font-weight: bold;
    color: var(--text-color);
}

.text-section p {
    font-size: 48px;
    color: var(--text-color);
    margin-top: 100px;
    font-weight: bold;
}

/* Input fields styling */
.input-field {
    width: 100%;
    padding: 10px;
    margin-top: 50px;
    border-radius: 25px;
    border: 1px solid #ccc;
    background-color: white; /* Set input background to white */
    color: black; /* Ensure text color is black */
    font-size: 16px;
    outline: none;
}

input[type=text], input[type=password] {
    background-color: white; /* Set input background to white */
    color: black; /* Ensure text color is black */
}

    input[type=text]:focus, input[type=password]:focus {
        background-color: white; /* Keep background white on focus */
        color: black; /* Ensure text remains black */
        outline: none;
        border-color: #999; /* Optionally change the border on focus */
    }

input[type=email] {

    background-color: var(--input-bg-color, white);
    color: var(--input-text-color, black);

}

html, body {
    height: 100%; /* Ensures full height for body and html */
    margin: 0; /* Remove default margin */
    display: flex;
    flex-direction: column;
}

.layout-container {
    flex: 1; /* Allows content to take up remaining space */
    display: flex;
    flex-direction: column;
}

.content-container {
    flex: 1; /* Makes sure content takes up available space */
    padding-bottom: 50px;
}

footer.footer {
    flex-shrink: 0;
    background-color: var(--footer-bg); /* Use theme variable for background color */
    padding: 20px;
    text-align: center;
    width: 100%;
    position: relative !important;
    bottom: 0 !important;
}



/* Footer container for social icons */
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer .social-icons {
    display: flex;
    gap: 15px; /* Adds spacing between icons */
}

    .footer .social-icons a {
        color: var(--text-color);
        font-size: 1.5rem;
        text-decoration: none;
    }

        .footer .social-icons a:hover {
            color: var(--text-color);
            opacity: 0.8;
        }


/* Theme Picker Dropdown */
/* Theme Picker Dropdown */
.theme-picker {
    position: absolute; /* Position relative to the footer */
    bottom: 100%; /* Place it just above the footer */
    right: 20px; /* Align to the right */
    z-index: 1050; /* Ensure it stays above other elements */
    margin-bottom: 20px; /* Add spacing above the footer */
}

    /* Styling for the button */
    .theme-picker button {
        background-color: var(--footer-bg); /* Match the button background with the theme */
        border: none;
        border-radius: 50px;
        padding: 10px 15px;
    }

    /* Dropdown Menu Styling */
    .theme-picker ul.dropdown-menu {
        background-color: var(--footer-bg); /* Dropdown background */
    }

        .theme-picker ul.dropdown-menu button {
            color: var(--text-color);
        }

            .theme-picker ul.dropdown-menu button:hover {
                background-color: rgba(0, 0, 0, 0.1); /* Hover effect */
            }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .theme-picker {
        right: 10px; /* Bring closer to the edge */
        margin-bottom: 15px; /* Adjust spacing */
    }
}

@media (max-width: 480px) {
    .theme-picker {
        right: 5px; /* Align closer for small screens */
        margin-bottom: 10px; /* Slightly reduce spacing */
    }
}



/* Main container to center everything vertically */
.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 20px; /* Space between main container and text */
}

/* Shared styling for both login and registration containers */
.register-container, .login-container {
    background-color: var(--container-bg-neo); /* Neo green color */
    color: black;
    padding: 30px 20px;
    text-align: center;
    max-width: 900px; /* Same width as the register container */
    border-radius: 5px;
    box-shadow: 0px 4px 6px var(--container-surround);
    position: relative; /* Keeps it in the normal flow */
}

/* Sign-in and register text styling */
/* Sign-in and register text styling */
.signin-text, .register-text {
    font-size: 16px;
    text-align: center;
    color: var(--text-color); /* Use theme-aware text color */
    padding: 10px;
    background-color: var(--background-color); /* Match background to theme */
    position: relative;
    margin-top: 20px;
}

    .signin-text a, .register-text a {
        color: var(--text-color); /* Link color matches theme text color */
        text-decoration: none;
        font-weight: bold;
    }

        .signin-text a:hover, .register-text a:hover {
            text-decoration: underline; /* Underline the link on hover */
        }



.scrollable-results {
    max-height: 400px; /* Set the height of the scrollable area */
    overflow-y: auto; /* Enable vertical scrolling */
    margin-bottom: 20px; /* Add spacing between results and pagination */
    padding-right: 10px; /* Add some padding to avoid scrollbar overlap */
}

.scrollable-results ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.scrollable-results li {
    margin-bottom: 15px; /* Add spacing between results */
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #007bff;
}

.pagination .active a {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
/* General adjustments for scaling font sizes and widths */
body, html {
    font-size: 16px;
}

/* Tablet view (max-width: 768px) */
@media (max-width: 768px) {
    .container1, .container2 {
        width: 90%; /* Full width for smaller screens */
        padding: 20px;
        height: auto; /* Let height adjust naturally */
        position: static;
        transform: none;
        margin: 20px auto; /* Center with margin */
    }

    .logo img {
        width: 100%;
        height: auto;
    }

    .text-section h1 {
        font-size: 32px;
        margin-top: 20px;
    }

    .text-section p {
        font-size: 18px;
        margin-top: 20px;
    }

    .blue-button, .neo-button {
        font-size: 14px;
        padding: 8px 16px;
    }

    .input-field {
        width: 100%;
        margin-top: 15px;
        font-size: 14px;
    }

    footer.footer {
        padding: 15px;
        font-size: 14px;
    }



    .form-container {
        gap: 10px;
    }

    .register-container, .login-container {
        width: 90%;
        padding: 20px;
    }

    .signin-text, .register-text {
        font-size: 14px;
    }
}

/* Mobile view (max-width: 480px) */
@media (max-width: 480px) {
    .container1, .container2 {
        padding: 15px;
        border-radius: 3px;
    }

    .logo img {
        width: 80%;
        height: auto;
    }

    .text-section h1 {
        font-size: 24px;
    }

    .text-section p {
        font-size: 16px;
    }

    .blue-button, .neo-button {
        font-size: 12px;
        padding: 6px 12px;
    }

    footer.footer {
        font-size: 12px;
        padding: 10px;
    }

    .form-container {
        gap: 5px;
    }

    .register-container, .login-container {
        padding: 15px;
    }

    .signin-text, .register-text {
        font-size: 12px;
    }

}
/* Authenticated Navbar Styling */
.navbar {
    background-color: var(--navbar-bg); /* Use the theme's navbar background color */
    color: var(--text-color); /* Use the theme's text color */
}

    .navbar .navbar-brand,
    .navbar .nav-link {
        color: var(--text-color); /* Theme-aware link and brand text color */
        text-decoration: none;
    }

        .navbar .nav-link:hover,
        .navbar .dropdown-menu a:hover {
            color: rgba(255, 255, 255, 0.8); /* Slightly lighter on hover for dark themes */
        }

    .navbar .dropdown-menu {
        background-color: var(--navbar-bg); /* Theme-aware dropdown menu background */
        border: none; /* Clean dropdown menu look */
    }

    .navbar .dropdown-item {
        color: var(--text-color); /* Theme-aware dropdown item text */
    }

        .navbar .dropdown-item:hover {
            background-color: rgba(255, 255, 255, 0.1); /* Subtle hover effect */
        }

.navbar-toggler-icon {
    filter: invert(1); /* Adjust the toggler icon for dark themes */
}

.navbar .form-control {
    background-color: var(--input-bg); /* Theme-aware input background */
    color: var(--text-color); /* Theme-aware input text color */
    border: 1px solid var(--container-surround); /* Theme-aware border */
}

    .navbar .form-control:focus {
        outline: none;
        border-color: var(--text-color); /* Focused input border color */
    }
