/* ============================================================
   设计参考：tencent.com/zh-cn
   语言：大幅圆角图窗 / 巨大标题压在图上 / 极简导航 / 海量留白
   适配：中文移动端，保持聊天的可用性
   ============================================================ */

:root {
  --blue: #0052d9;
  --blue-deep: #003cab;
  --blue-light: #2e7bff;
  --navy: #061f52;
  --blue-50: #edf4ff;

  --ink: #0b1a33;
  --ink-2: #3d4e6b;
  --mute: #6b7c99;

  --line: #e5ebf3;
  --soft: #f5f8fd;

  --r-panel: 20px;
  --r-card: 16px;
  --r-mock: 12px;
  --r-input: 12px;
  --r-pill: 9999px;

  --font: -apple-system, "SF Pro SC", "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;

  --composer-h: 120px;

  /* 兼容旧命名：后台 admin.css 还在用 v1 的 token 名 */
  --primary: var(--blue);
  --primary-deep: var(--blue-deep);
  --hairline: var(--line);
  --canvas-soft: var(--soft);
  --ink-mute: var(--mute);
  --radius-sm: 8px;
  --radius-lg: var(--r-card);
  --shadow-1: 0 1px 3px rgba(6, 31, 82, 0.06);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

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

img { max-width: 100%; display: block; }

.shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- 导航 ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 60px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
  max-width: 42vw;
}

.nav-user img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
  flex: 0 0 auto;
}

.nav-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--mute);
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}

.link-btn:hover { color: var(--blue); }

.brand {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.nav-links {
  display: none;
  gap: 26px;
  margin-left: 26px;
  flex: 1;
}

.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--blue); }

@media (min-width: 720px) {
  .nav-links { display: flex; }
}

/* ---------------- 按钮 ---------------- */

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  transition: background 0.16s, color 0.16s, border-color 0.16s, transform 0.06s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: default; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }

.btn-outline {
  background: transparent;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.btn-outline:hover { background: var(--blue-50); }

.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: #eef4ff; }

.btn-ghost-white {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(4px);
}
.btn-ghost-white:hover { background: rgba(255, 255, 255, 0.16); }

.btn-sm { font-size: 13px; padding: 9px 16px; }
.btn-block { width: 100%; padding: 15px 20px; }

/* ---------------- Hero ---------------- */

.hero-wrap { padding: 8px 12px 0; }

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-panel);
  min-height: 500px;
  display: flex;
  align-items: stretch;
  padding: 26px 24px 30px;
  color: #fff;
  background:
    radial-gradient(120% 85% at 88% -6%, #4b93ff 0%, rgba(75, 147, 255, 0) 55%),
    radial-gradient(90% 70% at -10% 108%, #07225c 0%, rgba(7, 34, 92, 0) 62%),
    linear-gradient(158deg, #061f52 0%, #0a3a9e 48%, #0052d9 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 72% 18%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 72% 18%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(130, 195, 255, 0.55) 0%, rgba(130, 195, 255, 0) 68%);
  filter: blur(6px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
}

/* 上方留白是有意的：标签在上，主张压在下，中间让渐变呼吸 */
.hero-bottom { margin-top: auto; }

.hero-eyebrow {
  align-self: flex-start;
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.4px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 8.4vw, 44px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0.005em;
  text-shadow: 0 2px 24px rgba(3, 20, 60, 0.28);
}

.hero-sub {
  margin: 0 0 26px;
  font-size: 14.5px;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.82);
  max-width: 30em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (min-width: 720px) {
  .hero-panel { min-height: 600px; padding: 48px 44px 52px; }
  .hero-sub { font-size: 16px; }
}

/* ---------------- 数字条 ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 20px 6px;
}

.stat {
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat:last-child { border-right: none; }

.stat b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  font-size: 12px;
  color: var(--mute);
  margin-top: 2px;
}

/* ---------------- 通用区块 ---------------- */

.sec {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 8px;
  scroll-margin-top: 72px;
}

.sec-head { margin-bottom: 24px; }

.sec-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.3;
}

.sec-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--mute);
  max-width: 34em;
}

/* ---------------- 三张卡 ---------------- */

.cards {
  display: grid;
  gap: 12px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px 20px;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.card:hover {
  border-color: #c9d8f0;
  box-shadow: 0 8px 28px rgba(9, 40, 100, 0.07);
  transform: translateY(-2px);
}

.card-n {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--mute);
}

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------- 蓝色横幅 + 终端 ---------------- */

.band {
  margin-top: 52px;
  background: var(--blue-50);
  padding: 48px 20px;
  scroll-margin-top: 72px;
}

.band-inner {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 26px;
  align-items: center;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: #fff;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 16px;
}

.band h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.35;
}

.band-text p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
}

.band-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.mock {
  background: #0b1a33;
  border-radius: var(--r-mock);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(6, 31, 82, 0.22);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
}

.mock-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.mock-bar em {
  font-style: normal;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock pre {
  margin: 0;
  padding: 16px 14px 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.85;
  color: #c9d8f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 720px) {
  .band-inner { grid-template-columns: 1fr 1.05fr; }
}

/* ---------------- 登录门禁 ---------------- */

.gate { padding: 4px 0 28px; }

.gate-card {
  background: var(--blue-50);
  border: 1px solid #d8e6ff;
  border-radius: var(--r-card);
  padding: 28px 22px 24px;
  text-align: center;
}

.gate-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.gate-card p {
  margin: 0 auto 20px;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--ink-2);
  max-width: 30em;
}

.gate-card .btn { margin: 0 4px 10px; }

.gate-tip {
  font-size: 12px !important;
  color: var(--mute) !important;
  margin: 6px 0 0 !important;
  min-height: 17px;
}

/* ---------------- 对话区 ---------------- */

.chat-sec {
  padding-bottom: 40px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chip {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.2;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 15px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }

.thread { padding-top: 4px; }

.msg {
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  animation: rise 0.26s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.msg-user { align-items: flex-end; }

.msg-user .bubble {
  background: var(--blue);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  max-width: 86%;
  font-size: 15px;
  line-height: 1.6;
  box-shadow: 0 6px 18px rgba(0, 82, 217, 0.18);
}

.msg-ai .bubble {
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 16px 16px 16px 4px;
  padding: 16px 16px 8px;
  max-width: 100%;
  font-size: 15px;
  line-height: 1.78;
}

.bubble p { margin: 0 0 10px; }
.bubble strong { font-weight: 600; }

.sec-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--blue-deep);
  margin: 16px 0 6px;
}

.sec-title:first-child { margin-top: 0; }

.msg-ai .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dbe8ff;
  color: var(--blue-deep);
  font-size: 11px;
  margin-right: 7px;
  vertical-align: 1px;
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--blue);
  border-radius: 1px;
  vertical-align: -2px;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------------- 线索卡 ---------------- */

.lead-card {
  background: var(--blue-50);
  border: 1px solid #d8e6ff;
  border-radius: var(--r-card);
  padding: 24px 22px;
  margin: 10px 0 24px;
}

.lead-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.lead-card p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------------- 输入区 ---------------- */

.composer-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 10px 0 calc(8px + env(safe-area-inset-bottom));
}

.attach-row { padding-bottom: 8px; }

.composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.attach-btn {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.attach-btn:hover { border-color: var(--blue); background: var(--blue-50); }
.attach-btn:disabled { opacity: 0.5; cursor: default; }

.composer textarea {
  flex: 1;
  resize: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 12px 14px;
  max-height: 132px;
  min-height: 46px;
  overflow: hidden;
  outline: none;
  transition: border-color 0.15s;
}

.composer textarea:focus { border-color: var(--blue); }

.composer .btn {
  height: 46px;
  padding: 0 22px;
}

.status {
  font-size: 12px;
  color: var(--mute);
  height: 16px;
  padding-top: 6px;
}

/* ---------------- 文件 chip ---------------- */

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  background: var(--blue-50);
  border: 1px solid #d8e6ff;
  border-radius: var(--r-pill);
  padding: 7px 6px 7px 13px;
  font-size: 12px;
  color: var(--ink-2);
}

.file-chip .fname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 46vw;
}

.file-chip .fmeta { color: var(--mute); white-space: nowrap; }
.file-chip .fmeta.ok { color: #1a7f5a; }
.file-chip .fmeta.bad { color: #c02b4a; }

.file-chip .x {
  border: none;
  background: none;
  color: var(--mute);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 6px;
}

.msg .bubble .att {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.9;
}

/* ---------------- 页脚 ---------------- */

.foot {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 40px 20px calc(var(--composer-h) + 32px);
  margin-top: 24px;
}

.foot-inner {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 16px;
}

.foot-brand {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.foot-brand strong { font-size: 15px; font-weight: 600; }

.foot-brand p {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--mute);
}

.foot-col h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.foot-col a {
  display: block;
  font-size: 13px;
  color: var(--mute);
  margin-bottom: 8px;
  transition: color 0.15s;
}

.foot-col a:hover { color: var(--blue); }

.foot-legal {
  max-width: 760px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--mute);
  line-height: 1.8;
}

.foot-legal p { margin: 0; }

@media (min-width: 720px) {
  .foot-inner { grid-template-columns: 2fr 1fr 1fr; }
  .foot-brand { grid-column: auto; }
}

/* ---------------- 弹窗 ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 31, 82, 0.42);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 24px 60px rgba(6, 31, 82, 0.28);
  animation: rise 0.26s ease both;
}

@media (min-width: 640px) {
  .modal-card { border-radius: var(--r-panel); padding-bottom: 24px; }
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--mute);
  cursor: pointer;
}

.modal-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.modal-sub {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--mute);
}

.field { display: block; margin-bottom: 14px; }

.field span {
  display: block;
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
  resize: vertical;
}

.field input:focus,
.field textarea:focus { border-color: var(--blue); }

.fine {
  font-size: 11px;
  color: var(--mute);
  text-align: center;
  margin: 12px 0 0;
}

.modal-done { text-align: center; padding: 28px 0 12px; }

.done-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 22px;
  line-height: 44px;
}
