:root {
  --blue: #2f78b9;
  --blue-dark: #2269aa;
  --blue-soft: #66a1d0;
  --panel: #fff;
  --ink: #243342;
  --muted: #8190a0;
  --line: #e7edf3;
  --orange: #ff9700;
  --yellow: #ffcb4c;
  --map: #9bd2fb;
  --map-bg: #e5f3ff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(#2e76b5 0 310px, #edf4fb 720px, #f4f7fa 100%);
  color: var(--ink);
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.site-shell { min-height: 100vh; }
.site-header {
  width: 960px;
  height: 90px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 35px;
  font-weight: 700;
  letter-spacing: -2px;
}
.brand em { color: #ff9b18; font-style: normal; }
.brand-mark { position: relative; width: 75px; height: 55px; margin-right: 8px; }
.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.brand-mark::before { width: 40px; height: 40px; left: 20px; top: 14px; }
.brand-mark::after { width: 30px; height: 30px; left: 5px; top: 24px; }
.brand-mark i { width: 55px; height: 25px; left: 6px; top: 30px; border-radius: 18px; }
.brand-mark b { position: absolute; right: 0; top: 4px; width: 32px; height: 32px; background: #ffb13e; border-radius: 50%; }

.search { position: relative; display: flex; width: 360px; height: 42px; }
.search input {
  width: 272px;
  border: 0;
  outline: 0;
  padding: 0 16px;
  background: #edf5fb;
  border-radius: 24px 0 0 24px;
  color: #34495e;
}
.search input:focus { box-shadow: inset 0 0 0 2px rgba(255,151,0,.6); }
.search button {
  width: 88px;
  border: 0;
  color: #fff;
  background: var(--orange);
  border-radius: 0 24px 24px 0;
  transition: background .2s, transform .2s;
}
.search button:hover { background: #ff8500; }
.search button:active { transform: scale(.97); }
.suggestions {
  position: absolute;
  z-index: 50;
  left: 10px;
  top: 47px;
  width: 330px;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(28,66,99,.22);
}
.suggestions button {
  width: 100%; height: auto; border-radius: 0; padding: 10px 14px;
  color: #34495e; background: #fff; text-align: left;
}
.suggestions button:hover { background: #f0f7fd; color: #1976bb; }

main { width: 960px; margin: 0 auto 26px; }
.module { background: var(--panel); border-radius: 10px; box-shadow: 0 2px 6px rgba(40,78,113,.05); }
.page-enter { animation: pageIn .38s ease-out both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.breadcrumb { margin: 0 0 14px; padding: 12px 18px; color: #dcecff; background: rgba(255,255,255,.13); border-radius: 8px; }
.breadcrumb a { color: #fff; }
.breadcrumb span { margin: 0 9px; opacity: .6; }
.site-footer { background: #fff; border-top: 1px solid var(--line); color: #84919f; }
.site-footer p { width: 960px; margin: 0 auto; padding: 25px 0; display: flex; gap: 22px; justify-content: center; }
.site-footer a { color: #4882b3; }
.back-top {
  position: fixed; right: 24px; bottom: 24px; width: 42px; height: 42px;
  border: 0; border-radius: 50%; color: #fff; background: rgba(35,91,140,.88);
  box-shadow: 0 5px 16px rgba(21,67,107,.25); opacity: 0; pointer-events: none; transition: .25s;
}
.back-top.show { opacity: 1; pointer-events: auto; }

/* Weather hero */
.weather-hero {
  min-height: 142px;
  margin-bottom: 15px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(105deg, #5c98c8, #70a7d2);
  border-radius: 10px;
}
.weather-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.13), transparent 28%); }
.hero-place { position: relative; z-index: 1; margin-bottom: 2px; font-size: 14px; }
.ip-badge { display: inline-block; margin-left: 9px; padding: 1px 8px; border: 1px solid rgba(255,255,255,.48); border-radius: 10px; color: #eef8ff; font-size: 11px; vertical-align: 1px; }
.hero-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; }
.hero-temp { font-size: 42px; line-height: 1.2; font-weight: 700; }
.hero-condition { font-size: 20px; }
.aqi { padding: 4px 13px; border-radius: 15px; color: #fff; background: var(--yellow); font-size: 13px; }
.warning { padding: 4px 13px; border-radius: 15px; color: #fff; background: rgba(255,199,91,.9); font-size: 13px; }
.hero-meta { position: relative; z-index: 1; display: flex; gap: 24px; margin-top: 7px; color: #eff8ff; }
.hero-meta span { display: flex; align-items: center; gap: 7px; }
.meta-icon { width: 17px; height: 17px; border: 1px solid currentColor; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; }
.weather-art { position: absolute; z-index: 1; right: 39px; top: 32px; width: 78px; height: 78px; }
.weather-art.sun::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #ffd169; box-shadow: 0 0 0 11px rgba(255,209,105,.12); }
.weather-art.sun::after { content: "✦"; position: absolute; inset: -3px; color: #ffd169; font-size: 82px; line-height: 80px; text-align: center; }
.weather-art.cloud::before { content: "☁"; position: absolute; color: #fff; font-size: 76px; line-height: 1; text-shadow: 18px -15px 0 #ffd169; }
.loading-note { position: absolute; right: 130px; bottom: 16px; color: rgba(255,255,255,.75); font-size: 12px; }

/* Home */
.home-main { padding: 27px 21px 24px; }
.section-head { text-align: center; margin-bottom: 27px; }
.section-head h1, .section-head h2 { margin: 0 0 1px; color: #263746; font-size: 23px; }
.section-head p { margin: 0; color: #83909d; }
.home-grid { display: grid; grid-template-columns: 580px 1fr; gap: 20px; }
.china-map {
  height: 510px;
  position: relative;
  overflow: hidden;
  background: var(--map-bg);
  border-radius: 2px;
}
.china-map .inside-map { width: 100%; height: 100%; display: block; }
.china-map .inside-map text { pointer-events: none; }
.china-map .inside-map .lind-link { outline: none; }
.china-map .inside-map .lind-link:hover path { fill: #2095f2; transition: fill .18s ease; }
.map-shape {
  position: absolute; left: 35px; top: 47px; width: 485px; height: 374px;
  background: var(--map);
  clip-path: polygon(2% 34%, 12% 29%, 18% 32%, 24% 28%, 32% 31%, 39% 25%, 47% 28%, 55% 20%, 63% 23%, 69% 15%, 75% 17%, 80% 7%, 87% 9%, 91% 19%, 88% 26%, 94% 33%, 89% 40%, 94% 47%, 86% 54%, 83% 64%, 75% 67%, 70% 76%, 62% 80%, 55% 91%, 46% 86%, 37% 90%, 30% 80%, 22% 77%, 17% 67%, 10% 63%, 7% 52%, 0 47%);
  filter: drop-shadow(0 2px 0 #fff);
}
.map-shape::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(32deg, transparent 0 32px, rgba(255,255,255,.72) 33px 34px, transparent 35px 65px);
  opacity: .5;
}
.map-province {
  position: absolute; z-index: 3; border: 0; background: transparent;
  padding: 1px 3px; color: #173b55; font-size: 12px; transition: .18s;
}
.map-province:hover { color: #fff; background: #217fc6; border-radius: 3px; transform: scale(1.12); }
.map-islands { position: absolute; right: 14px; bottom: 62px; width: 58px; height: 76px; border: 1px solid #9bd2fb; color: #286c9f; display: grid; place-items: center; font-size: 11px; }
.region-list { min-width: 0; }
.region-row { padding: 5px 4px 8px; border-bottom: 1px dotted #dbe3eb; }
.region-row:last-child { border: 0; }
.region-row strong { display: inline-block; min-width: 104px; padding: 2px 13px; margin-bottom: 5px; background: #f2f2f2; border-radius: 3px; font-size: 14px; }
.region-links { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.region-links a:hover, .city-links a:hover, .world-links a:hover { color: #1781c5; }
.sub-module { margin-top: 16px; padding: 18px 22px; }
.sub-title { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px dotted #d8e1e9; font-size: 18px; }
.hot-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: #eef2f5; border: 1px solid #eef2f5; }
.hot-grid a { padding: 10px 6px; text-align: center; background: #fff; }
.hot-grid a:hover { background: #edf7ff; color: #1781c5; }
.world-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.world-card { border: 1px solid #e7edf2; border-radius: 7px; overflow: hidden; }
.world-card h3 { margin: 0; padding: 7px 12px; background: #f4f8fb; color: #347aac; font-size: 15px; }
.world-links { padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 5px 13px; }

/* Province and city-list pages */
.page-card { padding: 25px 22px; }
.page-card > .section-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.province-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.province-city { border: 1px solid #e4ebf1; border-radius: 7px; overflow: hidden; transition: .2s; }
.province-city:hover { box-shadow: 0 7px 22px rgba(42,92,134,.09); transform: translateY(-2px); }
.province-city-head { min-height: 62px; display: flex; align-items: center; padding: 9px 14px; background: #f4f9fd; }
.province-city-head .title { margin-right: auto; color: #2078b3; font-size: 19px; font-weight: 700; }
.mini-icon { width: 38px; font-size: 26px; }
.mini-weather { text-align: right; color: #6c7f90; font-size: 12px; }
.mini-weather b { display: block; color: #394c5c; font-size: 14px; }
.city-links { min-height: 68px; padding: 10px 14px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px 17px; }
.empty-state { padding: 75px 20px; text-align: center; color: #7e8c9a; }
.empty-state b { display: block; margin-bottom: 10px; font-size: 22px; color: #405565; }

/* Full province forecast list */
.province-page-list { padding: 2px 0 4px; }
.forecast-city { margin: 0 0 19px; }
.forecast-city:last-child { margin-bottom: 0; }
.forecast-city-bar {
  height: 43px;
  padding: 0 13px 0 15px;
  display: flex;
  align-items: center;
  color: #fff;
  background: #4389c2;
  border-radius: 5px;
}
.forecast-city-name { color: #fff; font-size: 16px; font-weight: 700; }
.forecast-city-name:hover { text-decoration: underline; }
.forecast-city-weather {
  min-width: 128px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  line-height: 1.05;
}
.forecast-city-weather i { font-style: normal; font-size: 30px; line-height: 1; font-family: Georgia, serif; }
.forecast-city-weather .weather-glyph { color: #ffd365; text-shadow: 0 0 0 #ffd365; }
.forecast-city-weather span { display: flex; flex-direction: column; align-items: flex-start; }
.forecast-city-weather b { font-size: 14px; font-weight: 400; }
.forecast-city-weather em { color: #e7f3ff; font-size: 12px; font-style: normal; white-space: nowrap; }
.county-grid {
  padding: 8px 15px 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 28px;
  align-items: center;
}
.county-grid a { color: #24313c; padding-right: 8px; }
.county-grid a:hover { color: #167bbb; }

/* Detailed forecast */
.city-overview { padding: 23px; margin-bottom: 15px; }
.city-titlebar { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.city-titlebar h1 { margin: 0; font-size: 24px; }
.city-titlebar p { margin: 0 0 2px; color: #8a98a5; }
.update-time { margin-left: auto; color: #9ca8b2; font-size: 12px; }
.current-grid { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 21px 0 3px; }
.current-temp { display: flex; align-items: center; gap: 16px; border-right: 1px solid var(--line); }
.current-temp .big-icon { font-size: 65px; line-height: 1; }
.current-temp strong { display: block; font-size: 47px; line-height: 1; }
.current-temp span { color: #718293; }
.current-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; align-content: center; }
.fact { padding: 7px 12px; color: #65798b; border-left: 3px solid #89bde5; background: #f7fafc; }
.fact b { display: block; color: #2f4455; font-size: 16px; }
.forecast-module { padding: 20px 16px 17px; margin-bottom: 15px; overflow: hidden; }
.forecast-module h2, .life-module h2, .detail-copy h2 { margin: 0 0 12px 6px; font-size: 18px; }
.forecast-scroll { overflow-x: auto; padding-bottom: 5px; }
.forecast-row { min-width: 900px; display: grid; grid-template-columns: repeat(15, 1fr); border: 1px solid var(--line); }
.day-card { min-height: 188px; padding: 9px 3px; text-align: center; border-right: 1px solid var(--line); }
.day-card:last-child { border: 0; }
.day-card.today { background: #eff8ff; }
.day-card .day { color: #607485; font-size: 12px; }
.day-card .date { color: #9aa7b3; font-size: 11px; }
.day-card .icon { display: block; margin: 9px 0 3px; font-size: 29px; }
.day-card .weather { font-size: 12px; }
.day-card .high { color: #f06b45; font-weight: 700; }
.day-card .low { color: #438dcc; }
.day-card .wind { display: block; margin-top: 8px; color: #9aa6b0; font-size: 11px; }
.chart-wrap { margin-top: 14px; padding: 15px; height: 215px; background: linear-gradient(#fbfdff, #f2f8fd); border-radius: 7px; }
.temp-chart { width: 100%; height: 100%; overflow: visible; }
.chart-high { fill: none; stroke: #f48861; stroke-width: 2.5; }
.chart-low { fill: none; stroke: #53a0db; stroke-width: 2.5; }
.chart-grid { stroke: #dfe9f1; stroke-width: 1; stroke-dasharray: 4 5; }
.chart-dot-high { fill: #f48861; }
.chart-dot-low { fill: #53a0db; }
.chart-label { font-size: 10px; fill: #768899; text-anchor: middle; }
.life-module { padding: 20px; margin-bottom: 15px; }
.life-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.life-item { display: flex; gap: 12px; align-items: center; padding: 14px; background: #f6f9fb; border-radius: 7px; }
.life-item .life-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #69a7d4; font-size: 20px; }
.life-item b { display: block; }
.life-item span { color: #83919e; font-size: 12px; }
.detail-copy { padding: 21px 25px; color: #647585; }
.detail-copy p { margin: 0; }
.status-toast { position: fixed; z-index: 100; left: 50%; bottom: 35px; transform: translateX(-50%); padding: 10px 18px; color: #fff; background: rgba(27,54,78,.92); border-radius: 22px; animation: toast 2.4s both; }
@keyframes toast { 0%,100% { opacity:0; transform:translate(-50%,8px) } 12%,85% { opacity:1; transform:translate(-50%,0) } }

@media (max-width: 1000px) {
  body { background: linear-gradient(#2e76b5 0 270px, #edf4fb 650px, #f4f7fa 100%); }
  .site-header, main, .site-footer p { width: calc(100% - 28px); }
  .home-grid { grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); }
  .china-map { height: 480px; }
  .map-shape { left: 3%; width: 88%; }
}

@media (max-width: 720px) {
  .site-header { height: auto; padding: 14px 0 18px; flex-direction: column; align-items: stretch; gap: 14px; }
  .brand { justify-content: center; font-size: 29px; }
  .brand-mark { transform: scale(.82); margin-right: 1px; }
  .search { width: 100%; }
  .search input { flex: 1; width: auto; }
  .weather-hero { min-height: 166px; }
  .weather-art { right: 18px; top: 43px; transform: scale(.83); }
  .hero-meta { gap: 8px 15px; flex-wrap: wrap; max-width: 75%; }
  .home-main, .page-card { padding: 20px 14px; }
  .home-grid { grid-template-columns: 1fr; }
  .china-map { height: 375px; }
  .map-shape { top: 28px; height: 300px; }
  .map-province { font-size: 10px; }
  .hot-grid { grid-template-columns: repeat(3, 1fr); }
  .world-columns, .province-grid, .life-grid { grid-template-columns: 1fr; }
  .county-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .current-grid { grid-template-columns: 1fr; }
  .current-temp { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
  .current-facts { grid-template-columns: repeat(2, 1fr); }
  .site-footer p { flex-wrap: wrap; gap: 3px 15px; }
}

@media (max-width: 420px) {
  main, .site-header, .site-footer p { width: calc(100% - 18px); }
  .china-map { height: 330px; }
  .map-shape { height: 260px; }
  .current-facts { grid-template-columns: 1fr 1fr; gap: 7px; }
  .fact { padding: 6px 8px; }
  .loading-note { display: none; }
  .county-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
