* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #F5F7FA;
  color: #1F2937;
  line-height: 1.6;
}

img {
  max-width: 100%;
  border: none;
  vertical-align: middle;
  width: auto;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 全局精灵图统一 */
.index-icon,
.head .btn-feedback::before,
.beian-icon,
.scenic-item.recommended::before,
.weather-icon {
  background-image: url('https://tq.ie123.com/css_sprites.png') !important;
  background-repeat: no-repeat !important;
}

.back-top {
  position: fixed;
  right: 20px;
  bottom: 30px;
  width: 44px;
  height: 44px;
  background: #42a5f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(66, 165, 246, 0.3);
  z-index: 999;
}

.back-top:hover {
  background: #3394e4;
}

.back-top::after {
  content: "↑";
  font-weight: 700;
}

.head {
  width: 100%;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.head a {
  line-height: 0;
}

.head img {
  height: 48px;
  object-fit: contain;
}

.head .btn-feedback {
  margin-left: auto;
  padding: 8px 12px;
  background: #f0f7ff;
  color: #42a5f6;
  border-radius: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.head .btn-feedback::before {
  content: "";
  width: 16px;
  height: 16px;
  background-position: -234px -98px;
}

.today {
  width: 100%;
  padding: 40px 20px 36px;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.today .area h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.today .area p {
  font-size: 13px;
  opacity: .9;
}

.today .air {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .22);
  padding: 6px 14px;
  font-size: 14px;
  margin: 12px 0;
  border-radius: 12px;
}

.today .air img {
  width: 18px;
  height: 18px;
}

.today .air-icon {
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.today .temp-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 20px 0;
}

.today .degree {
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  animation: tempIn .8s ease-out;
}

.today .weather-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}

.today .weather-info img {
  width: 64px;
  height: 64px;
  animation: breath 3s infinite alternate ease-in-out;
}

.today .tips {
  font-size: 15px;
  margin-bottom: 16px;
}

.today .observe {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 16px;
  opacity: .95;
}

.observe-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}

.weather-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
}

.icon-wind { background-position: -82px -234px; }
.icon-humidity { background-position: -234px -170px; }
.icon-rain { background-position: -10px -234px; }
.icon-pressure { background-position: -46px -234px; }

.container {
  width: 100%;
  max-width: 98%;
  margin: 0 auto;
}

.card,
.scenic,
.nearby {
  width: 100%;
  background: #fff;
  margin: 16px 0;
}

.card {
  padding: 24px 20px;
}

.scenic {
  padding: 30px 24px;
}

.nearby {
  padding: 20px;
}

.card .tit,
.scenic .tit,
.nearby .link-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #111827;
}

.encyclopedia {
  width: 100%;
  background: #fff;
  margin: 16px 0;
  padding: 24px 20px;
}

.encyclopedia .tit {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #111827;
}

.encyclopedia-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.encyclopedia-img {
  flex: 0 0 140px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
}

.encyclopedia-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.encyclopedia-text {
  flex: 1;
  font-size: 14px;
  color: #4B5563;
  line-height: 1.7;
  max-height: 100px;
  overflow: hidden;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  display: -webkit-box;
}

.tomorrow {
  display: flex;
  gap: 14px;
  margin: 20px 0;
  width: 100%;
}

.tomorrow .item {
  flex: 1;
  background: #fff;
  padding: 24px 16px;
  text-align: center;
}

.tomorrow .date {
  font-size: 15px;
  color: #4B5563;
  margin-bottom: 8px;
}

.tomorrow .temperature {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.tomorrow .weather {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 10px;
}

.tomorrow .bottom img {
  margin: 0 2px;
  width: 40px;
  height: 40px;
}

.hours-data {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

.hours-table {
  width: 100%;
  min-width: 540px;
  font-size: 14px;
  color: #374151;
}

.hours-table th,
.hours-table td {
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid #f3f4f6;
}

.hours-table th {
  font-weight: 500;
  color: #111827;
  background: #f9fafb;
}

.hours-table img {
  width: 20px;
  height: 20px;
}

.days dl {
  border-bottom: 1px solid #F3F4F6;
  padding: 14px 0;
}

.days dd {
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
}

.days dd span {
  flex: 1;
  text-align: center;
}

.days dd span img {
  width: 26px;
  height: 26px;
}

.temp-high {
  color: #ffb74d;
}

.temp-low {
  color: #4fc3f7;
}

/* 生活指数图标 */
.index-icon {
  width: 36px;
  height: 36px;
  display: inline-block;
  margin-bottom: 8px;
}

.bg-airconditioner {
  background-position: -10px -10px;
}

.bg-allergy {
  background-position: -66px -10px;
}

.bg-carwash {
  background-position: -10px -66px;
}

.bg-chill {
  background-position: -66px -66px;
}

.bg-clothes {
  background-position: -178px -178px;
  height: 34px;
}

.bg-cold {
  background-position: -122px -10px;
}

.bg-diffusion {
  background-position: -122px -66px;
}

.bg-drying {
  background-position: -10px -122px;
}

.bg-fish {
  background-position: -66px -122px;
}

.bg-heatstroke {
  background-position: -122px -122px;
}

.bg-makeup {
  background-position: -178px -10px;
}

.bg-sports {
  background-position: -178px -66px;
}

.bg-sunscreen {
  background-position: -178px -122px;
}

.bg-traffic {
  background-position: -10px -178px;
}

.bg-ultraviolet {
  background-position: -66px -178px;
}

.bg-umbrella {
  background-position: -122px -178px;
}

.index {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.index .item {
  flex: 1 1 calc(25% - 12px);
  min-width: 110px;
  max-width: 160px;
  background: #F9FAFB;
  padding: 18px 12px;
  text-align: center;
  font-size: 12px;
  color: #4B5563;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100px;
}

.index .item span {
  line-height: 1.4;
  margin-bottom: 4px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.index .item p {
  color: #9CA3AF;
  margin-top: auto;
}

.scenic-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(12px, 2vw, 20px);
}

.scenic-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #f9fafb;
  padding: 16px;
  height: 100%;
}

.scenic-item.recommended::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  background-position: -234px -10px;
  z-index: 2;
}

.scenic-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.scenic-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 12px;
  min-height: 120px;
}

.scenic-item .name {
  font-size: 13px;
  color: #374151;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
}

.scenic-item .city {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

/* 全国主要城市 + 友情链接：统一网格排版 */
.grid-link {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px 8px;
}

.grid-link a {
  display: block;
  text-align: center;
  padding: 8px 0;
  color: #374151;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 5em;
}

.grid-link a:hover {
  background: #eef5ff;
  color: #1976d2;
}

.link-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.btn-apply {
  font-size: 12px;
  padding: 2px 6px;
  background: #42a5f6;
  color: #fff;
  border-radius: 4px;
}

.copyright {
  width: 100%;
  text-align: center;
  padding: 16px 20px;
  font-size: 14px;
  color: #9CA3AF;
  margin-top: 10px;
}

.beian-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
  background-position: -234px -98px;
}

/* ======================================
   统一关键字天气背景 + 动画（完整版）
====================================== */
/* 晴 */
.today[weather*="晴"] {
  background: linear-gradient(315deg, #63B4ED, #87CEFA, #B2E5FF);
}
/* 多云 / 阴 */
.today[weather*="云"],
.today[weather*="阴"] {
  background: linear-gradient(315deg, #9CCAE8, #BED8EB, #E0F0FF);
}
/* 雨 */
.today[weather*="雨"] {
  background: linear-gradient(315deg, #5A92D1, #70A1D9, #87B0E0);
}
/* 雪 */
.today[weather*="雪"] {
  background: linear-gradient(315deg, #E2E8F0, #EDF2F7, #F7FAFC);
  color: #4A5568;
}
/* 雾 */
.today[weather*="雾"] {
  background: linear-gradient(315deg, #CBD5E0, #E2E8F0, #EDF2F7);
  color: #4A5568;
}
/* 霾 */
.today[weather*="霾"] {
  background: linear-gradient(315deg, #89949F, #A0AEC0, #CBD5E0);
}
/* 霜 / 霜冻 */
.today[weather*="霜"] {
  background: linear-gradient(315deg, #9CD5F7, #BEE3FF, #E0F0FF);
  color: #2C5282;
}
/* 风 / 沙尘 / 浮尘 */
.today[weather*="风"],
.today[weather*="沙"],
.today[weather*="尘"] {
  background: linear-gradient(315deg, #B0B7C0, #C9CFD6, #D9DDE2);
}
/* 冰雹 */
.today[weather*="雹"] {
  background: linear-gradient(315deg, #A0B6D2, #BECFE4, #D7E2F0);
}
/* 雷 / 雷阵雨 */
.today[weather*="雷"] {
  background: linear-gradient(315deg, #2D3748, #4A5568, #718096);
}

/* 雨滴动画 */
.today[weather*="雨"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(3px 3px at 12% 18%, rgba(255,255,255,0.35), transparent),
    radial-gradient(3px 3px at 30% 52%, rgba(255,255,255,0.33), transparent),
    radial-gradient(3px 3px at 48% 28%, rgba(255,255,255,0.35), transparent),
    radial-gradient(3px 3px at 66% 62%, rgba(255,255,255,0.3), transparent),
    radial-gradient(3px 3px at 84% 38%, rgba(255,255,255,0.32), transparent);
  background-size: 180px 120px;
  opacity: 0.9;
  pointer-events: none;
  animation: rain_big 1.3s linear infinite;
}
@keyframes rain_big {
  0% { background-position: 0 0; }
  100% { background-position: 12px 120px; }
}

/* 下雪动画 */
.today[weather*="雪"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #fff 1.2px, transparent 1.2px);
  background-size: 35px 35px;
  opacity: 0.9;
  pointer-events: none;
  animation: snow 8s linear infinite;
}
@keyframes snow {
  0% { background-position: 0 0; transform: translateY(-100px); }
  100% { background-position: 50px 500px; transform: translateY(0); }
}

/* 闪电 */
.today[weather*="雷"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  z-index: 1;
  pointer-events: none;
  animation: lightning-hard 3.5s infinite;
}
@keyframes lightning-hard {
  0%,82% { background: transparent; }
  83% { background: rgba(255,255,255,.65); }
  84% { background: transparent; }
  86% { background: rgba(255,255,255,.8); }
  87% { background: transparent; }
  100% { background: transparent; }
}

/* 云朵流动 */
.today[weather*="云"]::after,
.today[weather*="阴"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='80' fill='rgba(255,255,255,.15)'%3E%3Ccircle cx='50' cy='40' r='22'%3E%3C/circle%3E%3Ccircle cx='110' cy='40' r='28'%3E%3C/circle%3E%3Ccircle cx='170' cy='40' r='22'%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 300px 80px;
  opacity: .4;
  pointer-events: none;
  animation: cloud 25s linear infinite;
}
@keyframes cloud {
  0%{background-position-x:0}
  100%{background-position-x:-300px}
}

/* 雾 */
.today[weather*="雾"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background:rgba(255,255,255,.2);
  backdrop-filter: blur(3px);
  pointer-events: none;
  animation: fog 12s infinite alternate;
}
@keyframes fog {
  0%{transform:translateX(-6%);opacity:.4}
  100%{transform:translateX(6%);opacity:.7}
}

/* 霾 */
.today[weather*="霾"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(200,200,200,.15);
  backdrop-filter: blur(4px);
  pointer-events: none;
  animation: haze 8s infinite alternate;
}
@keyframes haze {
  0% { opacity: .3; }
  100% { opacity: .6; }
}

/* 霜冻微光 */
.today[weather*="霜"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
  animation: frost 4s infinite alternate ease-in-out;
}
@keyframes frost {
  0% { backdrop-filter: brightness(1); opacity: 0.2; }
  100% { backdrop-filter: brightness(1.15); opacity: 0.4; }
}

/* 风 / 沙尘飘动 */
.today[weather*="风"]::after,
.today[weather*="沙"]::after,
.today[weather*="尘"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(1px);
  pointer-events: none;
  animation: wind 5s infinite alternate ease-in-out;
}
@keyframes wind {
  0% { transform: translateX(-2%); }
  100% { transform: translateX(2%); }
}

/* 沙尘颗粒 */
.today[weather*="沙尘"]::after,
.today[weather*="浮尘"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(200,180,140,.3) .5px, transparent .5px);
  background-size: 30px 30px;
  pointer-events: none;
  animation: dust 7s linear infinite;
}
@keyframes dust {
  0% { background-position: 0 0; }
  100% { background-position: -30px 60px; }
}

/* 冰雹 */
.today[weather*="雹"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.7) 1px, transparent 1px);
  background-size: 22px 22px;
  transform: skewX(-5deg);
  pointer-events: none;
  animation: hail 1.2s linear infinite;
}
@keyframes hail {
  0% { background-position: 0 0; }
  100% { background-position: 22px 100px; }
}

/* 晴天光晕 */
.today[weather*="晴"]::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  top: -60px;
  right: -60px;
  background: radial-gradient(circle, rgba(255,255,255,.25), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  animation: sun-glow 6s infinite alternate ease-in-out;
}
@keyframes sun-glow {
  0% { transform: scale(1); opacity: .4; }
  100% { transform: scale(1.15); opacity: .2; }
}

/* 温度渐入 */
@keyframes tempIn {
  0%{opacity:0;transform:translateY(10px)}
  100%{opacity:1;transform:translateY(0)}
}

/* 图标呼吸 */
@keyframes breath {
  0%{transform:scale(1)}
  100%{transform:scale(1.06)}
}

@media (max-width: 480px) {
  .days .hide-mobile {
    display: none;
  }

  .head img {
    height: 40px;
  }

  .hours-table {
    min-width: 100%;
    font-size: 12px;
  }

  .hours-table th,
  .hours-table td {
    padding: 6px 4px;
  }

  .card {
    padding: 16px 12px;
  }

  .scenic {
    padding: 20px 12px;
  }

  .nearby {
    padding: 16px 12px;
  }

  .encyclopedia-content {
    flex-direction: column;
    gap: 12px;
  }

  .encyclopedia-img {
    flex: 0 0 100px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .scenic-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .scenic-item {
    padding: 12px !important;
  }

  .scenic-item img {
    min-height: 90px !important;
  }
}