/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Body styling */
body {
    min-height: 100vh; /* Changed from height to min-height to allow growth */
    display: flex;
    flex-direction: column;
    background-color: #fff;
    color: #202124;
}

/* Header styling */
header {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
}

.top-right .login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f3f4;
    text-decoration: none;
    color: #5f6368;
    transition: background-color 0.3s;
}

.top-right .login-icon:hover {
    background-color: #e8eaed;
}

/* Main content styling */
main {
    flex-grow: 1; /* Allows main to take available space */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Changed from center to flex-start */
    padding: 20px 20px 0; /* Reduced bottom padding */
}

.logo {
    margin-bottom: 20px; /* Keep this for spacing between logo and form */
}

.logo img {
    width: 100px; /* Match the HTML width attribute */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Ensure it’s centered properly */
    margin: 0 auto; /* Center the image */
}

/* Fallback if the image doesn’t load */
.logo img[alt] {
    font-size: 48px;
    color: #202124;
    text-align: center;
    line-height: 100px; /* Match the image height */
}

/* Style for #helperText if it’s used */
#helperText {
    text-align: center;
    font-size: 16px;
    color: #5f6368;
    margin-top: 10px;
}

/* Ensure the parent container can grow */
.search-container {
    width: 100%; /* Make it full-width within its parent */
    max-width: 100%; /* Prevent it from being constrained */
    display: flex; /* Optional: improves layout control */
    justify-content: center; /* Center the content */
    flex-direction: column; /* Stack input and buttons vertically */
    align-items: center; /* Center children horizontally */
}

.search-container-mid {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Styling for #textbox (kept for reference, but ignored for now) */
#textbox {
    width: 33%;
    background-color: #f8f9fa;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}

.search-bar {
    width: 33vw; /* 66% of viewport width ≈ 2/3 of screen */
    max-width: 33vw; /* Ensure it doesn’t exceed this */
    padding: 10px 15px; /* Internal spacing */
    border: 1px solid #dfe1e5; /* Subtle border */
    border-radius: 24px; /* Rounded corners */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Default subtle shadow */
    box-sizing: border-box; /* Include padding/borders in width */
    font-size: 16px; /* Ensure readable text */
    outline: none; /* Remove default outline */
}

.search-bar::placeholder {
    color: #5f6368; /* Subtle gray for placeholder */
    opacity: 1; /* Ensure visibility */
}

.search-bar:focus {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28); /* Stronger shadow on focus */
    border-color: #dcdcdc; /* Slightly darker border on focus */
}

.buttons {
        margin-top: 20px;
        display: flex;
        gap: 10px;
        justify-content: center;
    }

button {
        padding: 10px 20px;
        border: none;
        border-radius: 4px;
        //background-color: #f8f9fa;
        background-color: #e9ecef;
        color: #3c4043;
        font-size: 14px;
        cursor: pointer;
        transition: background-color 0.3s;
    }

button:hover {
		//background-color: #e8eaed;
        background-color: #dae0e5;
    }

#userPortrait {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Footer styling */
footer {
    padding: 20px;
    background-color: #f2f2f2;
    text-align: center;
}

.footer-links a {
    margin: 0 10px;
    color: #70757a;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 600px) {
    .logo img {
        width: 80px; /* Slightly smaller on mobile */
    }

    .logo img[alt] {
        font-size: 36px;
        line-height: 80px;
    }

    #textbox {
        width: 100%;
        padding: 8px;
    }

    .search-bar {
        width: 90vw; /* Wider on mobile for usability */
        max-width: 90vw; /* Adjust for smaller screens */
        padding: 10px 15px; /* Maintain padding */
        font-size: 14px; /* Slightly smaller text */
    }

    .buttons {
        flex-direction: column;
        width: 100%;
        max-width: 200px;
    }

    button {
        width: 100%;
    }

    .footer-links a {
        display: block;
        margin: 5px 0;
    }
}
