* { box-sizing: border-box; margin: 0; }
button, input { font: inherit; }

body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #38bdf8, #1e3a8a);
    font-family: system-ui, sans-serif;
    color: #0f172a;
}
.app {
    width: min(460px, 100%);
    padding: 24px;
    border-radius: 24px;
    background:rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 50px rgba( 0, 0, 0, 0.3);
}

.top { display: flex; justify-content: space-between; align-items: center; }
.top h1 { font-size: 28px; }

#search-form {display: flex; gap: 8px; margin: 16px 0; }
#city {flex: 1; padding: 12px; font-size: 16px; border: 2px solid #cbd5e1; border-radius: 12px; }

button {
    padding:10px 16px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: wait; }

.status { color: #475569; text-align: center; min-height: 24px; }
.status.error { color: #dc2626; font-weight: 600; }

.current { text-align: center; }
.current .temp { font-size: 64px; font-weight: 700; }

.forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 16px;
}
.day { background: #e0f2fe; border-radius: 12px; padding:8px 4px; text-align: center; font-size: 14px; }

.icon { font-size: 28px; }
.icon.big { font-size: 64px; }

.favorites { margin-top: 20px; }
.favorites h3 { margin-bottom: 8px; }
.fav { display: inline-block; margin: 0 6px 6px 0; padding: 6px 12px; border-radius: 999px; background: #dbeafe; font-size: 14px; }
#fav-btn { margin-top: 12px; }

.controls { display: flex; gap: 8px; margin-top: 16px; }
.controls select { flex: 1; padding: 8px; border: 2px solid #cbd5e1; border-radius: 10px; font: inherit; }

.fav button { padding: 0; background: none; color: inherit; font-size: 14px; border-radius: 0; }
.fav-remove { margin-left: 8px; opacity: 0.6; }
.fav-remove:hover { opacity: 1; }