/* ============ 伴你 · 小妮 —— 萌系粉色主题 ============ */
:root {
  --pink: #ff8fab;
  --pink-strong: #ff5c8a;
  --pink-deep: #e8457a;
  --pink-light: #ffc2d1;
  --pink-pale: #fff0f4;
  --cream: #fffaf8;
  --lavender: #c3a7e8;
  --mint: #8fd6bb;
  --text: #5a4650;
  --text-light: #a08995;
  --white: #ffffff;
  --shadow: 0 12px 32px rgba(255, 122, 162, 0.14);
  --shadow-soft: 0 6px 18px rgba(255, 122, 162, 0.10);
  --radius: 24px;
  --red: #e64545;   /* 涨 */
  --green: #23a566; /* 跌 */
  --font-title: "ZCOOL KuaiLe", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, #ffe9f1 0%, transparent 55%),
    radial-gradient(1000px 600px at -10% 10%, #f3edff 0%, transparent 50%),
    linear-gradient(180deg, #fffaf8 0%, #fff3f7 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- 飘浮装饰 ---------- */
.floating-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.floating-decor span { position: absolute; font-size: 22px; opacity: 0.35; animation: floaty 6s ease-in-out infinite; }
.floating-decor .heart:nth-child(1) { top: 12%; left: 6%; animation-delay: 0s; }
.floating-decor .star:nth-child(2) { top: 24%; right: 8%; animation-delay: 1.2s; }
.floating-decor .heart:nth-child(3) { top: 58%; left: 4%; animation-delay: 2.1s; }
.floating-decor .star:nth-child(4) { top: 72%; right: 5%; animation-delay: 0.6s; }
.floating-decor .heart:nth-child(5) { top: 40%; right: 3%; animation-delay: 1.8s; }
.floating-decor .star:nth-child(6) { top: 84%; left: 10%; animation-delay: 2.6s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-18px) rotate(4deg); }
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 143, 171, 0.14);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, #ffd3e0, #ffb3c6);
  box-shadow: var(--shadow-soft);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--font-title); font-size: 22px; color: var(--pink-strong); }
.logo-text em { font-style: normal; font-size: 11px; color: var(--text-light); }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none; color: var(--text); font-weight: 500; font-size: 15px;
  position: relative; padding: 4px 0; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; width: 0; height: 3px;
  background: var(--pink); border-radius: 3px; transform: translateX(-50%); transition: width .25s;
}
.nav-links a:hover { color: var(--pink-strong); }
.nav-links a:hover::after { width: 100%; }

.nav-chat-btn {
  border: none; cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: 14px;
  padding: 10px 20px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, #ff9eb8, #ff5c8a);
  box-shadow: 0 6px 16px rgba(255, 92, 138, 0.35);
  transition: transform .18s, box-shadow .18s;
}
.nav-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 92, 138, 0.42); }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; }
.hero-inner {
  max-width: 1160px; margin: 0 auto; padding: 56px 24px 40px;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center;
}

.hero-left { display: flex; flex-direction: column; align-items: center; }
.character-wrap { position: relative; }
.character-glow {
  position: absolute; inset: 18% 8% 6%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 143, 171, 0.35), transparent 68%);
  filter: blur(10px); animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }

.character { width: 280px; height: auto; position: relative; z-index: 1; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.character .eyes { transform-origin: center; animation: blink 4.5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95%, 97% { transform: scaleY(0.08); } }

.hero-bubble {
  position: relative; margin-top: 18px; max-width: 300px;
  background: #fff; padding: 14px 18px; border-radius: 18px;
  box-shadow: var(--shadow-soft); font-size: 15px; line-height: 1.5;
}
.hero-bubble .bubble-tip {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 16px; height: 16px; background: #fff;
}

.hero-title {
  font-family: var(--font-title); font-size: 46px; line-height: 1.28; color: var(--text);
  margin-bottom: 14px;
}
.hero-title .accent { color: var(--pink-strong); position: relative; }
.hero-title .accent::after {
  content: ""; position: absolute; left: 0; bottom: 4px; width: 100%; height: 12px;
  background: rgba(255, 143, 171, 0.28); border-radius: 8px; z-index: -1;
}
.hero-sub { font-size: 16px; color: var(--text-light); line-height: 1.8; margin-bottom: 26px; }

/* AI 搜索框 */
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 999px; padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow); border: 2px solid rgba(255, 143, 171, 0.28);
  transition: border-color .2s, box-shadow .2s; max-width: 560px;
}
.search-box:focus-within { border-color: var(--pink); box-shadow: 0 14px 34px rgba(255, 122, 162, 0.22); }
.search-icon { font-size: 18px; }
.search-box input { flex: 1; border: none; outline: none; font-size: 15px; font-family: var(--font-body); color: var(--text); background: transparent; }
.search-box input::placeholder { color: #cbb7c1; }
.search-btn {
  border: none; cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: 14px;
  padding: 10px 24px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, #ff9eb8, #ff5c8a);
  transition: transform .15s;
}
.search-btn:hover { transform: scale(1.04); }

.search-suggest { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-light); }
.chip {
  border: 1.5px solid rgba(255, 143, 171, 0.35); background: #fff; color: var(--pink-deep);
  font-family: var(--font-body); font-size: 13px; padding: 6px 14px; border-radius: 999px;
  cursor: pointer; transition: background .18s, color .18s;
}
.chip:hover { background: var(--pink-pale); color: var(--pink-deep); }

.hero-trust { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-trust span {
  font-size: 13px; color: var(--pink-deep); background: var(--pink-pale);
  padding: 6px 14px; border-radius: 999px;
}

/* ---------- 功能卡片区 ---------- */
.features { position: relative; z-index: 1; padding: 40px 24px 70px; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-family: var(--font-title); font-size: 32px; color: var(--text); }
.section-head p { color: var(--text-light); margin-top: 8px; }

.card-grid {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.card {
  background: #fff; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-soft); border: 1px solid rgba(255, 143, 171, 0.08);
  transition: transform .22s, box-shadow .22s; position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  border-radius: 0 0 10px 10px;
}
.weather-card::before { background: linear-gradient(90deg, #8fd6bb, #a8e6cf); }
.news-card::before { background: linear-gradient(90deg, #c3a7e8, #d9c4f5); }
.finance-card::before { background: linear-gradient(90deg, #ff9eb8, #ffc2d1); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; }
.weather-icon { background: #eafaf3; }
.news-icon { background: #f3edff; }
.finance-icon { background: #fff0f4; }
.card-title h3 { font-size: 18px; font-weight: 700; }
.card-badge {
  display: inline-block; font-size: 11px; color: var(--pink-deep);
  background: var(--pink-pale); padding: 2px 10px; border-radius: 999px; margin-top: 3px;
}

/* 天气 */
.weather-city-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.weather-city { font-size: 17px; font-weight: 700; }
.city-switch {
  border: 1.5px solid rgba(255, 143, 171, 0.35); background: #fff; color: var(--pink-deep);
  font-size: 12px; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-family: var(--font-body);
}
.city-switch:hover { background: var(--pink-pale); }
.weather-main { display: flex; align-items: center; gap: 12px; }
.weather-temp { font-size: 52px; font-weight: 700; color: var(--text); }
.weather-emoji { font-size: 46px; }
.weather-desc { color: var(--text-light); margin: 4px 0 16px; }
.weather-meta { display: flex; gap: 10px; }
.meta-item {
  flex: 1; text-align: center; background: var(--cream); border-radius: 12px; padding: 10px 6px;
}
.meta-item span { display: block; font-size: 12px; color: var(--text-light); margin-bottom: 3px; }
.meta-item b { font-size: 14px; }

.city-picker {
  margin-top: 14px; padding: 10px; background: var(--pink-pale); border-radius: 14px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.city-option {
  border: 1px solid rgba(255, 143, 171, 0.3); background: #fff; color: var(--text);
  font-size: 13px; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-family: var(--font-body);
}
.city-option:hover, .city-option.active { background: var(--pink); color: #fff; border-color: var(--pink); }

/* 新闻列表 */
.news-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.news-list li { border-bottom: 1px dashed rgba(255, 143, 171, 0.18); padding-bottom: 12px; cursor: pointer; }
.news-list li:last-child { border-bottom: none; padding-bottom: 0; }
.news-item-title { font-size: 14.5px; font-weight: 500; line-height: 1.5; transition: color .18s; }
.news-list li:hover .news-item-title { color: var(--pink-deep); }
.news-item-meta { display: flex; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--text-light); }
.news-tag { color: #fff; background: var(--lavender); padding: 1px 8px; border-radius: 6px; font-size: 11px; }

/* 财经列表 */
.finance-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.finance-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 12px; background: var(--cream);
}
.finance-name { font-size: 14px; font-weight: 600; }
.finance-code { font-size: 11px; color: var(--text-light); margin-left: 4px; }
.finance-val { text-align: right; }
.finance-price { font-size: 15px; font-weight: 700; display: block; }
.finance-change { font-size: 12px; }
.up { color: var(--red); }
.down { color: var(--green); }
.finance-note { margin-top: 14px; font-size: 12px; color: var(--text-light); text-align: center; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 28px; color: var(--text-light); font-size: 13px; position: relative; z-index: 1; }

/* ---------- 浮动聊天窗口 ---------- */
.chat-launcher {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 64px; height: 64px; border-radius: 50%; cursor: pointer;
  background: #fff; box-shadow: 0 10px 26px rgba(255, 92, 138, 0.32);
  display: grid; place-items: center; transition: transform .2s;
}
.chat-launcher:hover { transform: scale(1.08); }
.chat-launcher svg { width: 56px; height: 56px; }
.launcher-dot {
  position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #3ddc84; border: 3px solid #fff;
}

.chat-panel {
  position: fixed; right: 26px; bottom: 104px; z-index: 60;
  width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: 70vh;
  background: #fff; border-radius: 22px; box-shadow: 0 18px 48px rgba(255, 92, 138, 0.28);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255, 143, 171, 0.15);
  animation: pop .28s ease;
}
@keyframes pop { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: linear-gradient(135deg, #ff9eb8, #ff5c8a); color: #fff;
}
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-header-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 20px; }
.chat-header-info strong { display: block; font-size: 16px; }
.chat-header-info em { font-style: normal; font-size: 11px; opacity: .9; }
.chat-close { border: none; background: transparent; color: #fff; font-size: 18px; cursor: pointer; }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--pink-pale); }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.msg.bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: var(--shadow-soft); }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, #ff9eb8, #ff5c8a); color: #fff; border-bottom-right-radius: 4px; }
.msg.typing::after { content: "…"; animation: dots 1.2s infinite; }
@keyframes dots { 0% { content: ""; } 33% { content: "…"; } 66% { content: "…"; } }

.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; background: #fff; border-top: 1px solid rgba(255,143,171,.12); }
.chat-chip {
  border: 1.5px solid rgba(255, 143, 171, 0.35); background: #fff; color: var(--pink-deep);
  font-size: 12px; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-family: var(--font-body);
}
.chat-chip:hover { background: var(--pink-pale); }
.chat-input-row { display: flex; gap: 8px; padding: 12px 14px; background: #fff; }
.chat-input-row input {
  flex: 1; border: 1.5px solid rgba(255, 143, 171, 0.3); border-radius: 999px;
  padding: 10px 16px; font-size: 14px; font-family: var(--font-body); outline: none;
}
.chat-input-row input:focus { border-color: var(--pink); }
.chat-input-row button {
  border: none; cursor: pointer; padding: 10px 18px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, #ff9eb8, #ff5c8a); font-weight: 600; font-size: 14px; font-family: var(--font-body);
}

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-title { font-size: 36px; }
  .search-box { margin: 0 auto; }
  .search-suggest { justify-content: center; }
  .hero-trust { justify-content: center; }
  .card-grid { grid-template-columns: 1fr; max-width: 560px; }
  .nav-links { display: none; }
}
