/* 8684天气 样式 */
:root {
    --brand: #317cf7;
    --brand-dark: #2668d8;
    --brand-soft: #eaf1ff;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1c2b3a;
    --muted: #8496a9;
    --line: #e6edf5;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(28, 43, 58, .05);
    --shadow-lg: 0 10px 30px rgba(28, 43, 58, .10);
    --hot3: #e5484d;
    --hot2: #ef7a35;
    --hot1: #e8a020;
    --mild: #3a9d6e;
    --cool: #3d8bfd;
    --cold: #6c7f9c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Arial, sans-serif;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; }
button, input { font: inherit; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 18px; padding-bottom: 30px; }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-mark { display: flex; }
.logo-text { font-size: 21px; font-weight: 800; color: var(--brand); letter-spacing: -.3px; }
.logo-text em { font-style: normal; color: var(--text); }
.header-search {
    display: flex; align-items: center; flex: 1; max-width: 420px;
    background: var(--bg); border: 1px solid transparent; border-radius: 999px;
    padding: 3px 3px 3px 14px; transition: .2s;
}
.header-search:focus-within { background: #fff; border-color: #cfe0ff; box-shadow: 0 0 0 3px rgba(49, 124, 247, .10); }
.header-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 7px 0; color: var(--text); }
.header-search input::placeholder { color: #a9b6c6; }
.header-search button {
    border: 0; background: var(--brand); color: #fff; border-radius: 999px;
    padding: 6px 16px; cursor: pointer; font-size: 14px;
}
.header-search button:hover { background: var(--brand-dark); }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.header-nav a { padding: 7px 12px; border-radius: 8px; color: #52657a; font-size: 14px; white-space: nowrap; }
.header-nav a:hover, .header-nav a.active { color: var(--brand); background: var(--brand-soft); }

/* ---------- 通用卡片 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { padding: 18px 20px; margin-top: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: 17px; font-weight: 700; }
.section-head h2::before {
    content: ""; display: inline-block; width: 4px; height: 15px; border-radius: 2px;
    background: var(--brand); margin-right: 8px; vertical-align: -2px;
}
.section-sub, .more { font-size: 13px; color: var(--muted); }
.more { color: var(--brand); }
.muted { color: var(--muted); font-size: 13px; }
.page-title { margin-bottom: 16px; }
.page-title h1 { font-size: 22px; line-height: 1.3; }
.page-title p { margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .section { margin-top: 16px; }

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 4px 2px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: #c3cedb; }

/* ---------- 搜索框 ---------- */
.search-box { display: flex; gap: 8px; margin: 4px 0 10px; }
.search-box input {
    flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--line);
    border-radius: 12px; background: #fff; outline: none; transition: .2s;
}
.search-box input:focus { border-color: #a9c8ff; box-shadow: 0 0 0 3px rgba(49, 124, 247, .10); }
.search-box button {
    border: 0; background: var(--brand); color: #fff; padding: 0 24px;
    border-radius: 12px; cursor: pointer; font-weight: 600;
}
.search-box button:hover { background: var(--brand-dark); }

/* ---------- 城市天气 hero ---------- */
.hero { border-radius: 20px; padding: 24px 26px; color: #fff; box-shadow: var(--shadow-lg); overflow: hidden; position: relative; }
.hero-day { background: linear-gradient(135deg, #4a8ff0 0%, #6fb4fb 58%, #9ad0ff 100%); }
.hero-night { background: linear-gradient(135deg, #1d2b49 0%, #31456c 60%, #4a628e 100%); }
.hero::after {
    content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
    border-radius: 50%; background: rgba(255, 255, 255, .10);
}
.hero-main { position: relative; z-index: 1; }
.hero-city h1 { font-size: 26px; font-weight: 700; }
.hero-sub { font-size: 13px; opacity: .82; margin-top: 2px; }
.hero-sub .dot { margin: 0 6px; }
.badge-stale { background: rgba(255,255,255,.22); border-radius: 6px; padding: 1px 6px; margin-left: 6px; font-size: 12px; }
.hero-now { display: flex; align-items: center; gap: 16px; margin: 14px 0 6px; }
.hero-icon { display: flex; filter: drop-shadow(0 4px 10px rgba(0,0,0,.12)); }
.hero-temp { font-size: 62px; font-weight: 300; line-height: 1; letter-spacing: -2px; }
.hero-temp span { font-size: 20px; font-weight: 400; opacity: .8; margin-left: 2px; letter-spacing: 0; }
.hero-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.hero-text b { font-size: 19px; font-weight: 600; }
.hero-text span { opacity: .82; }
.hero-stats {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
    margin-top: 16px; background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 12px 14px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: 12px; opacity: .75; }
.stat b { font-size: 14px; font-weight: 600; }

/* ---------- 逐小时 ---------- */
.hourly-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.hourly-scroll::-webkit-scrollbar { height: 6px; }
.hourly-scroll::-webkit-scrollbar-thumb { background: #dbe4f0; border-radius: 3px; }
.hour-item {
    flex: 0 0 66px; display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 10px 4px; border-radius: 12px; background: #f7f9fc;
}
.hour-item.now { background: var(--brand-soft); }
.hour-time { font-size: 12px; color: var(--muted); }
.hour-item.now .hour-time { color: var(--brand); font-weight: 600; }
.hour-temp { font-size: 16px; font-weight: 600; }
.hour-pop { font-size: 11px; color: var(--brand); height: 14px; }

/* ---------- 7天 ---------- */
.daily-list { display: flex; flex-direction: column; }
.daily-row {
    display: grid; grid-template-columns: 74px 1.35fr 92px 74px 160px;
    align-items: center; gap: 8px; padding: 11px 2px; border-top: 1px solid #f0f4f9;
}
.daily-row:first-child { border-top: 0; }
.daily-date b { display: block; font-size: 14px; }
.daily-date span { font-size: 12px; color: var(--muted); }
.daily-weather { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.daily-weather em { font-style: normal; font-size: 12px; color: var(--muted); }
.daily-wind, .daily-pop { font-size: 12px; color: var(--muted); }
.daily-temp { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.daily-temp .low { color: var(--muted); width: 30px; text-align: right; }
.daily-temp .high { width: 30px; }
.daily-temp .bar { position: relative; flex: 1; height: 5px; border-radius: 3px; background: #eaf0f7; }
.daily-temp .bar i {
    position: absolute; top: 0; height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #7fb2ff, #ef8b3c);
}

/* ---------- 生活指数 / 空气质量 ---------- */
.index-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.index-item { background: #f7f9fc; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.index-name { font-size: 12px; color: var(--muted); }
.index-level { font-size: 15px; }
.index-advice { font-size: 12px; color: #5f7288; line-height: 1.45; }
.air-main { display: flex; align-items: center; gap: 14px; }
.aqi-badge { min-width: 84px; padding: 10px 12px; border-radius: 12px; text-align: center; color: #fff; }
.aqi-badge b { display: block; font-size: 26px; line-height: 1.1; }
.aqi-badge span { font-size: 12px; }
.aqi-1 { background: #3caf63; }
.aqi-2 { background: #d4a017; }
.aqi-3 { background: #e67e22; }
.aqi-4 { background: #d64545; }
.aqi-5 { background: #8e44ad; }
.aqi-6 { background: #6d2c3f; }
.aqi-na { background: #9aa9ba; }
.air-advice { font-size: 13px; color: #5f7288; }
.air-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.air-grid div { background: #f7f9fc; border-radius: 8px; padding: 8px; text-align: center; }
.air-grid span { display: block; font-size: 11px; color: var(--muted); }
.air-grid b { font-size: 14px; }
.air-trend { display: flex; align-items: flex-end; gap: 3px; height: 46px; margin-top: 14px; }
.air-trend i { flex: 1; background: linear-gradient(180deg, #9fc3ff, #4d8bf5); border-radius: 3px 3px 0 0; min-height: 3px; }
.air-trend-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- 城市 chip ---------- */
.chip-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.city-chip {
    display: flex; align-items: center; gap: 6px; padding: 10px 12px;
    background: #f7f9fc; border-radius: 10px; color: var(--text);
    border: 1px solid transparent; transition: .15s; min-width: 0;
}
.city-chip:hover { background: #fff; border-color: #cfe0ff; color: var(--brand); box-shadow: 0 2px 8px rgba(49,124,247,.08); }
.chip-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-weather { margin-left: auto; display: flex; align-items: center; gap: 3px; font-size: 13px; color: #4c6076; }
.chip-weather b { font-weight: 600; }
.chip-text { font-size: 11px; color: var(--muted); display: none; }
.chip-sub { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.chip-arrow { margin-left: auto; color: #b8c6d6; }

/* ---------- 首页 ---------- */
.home-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: stretch; margin-top: 6px; }
.home-hero-left {
    background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 100%);
    border-radius: 20px; padding: 30px 30px 26px; box-shadow: var(--shadow);
}
.home-hero-left h1 { font-size: 30px; line-height: 1.25; letter-spacing: -.5px; }
.home-hero-left p { color: var(--muted); margin: 8px 0 18px; font-size: 14px; }
.now-card {
    display: flex; flex-direction: column; justify-content: space-between;
    border-radius: 20px; padding: 20px 22px; color: #fff; box-shadow: var(--shadow-lg);
}
.now-head { display: flex; justify-content: space-between; font-size: 13px; opacity: .9; }
.now-city { font-size: 17px; font-weight: 600; }
.now-main { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.now-icon { display: flex; }
.now-temp { font-size: 52px; font-weight: 300; line-height: 1; letter-spacing: -2px; }
.now-temp span { font-size: 18px; opacity: .8; }
.now-text { display: flex; flex-direction: column; font-size: 13px; }
.now-text b { font-size: 17px; }
.now-text span { opacity: .85; }
.now-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: rgba(255,255,255,.14); border-radius: 12px; padding: 8px 6px; }
.now-day { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; }
.now-day b { font-size: 12px; font-weight: 600; }
.now-day em { font-style: normal; opacity: .68; margin-left: 2px; }
.now-more { margin-top: 10px; font-size: 13px; opacity: .9; color: #fff; }
.province-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.province-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: #f7f9fc; border-radius: 10px; color: var(--text); transition: .15s; }
.province-item:hover { background: var(--brand-soft); color: var(--brand); }
.province-item b { font-size: 14px; }
.province-item span { font-size: 11px; color: var(--muted); }
.city-index summary { cursor: pointer; font-size: 14px; color: var(--brand); padding: 4px 0; list-style: none; }
.city-index summary::-webkit-details-marker { display: none; }
.city-index summary::before { content: "＋ "; }
.city-index[open] summary::before { content: "－ "; }
.letter-group { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed #eef3f9; }
.letter { flex: 0 0 22px; font-weight: 700; color: var(--brand); font-size: 14px; }
.letter-cities { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.letter-cities a { font-size: 13px; color: #445a70; }
.letter-cities a:hover { color: var(--brand); }
.mini-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0f4f9; }
.mini-links a { font-size: 13px; color: var(--muted); }
.mini-links a:hover { color: var(--brand); }

/* ---------- 15天表格 ---------- */
.forecast-table-wrap { overflow-x: auto; }
.forecast-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.forecast-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.forecast-table td { padding: 11px 10px; border-bottom: 1px solid #f2f6fa; vertical-align: middle; }
.forecast-table tr.today td { background: #f6faff; }
.ft-date b { display: block; font-size: 14px; }
.ft-date span { font-size: 12px; color: var(--muted); }
.ft-weather { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ft-weather em { font-style: normal; font-size: 12px; color: var(--muted); }
.ft-temp b { color: #e2683c; }
.ft-temp span { color: #3d8bfd; }
.ft-sun { font-size: 12px; color: var(--muted); white-space: nowrap; }
.section-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--brand); color: #fff; padding: 9px 18px; border-radius: 10px; font-size: 14px; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.ghost:hover { background: #dceaff; }

/* ---------- 逐小时页 ---------- */
.hour-block { margin-bottom: 18px; }
.hour-date { font-size: 15px; margin-bottom: 8px; }
.hour-table { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.hour-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; background: #f7f9fc; border-radius: 10px; padding: 9px 4px; }
.hc-time { font-size: 12px; color: var(--muted); }
.hc-temp { font-size: 15px; font-weight: 600; }
.hc-text, .hc-pop, .hc-wind { font-size: 11px; color: var(--muted); text-align: center; }

/* ---------- 省份页 ---------- */
.district-group { border-top: 1px dashed #eef3f9; padding: 10px 0; }
.district-group summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.district-links { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 0 2px 18px; }
.district-links a { font-size: 13px; color: #5a7088; }
.district-links a:hover { color: var(--brand); }

/* ---------- 其他 ---------- */
.seo-text { font-size: 13px; color: #5f7288; line-height: 1.8; }
.seo-text h2 { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.seo-text p + p { margin-top: 8px; }
.empty-card { padding: 26px 20px; }
.empty-card h1 { font-size: 20px; margin-bottom: 8px; }
.empty-card p { color: var(--muted); margin-bottom: 14px; }
.t-hot3 { color: var(--hot3); }
.t-hot2 { color: var(--hot2); }
.t-hot1 { color: var(--hot1); }
.t-mild { color: var(--mild); }
.t-cool { color: var(--cool); }
.t-cold { color: var(--cold); }
.wi { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: 26px; background: #fff; border-top: 1px solid var(--line); padding: 24px 0 30px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin-bottom: 10px; }
.footer-links a { font-size: 13px; color: #52657a; }
.footer-note { text-align: center; font-size: 12px; color: var(--muted); }
.footer-copy { text-align: center; font-size: 12px; color: #a2b0c0; margin-top: 6px; }
.footer-copy a { color: #a2b0c0; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .header-nav a:not(.active) { display: none; }
    .chip-grid, .province-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-hero { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .hour-table { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .daily-row { grid-template-columns: 66px 1.3fr 84px 150px; }
    .daily-pop { display: none; }
}
@media (max-width: 640px) {
    body { font-size: 14px; }
    .header-inner { height: 56px; gap: 10px; }
    .logo-text { font-size: 18px; }
    .header-search { max-width: none; }
    .header-search button { padding: 6px 12px; }
    .header-nav { display: none; }
    .hero { padding: 18px; border-radius: 16px; }
    .hero-temp { font-size: 48px; }
    .hero-icon svg { width: 68px; height: 68px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 14px 14px; }
    .chip-grid, .province-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .index-grid { grid-template-columns: 1fr; }
    .air-grid { grid-template-columns: repeat(3, 1fr); }
    .hour-table { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .daily-row { grid-template-columns: 54px 1fr 120px; gap: 4px; }
    .daily-wind { display: none; }
    .daily-temp .bar { display: none; }
    .daily-temp { justify-content: flex-end; gap: 4px; }
    .home-hero-left { padding: 22px 18px; }
    .home-hero-left h1 { font-size: 24px; }
    .now-temp { font-size: 44px; }
    .now-days { grid-template-columns: repeat(5, 1fr); }
    .now-day em { display: none; }
    .forecast-table { min-width: 560px; }
}
