/* Reset some default styling */
body, h1, h2, p, form, iframe {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Basic styling for body */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #b9fbc0);
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header styling */
header {
    background-color: #0277bd;
    color: #fff;
    padding: 15px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-bottom: 2px solid #01579b;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

nav h1 {
    margin: 0;
    font-size: 24px;
}

nav form {
    display: flex;
    align-items: center;
}

nav input[type="text"] {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #01579b;
    border-radius: 4px;
    margin-right: 10px;
    width: 250px;
    transition: border-color 0.3s ease;
}

nav input[type="text"]:focus {
    border-color: #0277bd;
    outline: none;
}

nav button {
    padding: 12px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #0288d1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

nav button:hover {
    background-color: #0277bd;
    transform: scale(1.05);
}

/* Section styling */
section {
    margin: 80px auto 20px;
    max-width: 900px;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
}

/* Weather details styling */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.weather-details p {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 5px 0;
    font-size: 16px;
    line-height: 1.5;
}

.weather-details span {
    font-weight: bold;
    color: #0277bd;
}

/* Forecast section styling */
.forecast {
    margin-top: 20px;
}

.forecast h2 {
    margin-bottom: 15px;
    font-size: 22px;
    color: #0277bd;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.forecast-item {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.forecast-item img {
    width: 60px;
    height: 60px;
    display: block;
    margin: 0 auto;
}

.forecast-item p {
    margin: 5px 0;
}

/* Iframe styling */
iframe {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive design for tablets and larger mobile devices */
@media (max-width: 768px) {
    nav form {
        flex-direction: column;
    }

    nav input[type="text"],
    nav button {
        width: 100%;
    }

    .forecast-container, .weather-details {
        grid-template-columns: 1fr;
    }
}

/* Responsive design for very small screens (e.g., smartphones) */
/* Responsive design for very small screens (e.g., smartphones) */
@media (max-width: 480px) {
    nav h1 {
        font-size: 20px;
    }

    nav form {
        flex-direction: column;
    }

    nav input[type="text"] {
        padding: 8px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px; /* Add spacing below the input */
    }

    nav button {
        padding: 10px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .weather-details p {
        font-size: 14px;
        padding: 10px;
    }

    .forecast h2 {
        font-size: 18px;
    }

    .forecast-item p {
        font-size: 14px;
    }
}
