/* style.css */
body {
    font-family: 'Poppins', sans-serif;
    background: #1c1f3f;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0; /* Remove default margin */
}

.weather-app {
    background-color: #1e2140; /* Slightly darker background */
    width: 90%; /* Occupy more width */
    max-width: 800px;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.title {
    font-size: 1.5em;
    font-weight: bold;
}

.date {
    font-size: 0.9em;
    color: #aaa;
}

.location-search {
    display: flex;
    margin-bottom: 20px;
}

#cityInput {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    background-color: #343759; /* Darker input background */
    color: white;
    padding-left: 20px; /* Add padding for placeholder */
}

button {
    padding: 10px 15px;
    background-color: #3c4062; /* Darker button background */
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #4b4f72;
}

.weather-container {
    display: flex;
    gap: 20px;
}

.current-weather {
    flex: 1;
    background-color: #282b4f; /* Darker current weather background */
    padding: 20px;
    border-radius: 10px;
}

.location {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.date-today {
    color: #aaa;
    margin-bottom: 10px;
}

.temperature {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.description {
    font-style: italic;
    color: #ddd;
    margin-bottom: 20px;
}

.air-conditions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.condition {
    display: flex;
    flex-direction: column;
}

.label {
    color: #aaa;
    font-size: 0.8em;
}

.value {
    font-size: 1em;
}

.forecast {
    flex: 1;
    background-color: #282b4f; /* Darker forecast background */
    padding: 20px;
    border-radius: 10px;
}

.forecast-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
}

.forecast-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forecast-day {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    background-color: #343759; /* Slightly darker day background */
}

.forecast-day .day {
    flex: 1;
    font-weight: bold;
}

.forecast-day .temp {
    margin-left: 10px;
}

.hourly-forecast {
    background-color: #282b4f; /* Darker forecast background */
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.hourly-slots {
    display: flex;
    gap: 10px;
    overflow-x: auto; /* Enable horizontal scrolling if needed */
}

.hourly-slot {
    background-color: #343759;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.hourly-slot .time {
    font-size: 0.8em;
    color: #aaa;
}

.hourly-slot .temp {
    font-size: 1em;
    font-weight: bold;
}

.theme-toggle {
    position: absolute;
    top: 10px;
    right: 20px;
}

.toggle-btn {
    width: 50px;
    height: 25px;
    background: #ccc;
    border-radius: 25px;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.toggle-btn::before {
    content: "";
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    transition: 0.3s;
}

#themeSwitch:checked + .toggle-btn {
    background: #007bff;
}

#themeSwitch:checked + .toggle-btn::before {
    left: 27px;
}

.light-theme {
    background: #f5f5f5;
    color: black;
}

.light-theme .weather-app {
    background: white;
    color: black;
}

.light-theme .current-weather,
.light-theme .forecast,
.light-theme .hourly-forecast {
    background: #e0e0e0;
}

.light-theme button {
    background: #6e96c1;
    color: white;
}

.light-theme button:hover {
    background: #b5c9df;
}
