:root {
  --bg: #eef6ff;
  --panel: rgba(255, 255, 255, 0.96);
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(148, 163, 184, 0.22);
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --sky-top: #2f7ff0;
  --sky-bottom: #8dd1ff;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.55), transparent 35%),
    linear-gradient(180deg, #dff1ff 0%, var(--bg) 35%, #f7fbff 100%);
  color: var(--text);
}

.sky-header {
  position: relative;
  overflow: hidden;
  color: white;
  text-align: center;
  padding: 36px 20px 44px;
  background: linear-gradient(180deg, var(--sky-top) 0%, #59aef7 58%, var(--sky-bottom) 100%);
  box-shadow: inset 0 -20px 40px rgba(255, 255, 255, 0.08);
}

.header-content {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.95;
}

.sky-header h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
}

.sky-header h2 {
  max-width: 760px;
  margin: 12px auto 0;
  font-size: clamp(16px, 2.7vw, 20px);
  font-weight: 500;
  line-height: 1.45;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  filter: blur(0.2px);
  z-index: 1;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: inherit;
}

.cloud-1 {
  width: 138px;
  height: 42px;
  top: 26px;
  left: 8%;
}

.cloud-1::before {
  width: 56px;
  height: 56px;
  left: 18px;
  top: -20px;
}

.cloud-1::after {
  width: 74px;
  height: 74px;
  right: 16px;
  top: -30px;
}

.cloud-2 {
  width: 164px;
  height: 48px;
  top: 42px;
  right: 9%;
}

.cloud-2::before {
  width: 62px;
  height: 62px;
  left: 22px;
  top: -18px;
}

.cloud-2::after {
  width: 82px;
  height: 82px;
  right: 14px;
  top: -34px;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.weather-list {
  display: grid;
  gap: 18px;
}

.weather-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 252, 255, 0.95));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.weather-card:hover,
.weather-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
  outline: none;
}

.card-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.details h3 {
  margin: 0;
  font-size: clamp(20px, 2.8vw, 24px);
}

.details p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
}

.open-hint {
  font-size: 26px;
  color: #2563eb;
  font-weight: 700;
}

.metar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.metar-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fbff;
  color: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.16);
  cursor: pointer;
}

.metar-item:hover {
  background: #eff6ff;
}

.metar-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.metar-code {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1e3a8a;
}

.metar-external {
  color: #2563eb;
  font-weight: 700;
}

.metar-text {
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
  font-size: 14px;
}

.metar-text.is-loading {
  font-style: italic;
}

@media (max-width: 680px) {
  .card-main {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .icon {
    width: 52px;
    height: 52px;
  }

  .open-hint {
    display: none;
  }

  .cloud-1,
  .cloud-2 {
    transform: scale(0.82);
  }
}
