* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  padding: 40px 16px;
  background: #172b3a;
  color: #fff;
}

.card {
  width: min(100%, 470px);
  margin: 40px auto 0;
  padding: 32px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 24px;
  background: linear-gradient(145deg, #176b78, #37385f);
  box-shadow: 0 24px 60px rgb(0 0 0 / 25%);
  text-align: center;
}

.app-title {
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 600;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search input {
  min-width: 0;
  height: 56px;
  flex: 1;
  padding: 0 20px;
  border: 0;
  border-radius: 28px;
  outline: 2px solid transparent;
  background: #f2fbfa;
  color: #24333b;
  font-size: 1rem;
}

.search input:focus-visible,
.search button:focus-visible {
  outline: 3px solid #ffc857;
  outline-offset: 3px;
}

.search button {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f2fbfa;
  cursor: pointer;
}

.search button img {
  width: 24px;
  height: 24px;
}

.settings {
  margin-top: 16px;
  text-align: left;
}

.settings summary {
  width: fit-content;
  margin: 0 auto;
  cursor: pointer;
  font-size: 0.9rem;
}

.api-key-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.api-key-form label {
  font-size: 0.9rem;
}

.api-key-form input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #f2fbfa;
  color: #24333b;
  font-size: 1rem;
}

.key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.key-actions button {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #f2fbfa;
  color: #24333b;
  cursor: pointer;
}

.key-status {
  min-height: 1.25em;
  font-size: 0.9rem;
}

.weather-icon {
  width: 160px;
  height: 160px;
  margin-top: 20px;
}

.temp {
  font-size: clamp(3.5rem, 14vw, 5rem);
  font-weight: 500;
  line-height: 1.1;
}

.weather h2 {
  margin-top: 8px;
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 400;
}

.details {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
}

.col {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.col img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.humidity,
.wind {
  font-size: 1.25rem;
  font-weight: 600;
}

.error {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #ffe8e5;
  color: #861d1d;
  font-weight: 600;
  text-align: left;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

[hidden] {
  display: none !important;
}

@media (max-width: 380px) {
  .card {
    padding: 24px 18px;
  }

  .details {
    gap: 8px;
  }

  .col {
    gap: 6px;
  }
}