 /* General Page Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #87ceeb, #f0f8ff);
    margin: 50px;
    padding: 50px;

    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    text-align: center;
    width: 90%;
    max-width: 500px;
}

/* Heading and paragraph */
h1 {
    color: #333;
    margin-bottom: 5px;
}

p {
    color: #413c3c;
}

/* Form Styling */
.form {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

input[type="text"] {
    padding: 10px;
    font-size: 1rem;
    border: 2px solid #ccc;
    border-radius: 5px;
    width: 70%;
}

button {
    padding: 10px 15px;
    font-size: 1rem;
    border: none;
    background-color: #0077b6;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background-color: #023e8a;
}

/* Weather & Chart Cards */
.weather-card,
#chartCard {
    background: #71a4c0;
    padding: 20px;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: 0.3s;
    display: none; /* Hidden by default */
}

.weather-card.show,
#chartCard.show {
    display: block; /* Show when class 'show' is added */
}

/* Weather icon */
.weather-card img {
    width: 100px;
}

/* Error message */
.error {
    color: red;
    font-weight: bold;
}

/* Grid for details */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.details-grid div {
    background: #f0f8ff;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

/* Chart Canvas Styling */
#forecastChart {
    width: 100% !important;
    height: 250px !important;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    padding: 10px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .form {
        flex-direction: column;
    }

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

    button {
        width: 100%;
    }

    .weather-card,
    #chartCard {
        font-size: 0.95rem;
        padding: 15px;
    }

    #forecastChart {
        height: 200px !important;
    }
}
