/* General Body and HTML styles for a clean slate */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif; /* Modern and readable font */
    background-color: #f4f7f6; /* Light background for the whole page */
    display: flex;
    flex-direction: column; /* Arrange content vertically */
    align-items: center; /* Center content horizontally */
    min-height: 100vh; /* Full viewport height */
    justify-content: flex-start; /* Start content from the top */
    padding-top: 50px; /* Space from the top of the page */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

/* Styles for the main input and submit button container */
.container {
    display: flex; /* Use flexbox for horizontal alignment of input and button */
    gap: 15px; /* Space between the input and button */
    background-color: #ffffff; /* White background for the input/button bar */
    padding: 20px 30px; /* Internal spacing */
    border-radius: 10px; /* Rounded corners for the container */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
    margin-bottom: 30px; /* Space below this container */
    align-items: center; /* Vertically align items in the middle */
}

/* Styling for the text input field */
#one {
    flex-grow: 1; /* Allows the input to take up available space */
    padding: 12px 18px; /* Internal spacing */
    border: 1px solid #dcdcdc; /* Light gray border */
    border-radius: 8px; /* Slightly rounded corners */
    font-size: 1.1em; /* Readable font size */
    color: #333; /* Dark text color */
    outline: none; /* Remove default focus outline */
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for focus */
    width: 250px; /* Set a base width */
}

#one::placeholder {
    color: #a0a0a0; /* Placeholder text color */
}

#one:focus {
    border-color: #007bff; /* Blue border on focus */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* Subtle blue glow on focus */
}

/* Styling for the submit button */
#two {
    padding: 12px 25px; /* Internal spacing */
    background-color: #007bff; /* Primary blue button color */
    color: white; /* White text color */
    border: none; /* No border */
    border-radius: 8px; /* Rounded corners */
    font-size: 1.1em; /* Readable font size */
    cursor: pointer; /* Indicate it's clickable */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
    font-weight: bold; /* Make text bold */
    letter-spacing: 0.5px; /* Slightly space out letters */
}

#two:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift effect on hover */
}

#two:active {
    background-color: #004085; /* Even darker blue when clicked */
    transform: translateY(0); /* Reset lift effect */
}

/* Styles for the weather information display area */
.info-display {
    background-color: #ffffff; /* White background for the info block */
    border: 1px solid #e0e0e0; /* Light gray border */
    border-radius: 10px; /* Rounded corners */
    padding: 25px; /* Internal spacing */
    margin-top: 20px; /* Space above the info block from the input container */
    text-align: center; /* Align text to the left within the block */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
    width: 320px; /* Fixed width for consistency */
    max-width: 90%; /* Ensure responsiveness on smaller screens */
    color: #333; /* Dark gray text color */
    line-height: 1.6; /* Spacing between lines of text */
    display: none;
   
     /* Initially hidden, show with JavaScript when info is available */
    position: relative; /* Needed for positioning the temperature unit */
    margin-right: auto; /* To shift it slightly right based on your image */
    margin-left: auto; /* Push it to the right within the flex container */
}


/* Styling for the location name (h3 id="three") */
.info-display #three {
    font-size: 1.7em; /* Larger font size for prominence */
    font-weight: bold; /* Bold text */
    margin-top: 0; /* Remove default top margin of h3 */
    margin-bottom: 8px; /* Space below the location name */
    color: #28a745; /* A pleasant green for the location */
    text-transform: capitalize; /* Capitalize each word */
}

/* Styling for the date and time (h6 id="four") */
.info-display #four {
    font-size: 0.95em; /* Slightly smaller font size */
    color: #6c757d; /* Muted gray for less emphasis */
    margin-top: 0; /* Remove default top margin of h6 */
    margin-bottom: 15px; /* Space below the date/time */
    border-bottom: 1px solid #f0f0f0; /* Subtle separator */
    padding-bottom: 10px;
}

/* Styling for the temperature (p id="five") */
.info-display #five {
    font-size: 3em; /* Very large for emphasis */
    font-weight: bold; /* Bold text */
    color: #fd7e14; /* An orange/amber color for temperature */
    margin-top: 15px; /* Space above the temperature */
    margin-bottom: 0; /* Remove default bottom margin of p */
    display: inline-block; /* Allows the temperature unit to float next to it */
    vertical-align: middle; /* Align with the unit */
}

/* Styling for the standalone °C unit */
.temperature-unit {
    position: absolute; /* Position relative to .info-display */
    top: 50%; /* Center vertically */
    right: 25px; /* Distance from the right edge of .info-display */
    transform: translateY(-50%); /* Adjust for vertical centering */
    background-color: #e9ecef; /* Light gray background for the unit box */
    border: 1px solid #ced4da; /* Subtle border */
    border-radius: 8px; /* Rounded corners */
    padding: 8px 12px; /* Internal spacing */
    font-size: 1.5em; /* Clear font size */
    font-weight: bold; /* Bold text */
    color: #495057; /* Darker gray text */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); /* Small shadow */
     /* Initially hidden, show with JS when info is available */
}

/* Basic responsiveness for smaller screens */
@media (max-width: 600px) {
    .container {
        flex-direction: column; /* Stack input and button on small screens */
        width: 90%; /* Max width for container */
        padding: 15px 20px;
    }

    #one {
        width: 100%; /* Full width for input */
        margin-bottom: 10px; /* Space below input when stacked */
    }

    .info-display {
        width: 90%; /* Adjust width for info display on small screens */
        padding: 20px;
        margin-left: 0; /* Remove specific margin for better centering */
        margin-right: 0;
    }

    .temperature-unit {
        right: 15px; /* Adjust unit position for smaller screens */
        font-size: 1.2em;
        padding: 6px 10px;
}
}
