:root {
  color-scheme: light;
  --bg: #e8f6ff;
  --ink: #102436;
  --muted: #5c7182;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(24, 73, 105, 0.14);
  --blue: #1769e0;
  --blue-dark: #0f4faf;
  --aqua: #0aa6b7;
  --sun: #f6a93a;
  --coral: #e96f55;
  --shadow: 0 18px 50px rgba(26, 70, 99, 0.22);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(233, 248, 255, 0.4), rgba(231, 245, 248, 0.84)),
    url("assets/weather-sky-city.png") center / cover fixed;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 44px);
  display: grid;
  align-items: center;
}

.weather-app {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  background: rgba(247, 252, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.app-header,
.current-topline,
.section-heading,
.search-row,
.metrics,
.forecast-card {
  display: flex;
  align-items: center;
}

.app-header {
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.eyebrow,
.city-label,
.time-label,
.condition,
.form-message,
.app-footer,
.section-heading span,
dt,
dd,
h1,
h2,
p {
  margin: 0;
}

.eyebrow {
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-top: 3px;
  font-size: clamp(1.75rem, 8vw, 2.7rem);
  line-height: 1.02;
}

.status-pill {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(23, 105, 224, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.search-panel,
.current-card,
.forecast-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.search-panel {
  padding: var(--space-4);
}

.search-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.search-row {
  gap: var(--space-2);
}

.search-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(16, 36, 54, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
}

.search-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 224, 0.14);
}

.search-row button,
.quick-cities button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.search-row button {
  flex: 0 0 auto;
  padding: 0 17px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(23, 105, 224, 0.28);
}

.search-row button:hover {
  background: var(--blue-dark);
}

.search-row button:active,
.quick-cities button:active {
  transform: translateY(1px);
}

.form-message {
  min-height: 21px;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.form-message.is-error {
  color: #a43f2b;
  font-weight: 700;
}

.quick-cities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: var(--space-3);
}

.quick-cities button {
  padding: 0 8px;
  background: rgba(23, 105, 224, 0.09);
  color: var(--blue-dark);
}

.quick-cities button.is-active,
.quick-cities button:hover {
  background: rgba(23, 105, 224, 0.18);
}

.current-card {
  margin-top: var(--space-4);
  padding: var(--space-5);
  background: var(--panel-strong);
}

.current-topline {
  justify-content: space-between;
  gap: var(--space-3);
}

.city-label {
  font-size: 1.1rem;
  font-weight: 850;
}

.time-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.weather-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: rgba(246, 169, 58, 0.18);
  color: var(--sun);
  font-size: 2rem;
}

.temperature-row {
  display: flex;
  align-items: flex-start;
  margin-top: var(--space-3);
}

.temperature {
  font-size: clamp(4rem, 22vw, 6.25rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0;
}

.degree {
  margin-top: 10px;
  color: var(--blue-dark);
  font-size: 1.5rem;
  font-weight: 850;
}

.condition {
  margin-top: var(--space-1);
  color: var(--muted);
  font-weight: 700;
}

.metrics {
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.metrics div {
  flex: 1 1 0;
  min-width: 0;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(232, 246, 255, 0.74);
}

dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

dd {
  margin-top: 5px;
  font-size: 0.92rem;
  font-weight: 850;
  white-space: normal;
}

.forecast-section {
  margin-top: var(--space-4);
  padding: var(--space-4);
}

.section-heading {
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

h2 {
  font-size: 1rem;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.forecast-list {
  display: grid;
  gap: 10px;
}

.forecast-card {
  min-height: 70px;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.74);
}

.forecast-day {
  display: grid;
  gap: 4px;
}

.forecast-day strong,
.forecast-temp {
  font-weight: 850;
}

.forecast-day span {
  color: var(--muted);
  font-size: 0.84rem;
}

.forecast-icon {
  flex: 0 0 auto;
  font-size: 1.45rem;
}

.forecast-temp {
  flex: 0 0 70px;
  text-align: right;
  color: var(--blue-dark);
}

.app-footer {
  padding: var(--space-4) 2px 0;
  color: rgba(16, 36, 54, 0.66);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 760px) {
  .weather-app {
    width: min(100%, 920px);
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: var(--space-4);
    padding: var(--space-6);
  }

  .app-header,
  .app-footer {
    grid-column: 1 / -1;
  }

  .search-panel {
    align-self: start;
  }

  .current-card,
  .forecast-section {
    margin-top: 0;
  }

  .current-card {
    grid-column: 2;
    grid-row: 2 / span 2;
  }
}

@media (max-width: 430px) {
  body {
    background-attachment: scroll;
  }

  .app-shell {
    padding: 12px;
    align-items: stretch;
  }

  .weather-app {
    min-height: calc(100vh - 24px);
    padding: 18px;
    border-radius: 24px;
  }

  .app-header {
    align-items: flex-start;
  }

  .status-pill {
    padding: 7px 9px;
  }

  .quick-cities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    display: grid;
    grid-template-columns: 1fr;
  }
}
