body {margin: 0px;
    padding: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
}


header {text-align: center;
    margin-top: 50px;
    font-size: 22px;
}
input {
    width: 500px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #ccc;
    padding: 5px;
    margin: 8px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}
.theme-button { width: 45px; height: 45px; border: none; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 20px; cursor: pointer; transition: transform 0.2s; }
.theme-button:hover { transform: scale(1.08); }
button {
    width: 120px;
    height: 50px;
    border: none;
    border-radius: 10px;
    background-color: #3b82f6;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 10px rgba(59, 130, 246, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease;
}
button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}
button:active {
    transform: translateY(0);
}
div#weather-info {
    margin-top: 20px;
    text-align: center;
    font-size: 20px;
}
footer { margin-top: 40px; color: gray; font-size: 14px; }
@media (max-width: 650px) {

    .search-box {
        flex-direction: column;
    }


    #cityInput {
        width: 100%;
    }


    .main-weather {
        flex-direction: column;

        gap: 10px;
    }


    #temperature {
        font-size: 50px;
    }


    .details {
        grid-template-columns:
            repeat(2, 1fr);
    }


    #forecast {
        grid-template-columns: 1fr;
    }

}
.weather-card {
    padding: 30px;

    background: var(--card);

    border-radius: 25px;

    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, 0.1);

    text-align: center;
}
#cityName {
    margin-bottom: 5px;

    font-size: 32px;
}
#countryName {
    margin-top: 0;

    color: var(--subtext);
}
.main-weather {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 30px;

    margin: 30px 0;
}


#weatherIcon {
    font-size: 90px;
}


#temperature {
    font-size: 60px;

    font-weight: bold;
}


#weatherDescription {
    font-size: 20px;

    color: var(--subtext);
}

.details {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;
}


.details div {
    padding: 18px;

    background: var(--background);

    border-radius: 15px;

    font-size: 22px;
}


.details span {
    display: block;

    margin: 8px 0;

    color: var(--subtext);

    font-size: 13px;
}


.details strong {
    font-size: 16px;
}
.forecast-section {
    margin-top: 35px;
}


.forecast-section h2 {
    text-align: center;
}


#forecast {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}


.forecast-card {
    padding: 20px;

    background: var(--card);

    border-radius: 18px;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.08);

    text-align: center;
}


.forecast-date {
    font-weight: bold;
}


.forecast-icon {
    font-size: 50px;

    margin: 15px;
}


.forecast-description {
    color: var(--subtext);
}


.forecast-temperature {
    margin-top: 15px;

    font-weight: bold;
}


.location-button { margin-top: 12px; padding: 10px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); cursor: pointer; }
.message { min-height: 24px; margin: 15px 0 0; color: var(--sub-text); }

body {
    transition:
        background-color 0.35s ease,
        color 0.35s ease;
}


.weather-card,
.forecast-card,
.info-box,
#searchResults,
#cityInput {
    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}
.theme-button {
    position: fixed;

    top: 20px;
    right: 20px;

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: white;

    font-size: 22px;

    cursor: pointer;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.2s ease,
        background-color 0.3s ease;
}


.theme-button:hover {
    transform: scale(1.08);
}
body.dark {
    background: #12161c;
    color: #f1f3f5;
}


body.dark .weather-card,
body.dark .forecast-card {
    background: #1c222b;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3);
}


body.dark .info-box {
    background: #252d38;
}


body.dark #cityInput {
    background: #1c222b;

    color: #f1f3f5;

    border-color: #343b46;
}


body.dark #cityInput::placeholder {
    color: #8b949e;
}


body.dark #searchResults {
    background: #1c222b;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.4);
}


body.dark .search-result {
    border-bottom-color: #303742;
}


body.dark .search-result:hover {
    background: #252d38;
}


body.dark .search-result-info,
body.dark #countryName,
body.dark .info-box p {
    color: #9da7b3;
}


body.dark .theme-button {
    background: #252d38;

    color: white;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.4);
}
