:root {
  --bg: #f5efdf;
  --panel: rgba(252, 249, 242, 0.86);
  --panel-strong: rgba(255, 252, 246, 0.98);
  --panel-border: rgba(15, 77, 88, 0.13);
  --ink: #15343a;
  --muted: #53686d;
  --teal: #0f7b82;
  --teal-deep: #0a5963;
  --sun: #f28d35;
  --sky: #7ec8d6;
  --cream: #fff6ea;
  --shadow: 0 30px 70px rgba(18, 41, 53, 0.15);
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-display: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(242, 141, 53, 0.18), transparent 28%),
    radial-gradient(circle at right 18%, rgba(126, 200, 214, 0.24), transparent 34%),
    linear-gradient(140deg, #f8f0dd 0%, #f6ead7 45%, #eef6f4 100%);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 52, 58, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 52, 58, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), transparent 94%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 55%);
  pointer-events: none;
}

.page-glow {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(54px);
  opacity: 0.55;
  pointer-events: none;
  animation: float-glow 12s ease-in-out infinite;
}

.page-glow-left {
  top: -12rem;
  left: -8rem;
  background: rgba(242, 141, 53, 0.22);
}

.page-glow-right {
  right: -12rem;
  bottom: -16rem;
  background: rgba(15, 123, 130, 0.22);
  animation-delay: -4s;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: grid;
  grid-template-columns: 1.06fr 1.42fr;
  gap: 1.2rem;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.46);
  pointer-events: none;
}

.control-panel,
.report-panel,
.forecast-panel {
  padding: 1.6rem;
}

.control-panel {
  min-height: 420px;
}

.control-panel::before,
.report-panel::before,
.forecast-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
}

.forecast-panel {
  grid-column: 1 / -1;
}

.eyebrow,
.mini-label,
.status-pill,
.forecast-note,
.field-label,
.signal-title {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow,
.mini-label,
.field-label,
.forecast-note {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.section-note {
  font-size: 0.82rem;
  color: var(--muted);
}

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

h1,
h2,
h3,
#temperature,
.signal-city,
.stat-value,
.forecast-high {
  font-family: var(--font-display);
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.65rem, 4vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0.03em;
}

h2 {
  margin-bottom: 0.3rem;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
}

.intro,
.voice-copy,
.summary,
.forecast-note {
  color: var(--muted);
  line-height: 1.7;
}

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.58rem 0.92rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 123, 130, 0.09);
  color: var(--teal-deep);
  font-size: 0.9rem;
  box-shadow: 0 12px 24px rgba(18, 41, 53, 0.06);
}

.city-form {
  margin-top: 1.7rem;
}

.field-row,
.action-row,
.section-title-row {
  display: flex;
  gap: 0.75rem;
}

.field-row {
  margin-top: 0.6rem;
}

.action-row {
  margin-top: 0.95rem;
}

.section-title-row {
  align-items: center;
  justify-content: space-between;
}

input {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(10, 89, 99, 0.14);
  border-radius: 18px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

input:focus {
  outline: 2px solid rgba(15, 123, 130, 0.14);
  border-color: var(--teal);
}

button {
  border: 0;
  border-radius: 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.primary-btn,
.secondary-btn,
.quick-pick,
.saved-chip,
.remove-chip {
  padding: 0.95rem 1.2rem;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  box-shadow: 0 18px 34px rgba(15, 123, 130, 0.24);
}

.secondary-btn,
.saved-chip,
.remove-chip,
.quick-pick {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(10, 89, 99, 0.08);
  box-shadow: 0 12px 22px rgba(18, 41, 53, 0.06);
}

.quick-pick:hover,
.saved-chip:hover,
.remove-chip:hover,
.secondary-btn:hover {
  border-color: rgba(15, 123, 130, 0.16);
}

.utility-btn {
  flex: 1;
}

.utility-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--sun), #d7651e);
  box-shadow: 0 14px 30px rgba(215, 101, 30, 0.24);
}

.chip-section {
  margin-top: 1.25rem;
}

.chip-list,
.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.saved-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.remove-chip {
  padding: 0.55rem 0.8rem;
  color: var(--teal-deep);
  background: rgba(15, 123, 130, 0.08);
}

.empty-chip {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  font-size: 0.92rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(10, 89, 99, 0.12);
}

.voice-box {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1.6rem;
  padding: 1.08rem 1.15rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(126, 200, 214, 0.22));
  border: 1px solid rgba(15, 123, 130, 0.08);
}

.report-panel {
  background:
    radial-gradient(circle at top right, rgba(126, 200, 214, 0.28), transparent 32%),
    radial-gradient(circle at bottom left, rgba(242, 141, 53, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.52)),
    var(--panel);
}

.report-topline,
.forecast-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.status-pill {
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--teal-deep);
  background: rgba(15, 123, 130, 0.12);
  border: 1px solid rgba(15, 123, 130, 0.08);
}

.hero-weather {
  display: grid;
  grid-template-columns: 1.24fr 0.92fr;
  gap: 1rem;
  align-items: stretch;
  margin-top: 1.35rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.4rem 0;
}

.condition {
  margin-bottom: 0.6rem;
  font-size: 1.04rem;
  color: var(--teal-deep);
}

.temperature-line {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

#temperature {
  font-size: clamp(4.1rem, 9vw, 7.4rem);
  font-weight: 700;
  line-height: 0.9;
}

.temperature-unit {
  font-size: 1.8rem;
  color: var(--muted);
}

.signal-card {
  position: relative;
  min-height: 255px;
  border-radius: 28px;
  padding: 1.35rem;
  color: #f7fffe;
  background: linear-gradient(155deg, #14909b 0%, #0d5964 56%, #0c4650 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 18px 40px rgba(10, 62, 68, 0.22);
}

.signal-card::before {
  content: "";
  position: absolute;
  inset: auto -18% -28% auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 64%);
}

.signal-ring {
  position: absolute;
  inset: 14% auto auto 50%;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  transform: translateX(-50%);
  animation: pulse-ring 3.4s ease-in-out infinite;
}

.signal-ring::before,
.signal-ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.signal-ring::after {
  inset: 30px;
}

.signal-title,
.signal-city,
.signal-subtitle {
  position: relative;
  z-index: 1;
}

.signal-title {
  margin-top: 8.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  opacity: 0.84;
}

.signal-city {
  margin-bottom: 0.25rem;
  font-size: 2rem;
  font-weight: 700;
}

.signal-subtitle {
  margin-bottom: 0;
  opacity: 0.8;
}

.stats-grid,
.forecast-grid {
  display: grid;
  gap: 0.95rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.stat-card,
.forecast-card {
  position: relative;
  border-radius: 24px;
  padding: 1.05rem;
  background: var(--panel-strong);
  border: 1px solid rgba(10, 89, 99, 0.08);
  box-shadow: 0 16px 30px rgba(18, 41, 53, 0.06);
}

.stat-card::before,
.forecast-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, rgba(15, 123, 130, 0.95), rgba(242, 141, 53, 0.7));
}

.stat-label,
.forecast-day,
.forecast-code,
.forecast-meta {
  color: var(--muted);
}

.stat-label,
.forecast-meta {
  font-size: 0.9rem;
}

.stat-value {
  margin-bottom: 0;
  font-size: 1.62rem;
  font-weight: 700;
}

.forecast-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.forecast-card {
  min-height: 195px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.forecast-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 34px rgba(18, 41, 53, 0.08);
}

.forecast-day {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-code {
  margin-bottom: 0.8rem;
  font-size: 1.16rem;
  color: var(--ink);
  font-weight: 700;
}

.forecast-temp-row {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.9rem;
}

.forecast-high {
  font-size: 2rem;
  font-weight: 700;
}

.forecast-low {
  font-size: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: slide-up 700ms ease forwards;
}

.reveal-delay-1 {
  animation-delay: 80ms;
}

.reveal-delay-2 {
  animation-delay: 180ms;
}

.reveal-delay-3 {
  animation-delay: 280ms;
}

@keyframes slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-glow {
  50% {
    transform: translateY(18px) scale(1.04);
  }
}

@keyframes pulse-ring {
  50% {
    transform: translateX(-50%) scale(1.04);
    opacity: 0.92;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero-weather {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top, rgba(242, 141, 53, 0.2), transparent 30%),
      linear-gradient(180deg, #f5e9d8 0%, #eef5f3 100%);
  }

  .app-shell {
    width: min(100% - 1rem, 100%);
    padding: 0.85rem 0 1.4rem;
    gap: 0.9rem;
  }

  .control-panel,
  .report-panel,
  .forecast-panel {
    padding: 1.05rem;
    border-radius: 24px;
  }

  .report-panel {
    order: -1;
  }

  .field-row,
  .action-row,
  .voice-box,
  .report-topline,
  .forecast-header,
  .section-title-row {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .quick-pick,
  .saved-chip,
  .remove-chip,
  .utility-btn {
    width: 100%;
  }

  .stats-grid,
  .forecast-grid {
    grid-template-columns: 1fr;
  }

  .signal-card {
    min-height: 220px;
  }

  .voice-box {
    position: sticky;
    bottom: 0.5rem;
    z-index: 4;
    background: linear-gradient(135deg, rgba(255, 251, 245, 0.96), rgba(126, 200, 214, 0.34));
    box-shadow: 0 20px 40px rgba(18, 41, 53, 0.16);
  }

  .chip-list {
    gap: 0.55rem;
  }

  h1 {
    font-size: 2.45rem;
  }

  #temperature {
    font-size: 4.2rem;
  }
}
