body {
    margin: 0;
    font-family: 'Rubik', sans-serif;
    background: #111;
}

* {
    box-sizing: border-box;
}

h1, h3 {
    font-weight: 400;
}

.weather-app {
    min-height: 100vh;
    background-image: url(./images/day/cloudy.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
    position: relative;
    transition: 500ms;
    opacity: 1;
}

.weather-app::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    padding: 2em 3em 4em 3em;
}

.container > div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.city-time,
.temp,
.weather {
    margin: 0 1em;
}

.city-time h1 {
    margin: 0;
    margin-bottom: 0.2em;
    font-size: 3em;
}

.temp {
    font-size: 7em;
    margin: 0;
}

.weather img {
    display: block;
    margin: 0.5em 0;
}

.panel {
    position: absolute;
    width: 40%;
    height: 100%;
    top: 0;
    right: 0;
    background: rgba(110, 110, 110, 0.25);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    z-index: 1;
    padding: 3em 2em;
    overflow-Y: scroll;
}

.panel form {
    margin-bottom: -3em;
}

.submit {
    position: absolute;
    top: 53px;  
    right: 40px;  
    width: 40px;  
    height: 40px; 
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: #fa6d1b;
    color: #fff;
    cursor: pointer;
    font-size: 1.2em; 
    border-radius: 50%;  
    display: flex;
    justify-content: center;
    align-items: center; 
    transition: 0.4s;
}



.submit:hover {
    background: #fff !important;
    color: #000;
}
.search {
    width: 100%;
    max-width: 600px;
    padding: 0.8em 2em 0.8em 1.2em;
    background: transparent;
    border: 2px solid #ccc;
    color: #fff;
    font-size: 1.1em;
    border-radius: 25px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search::placeholder {
    color: #bbb;
    font-style: italic;
}

.search:focus {
    outline: none;
    border-color: #fa6d1b;
    box-shadow: 0 0 8px rgba(250, 109, 27, 0.4);
}

.search-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 1.8em;
    color: #ccc;
    transition: color 0.3s ease, transform 0.3s ease;
}

.search-icon:hover {
    color: #fa6d1b;
    transform: translateY(-50%) scale(1.2);
}

.search:focus + .search-icon {
    color: #fa6d1b;
}


@media screen and (max-width: 600px) {
    .search {
        min-width: 200px;
        padding: 0.8em 1.8em 0.8em 0.8em;
    }

    .submit {
        right: 10px;
        width: 35px;
        height: 35px;
    }
}


.panel ul {
    padding: 1em 0;
    margin: 2em 0;
    border-bottom: 1px #ccc solid;
}

.panel ul li {
    color: #ccc;
    margin: 2.5em 0;
}

.panel ul h4 {
    margin: 0;
}

.panel ul h2 {
    margin: 0;
    margin-top: -1.5em;
}

.panel ul h3 {
    margin: 1.5em 0;
    margin-top: 2em;
}

.city {
    display: block;
    cursor: pointer;
}

.city:hover {
    color: #fff;
}

.details li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

.details li:hover {
    background-color: #e0e0e0; 
    transform: scale(1.02); 
    background-color: rgba(255, 255, 255, 0.1);

    transition: background-color 0.3s, transform 0.3s; 
}

.details li .item-left {
    font-weight: bold; 
    color: #333; 
}

.details li .item-right {
    color: #888; 
}

@media screen and (max-width: 800px) {
    .panel, .container {
        position: relative;
        width: 100%;
        top: initial;
    }
}

@media screen and (max-width: 500px) {
    html {
        font-size: 12px;
    }
}

@media screen and (max-height: 300px) {
    .weather-app {
        min-height: 40em;
    }
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 2;
}

.loading img {
    width: 50px;
    height: 50px;
}

.forecast {
    margin-top: 2em;
    color: #fff;
}

.forecast h4 {
    margin-bottom: 1em;
    font-size: 1.2em;
    color: #ccc;
}

.forecast ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2em 0;
}

.forecast ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1em 0;
    gap: 1em;
}

.forecast ul li span {
    font-size: 0.9em;
    color: #ccc;
    flex: 1;
}

.forecast ul li img {
    width: 40px;
    height: 40px;
    margin-left: auto;
}

.forecast ul li .condition {
    font-size: 0.9em;
    color: #fff;
    margin-left: 1em;
}

#map {
    width: 100%;
    height: 400px;
    margin-top: 20px;
}
.panel ul.cities {
    display: flex;
    justify-content: space-evenly;
    padding: 1em 0;
    margin: 3em 0;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 10px;
}

.panel ul.cities li {
    color: #ccc;
    margin: 0.3em 0;
    width: calc(20% - 0.8em); 
    text-align: center;
    border: 2px solid transparent;
    border-radius: 5px;
    padding: 0.4em; 
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 0.8em; 
}

.panel ul.cities li:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    transform: scale(1.05);
}

.panel ul.cities li.selected {
    color: #fff;
    background-color: #fa6d1b;
    border-color: #fff;
}

@media screen and (max-width: 900px) {
    .panel ul.cities li {
        width: calc(33.33% - 0.8em); 
    }
}

@media screen and (max-width: 600px) {
    .panel ul.cities li {
        width: calc(50% - 0.8em); 
    }
}

@media screen and (max-width: 400px) {
    .panel ul.cities li {
        width: calc(100% - 0.8em); 
    }
}

.panel ul.cities:first-of-type {
    margin-top: 5em;
}

.small-text {
    font-size: 0.8em;
    color: #ffffff;
    text-align: center;
    margin-top: -490px;
    margin-left: 36px;
}

.toggle-button {
    background: none;
    color: #ffffff;
    border: none;
    padding: 0;
    margin-left: 0.2em;
    cursor: pointer;
    font-size: 1.2em;
    transition: color 0.3s ease-in-out;
    position: relative;
    top: 1.9px;
}

.toggle-button:hover {
    color: #ccc;
}

.weather-app.full-view .panel {
    display: none;
}

.weather-app.full-view .container {
    width: 100%;
}
#reset-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #b68638; 
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#reset-button:hover {
    background-color: #925c2a;
}

.city {
    list-style: none;
    font-size: 18px;
    padding: 5px 0;
}
h5{

    margin-top: 100px;
    font-size: 25px;
}
h2{
    text-align: left;
    font-size: 20px;
    color: #ccc;
}