:root {
  color-scheme: dark;
  --bg: #0a1322;
  --panel: rgba(18, 33, 54, 0.78);
  --panel-strong: rgba(24, 43, 69, 0.9);
  --line: rgba(168, 193, 224, 0.18);
  --text: #eef5ff;
  --muted: #9fb2c9;
  --accent: #7dd3fc;
  --sun: #fbbf24;
  --rain: #60a5fa;
  --snow: #dbeafe;
  --danger: #fca5a5;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 500px at 82% -10%, rgba(56, 189, 248, 0.17), transparent 65%),
    radial-gradient(700px 500px at 8% 20%, rgba(129, 140, 248, 0.12), transparent 60%),
    linear-gradient(160deg, #08111f 0%, #0c1a2d 56%, #0a1322 100%);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 30px;
}

.hero {
  padding: 24px 4px 30px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  letter-spacing: -0.025em;
}

.lead {
  max-width: 650px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.6;
}

.updated,
.section-note,
.current-time {
  color: var(--muted);
  font-size: 0.82rem;
}

.current-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.65fr) minmax(220px, 0.9fr);
  gap: 26px;
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, var(--panel-strong), var(--panel));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.city-label {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.current-temperature {
  display: flex;
  align-items: flex-start;
  font-size: clamp(4.8rem, 13vw, 8.6rem);
  font-weight: 750;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.current-temperature span {
  margin-top: 0.17em;
  margin-left: 0.08em;
  font-size: 0.26em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.current-description {
  margin: 18px 0 5px;
  font-size: 1.35rem;
  font-weight: 650;
}

.current-time {
  margin-bottom: 0;
}

.current-visual {
  display: flex;
  justify-content: center;
  color: var(--sun);
}

.current-visual .weather-icon {
  width: min(100%, 170px);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(251, 191, 36, 0.15));
}

.current-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.current-stats div {
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

dt {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

dd {
  margin: 5px 0 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.section {
  margin-top: 36px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.city-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(18, 33, 54, 0.64);
}

.city-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.city-card h3 {
  margin-bottom: 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.city-card .weather-icon {
  flex: none;
  color: var(--accent);
}

.city-temp {
  margin-top: 15px;
  font-size: 2.35rem;
  font-weight: 720;
  letter-spacing: -0.06em;
  line-height: 1;
}

.city-temp span {
  margin-left: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
}

.city-desc {
  min-height: 2.8em;
  margin: 7px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.mini-stats {
  display: grid;
  gap: 7px;
  margin: 0;
  font-size: 0.76rem;
}

.mini-stats div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.mini-stats dd {
  margin: 0;
  font-size: 0.78rem;
  white-space: nowrap;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.forecast-card {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 33, 54, 0.64);
  text-align: center;
}

.forecast-day {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.forecast-card .weather-icon {
  margin: 12px auto 8px;
  color: var(--accent);
}

.forecast-temp {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
}

.forecast-temp strong {
  font-size: 1.28rem;
}

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

.forecast-rain {
  margin-top: 6px;
  color: var(--rain);
  font-size: 0.72rem;
}

.muted {
  color: var(--muted);
}

.notice {
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid rgba(252, 165, 165, 0.25);
  border-radius: 12px;
  color: var(--danger);
  background: rgba(127, 29, 29, 0.16);
  font-size: 0.82rem;
}

.error-card {
  border-style: dashed;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 900px) {
  .current-card {
    grid-template-columns: 1fr 0.55fr;
  }

  .current-stats {
    grid-column: 1 / -1;
  }

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

@media (max-width: 620px) {
  .page {
    width: min(100% - 22px, 1120px);
    padding-top: 20px;
  }

  .current-card {
    grid-template-columns: 1fr;
    gap: 18px;
    border-radius: 22px;
  }

  .current-visual {
    justify-content: flex-start;
  }

  .current-visual .weather-icon {
    width: 110px;
  }

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

  .city-card:last-child {
    grid-column: 1 / -1;
  }

  footer {
    display: grid;
  }
}

@media (max-width: 420px) {
  .current-stats {
    grid-template-columns: 1fr;
  }

  .forecast-grid {
    grid-template-columns: 1fr;
  }

  .city-card:last-child {
    grid-column: auto;
  }
}
