body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to right, #e0f2f7 0%, #c2e0f0 100%);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.container {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 90%;
    max-width: 800px;
    box-sizing: border-box; /* Include padding in width */
}

.search-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

#city-input {
    flex-grow: 1;
    padding: 15px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#city-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

#search-btn, #location-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    background-color: #4a90e2;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#search-btn:hover, #location-btn:hover {
    background-color: #357abd;
}

.weather-container {
    text-align: center;
}

.current-weather {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f0f8ff;
    border-radius: 15px;
}

#city-name {
    font-size: 36px;
    font-weight: 500;
    margin: 0;
    color: #2c3e50;
}

#current-temp {
    font-size: 72px;
    font-weight: 300;
    margin: 10px 0;
    color: #34495e;
}

#current-description {
    font-size: 24px;
    font-weight: 400;
    text-transform: capitalize;
    margin: 0;
    color: #7f8c8d;
}

#current-weather-icon {
    width: 120px;
    height: 120px;
}

.forecast-container {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #fdfefe;
    border-radius: 15px;
}

.forecast-container h3 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: left;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 10px;
    color: #2c3e50;
}

.hourly-forecast, .daily-forecast {
    display: flex;
    overflow-x: auto;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #4a90e2 #f1f1f1; /* For Firefox */
}

/* Custom scrollbar for Webkit browsers */
.hourly-forecast::-webkit-scrollbar, .daily-forecast::-webkit-scrollbar {
    height: 8px;
}

.hourly-forecast::-webkit-scrollbar-track, .daily-forecast::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.hourly-forecast::-webkit-scrollbar-thumb, .daily-forecast::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 10px;
}

.forecast-item {
    flex: 0 0 100px;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    background-color: #f9f9f9;
    margin-right: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
}

.forecast-item:hover {
    transform: translateY(-5px);
}

.forecast-item p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.forecast-item img {
    width: 50px;
    height: 50px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .search-container {
        flex-direction: column;
        gap: 10px;
    }

    #search-btn, #location-btn {
        width: 100%;
    }

    #city-name {
        font-size: 30px;
    }

    #current-temp {
        font-size: 60px;
    }

    #current-description {
        font-size: 20px;
    }

    .forecast-item {
        flex: 0 0 90px;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
        border-radius: 10px;
    }

    #city-name {
        font-size: 26px;
    }

    #current-temp {
        font-size: 50px;
    }

    #current-description {
        font-size: 18px;
    }

    .forecast-container h3 {
        font-size: 20px;
    }

    .forecast-item {
        flex: 0 0 80px;
        padding: 10px;
    }

    .forecast-item img {
        width: 40px;
        height: 40px;
    }
}
