* { box-sizing: border-box; }

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fb;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 214, 102, .35), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(121, 196, 255, .3), transparent 30%),
    #f4f7fb;
}

.app {
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 32px;
}

.hero { text-align: center; }

.logo {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 14px 35px rgba(36, 55, 86, .1);
  font-size: 36px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #65728a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 9vw, 72px);
  line-height: .98;
  letter-spacing: -.055em;
}

.subtitle {
  margin: 18px auto 28px;
  color: #65728a;
  font-size: 17px;
}

.search {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: white;
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(36, 55, 86, .1);
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 15px;
  background: transparent;
  color: inherit;
  font: inherit;
}

.search button {
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  background: #172033;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.search button:hover { transform: translateY(-1px); }
.search button:disabled { opacity: .6; cursor: wait; }

.error {
  min-height: 24px;
  margin: 12px 4px;
  color: #c0392b;
  font-size: 14px;
}

.card {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid #e5eaf1;
  border-radius: 26px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 22px 55px rgba(36, 55, 86, .12);
  backdrop-filter: blur(10px);
}

.hidden { display: none; }

.weather-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.location {
  margin: 0;
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -.03em;
}

.description {
  margin: 6px 0 0;
  color: #65728a;
}

.temperature {
  margin: 4px 0 20px;
  font-size: 82px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -.07em;
}

.temperature span:last-child {
  font-size: 30px;
  vertical-align: top;
  margin-left: 5px;
  letter-spacing: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stats div {
  padding: 15px;
  border-radius: 15px;
  background: #f4f7fb;
}

.stats span, .stats strong {
  display: block;
}

.stats span {
  margin-bottom: 5px;
  color: #7b879a;
  font-size: 12px;
}

.stats strong { font-size: 17px; }

.joke {
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  background: #fff5d9;
}

.joke-label {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.joke p {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 750;
}

.footer {
  margin: 22px 0 0;
  text-align: center;
  color: #8a94a5;
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .app { padding-top: 42px; }
  .search { flex-direction: column; }
  .search button { min-height: 48px; }
  .stats { grid-template-columns: 1fr; }
  .card { padding: 21px; }
}