:root {
  color-scheme: light;
  --ink: #12212f;
  --muted: #617183;
  --line: #dce5ed;
  --panel: #ffffff;
  --panel-soft: #f5f8fb;
  --sky: #dff3ff;
  --sea: #1c8bc3;
  --sun: #f7b733;
  --rain: #5d7dff;
  --warm: #e85d4f;
  --green: #2a9d72;
  --shadow: 0 20px 50px rgba(32, 57, 77, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 8%, rgba(247, 183, 51, 0.22), transparent 28rem),
    linear-gradient(135deg, #edf8ff 0%, #f8fbfd 46%, #eef5ef 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 8px 20px rgba(247, 183, 51, 0.35);
}

.search {
  display: flex;
  width: min(620px, 100%);
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(36, 59, 80, 0.08);
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 16px;
  outline: none;
}

.search button {
  border: 0;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  padding: 0 20px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 28px;
  align-items: stretch;
  min-height: 390px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(9, 72, 112, 0.88), rgba(19, 122, 159, 0.78)),
    url("https://images.unsplash.com/photo-1504608524841-42fe6f032b4b?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
  color: #fff;
  overflow: hidden;
}

.hero-copy {
  align-self: center;
  max-width: 590px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

.eyebrow {
  margin: 0 0 12px;
  color: #c9f2ff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.04rem;
  line-height: 1.7;
}

.globe-panel {
  display: grid;
  place-items: center;
  min-height: 320px;
}

.globe {
  position: relative;
  width: min(390px, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 24%, rgba(255, 255, 255, 0.76), transparent 0.4rem),
    radial-gradient(circle at 38% 38%, #52b788 0 8%, transparent 8.4%),
    radial-gradient(circle at 65% 35%, #86c26d 0 13%, transparent 13.4%),
    radial-gradient(circle at 54% 66%, #e7b85f 0 11%, transparent 11.4%),
    radial-gradient(circle at 74% 72%, #52b788 0 7%, transparent 7.4%),
    linear-gradient(145deg, #7dd3fc, #1878b9 58%, #0b4267);
  box-shadow: inset -38px -30px 58px rgba(6, 35, 62, 0.45), 0 24px 80px rgba(0, 0, 0, 0.28);
}

.orbit {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  transform: rotate(-26deg) scaleX(1.18);
}

.orbit-two {
  inset: 21%;
  transform: rotate(31deg) scaleX(1.36);
}

.map-pin {
  position: absolute;
  z-index: 2;
  min-width: 54px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.map-pin::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warm);
  transform: translateX(-50%);
}

.pin-seoul { left: 67%; top: 38%; }
.pin-london { left: 42%; top: 30%; }
.pin-newyork { left: 18%; top: 38%; }
.pin-cairo { left: 47%; top: 50%; }
.pin-sydney { left: 70%; top: 70%; }

.status-row,
.dashboard,
.city-grid {
  margin-top: 18px;
}

.status-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px;
}

.status-row > div,
.current-card,
.forecast-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(34, 62, 86, 0.08);
}

.status-row > div {
  padding: 16px 18px;
}

.label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
}

.current-card {
  min-height: 360px;
  padding: 26px;
}

.weather-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.city-name {
  margin-bottom: 6px;
  font-size: 2rem;
  line-height: 1.1;
}

.country {
  color: var(--muted);
  font-weight: 700;
}

.weather-icon {
  font-size: 4.6rem;
  line-height: 1;
}

.temperature {
  margin: 24px 0 8px;
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
}

.condition {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.metric {
  padding: 14px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 1.25rem;
}

.forecast-panel {
  min-width: 0;
  padding: 22px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 1.1rem;
}

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

.hourly-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hour {
  display: grid;
  grid-template-columns: 60px 46px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.hour .time {
  color: var(--muted);
  font-weight: 800;
}

.hour .icon {
  font-size: 1.8rem;
}

.hour strong {
  display: block;
}

.hour small {
  color: var(--muted);
  font-weight: 700;
}

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

.city-card {
  min-height: 154px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(34, 62, 86, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.city-card:hover,
.city-card:focus-visible {
  border-color: rgba(28, 139, 195, 0.6);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  outline: none;
}

.city-card .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.city-card .mini-icon {
  font-size: 2rem;
}

.city-card h3 {
  margin: 0;
  font-size: 1rem;
}

.city-card .mini-temp {
  margin-top: 16px;
  font-size: 2.2rem;
  font-weight: 900;
}

.city-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.empty-state,
.error {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.error {
  color: #a93b32;
}

@media (max-width: 920px) {
  .topbar,
  .hero,
  .dashboard,
  .status-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
  }

  .search {
    width: 100%;
  }

  .hero {
    padding: 26px;
  }

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

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 14px;
  }

  .hero {
    min-height: auto;
    padding: 22px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .globe-panel {
    min-height: 250px;
  }

  .hourly-list,
  .metrics,
  .cards {
    grid-template-columns: 1fr;
  }

  .hour {
    grid-template-columns: 56px 42px 1fr;
  }

  .search {
    height: auto;
    flex-direction: column;
  }

  .search input,
  .search button {
    min-height: 44px;
  }
}
