/* ============================================================
   LLM RELAY —— 各表面布局: landing / console / chat / docs
   ============================================================ */

/* ==================== Landing(deepseek.com 式) ==================== */
.landing { min-height: 100vh; display: flex; flex-direction: column; }

/* hero: 顶渐变 + canvas 粒子 */
.hero-zone { position: relative; overflow: hidden; }
.hero-zone .hero-grad {
  position: absolute; inset: 0;
  background: var(--hero-grad);
  pointer-events: none;
}
.hero-zone canvas { position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; }

.newsbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 26px auto 0; max-width: 640px;
  padding: 9px 18px; border-radius: var(--r-pill);
  background: var(--brand-tint); border: 1px solid var(--brand-tint-2);
  font-size: 13.5px; color: var(--fg-2);
  text-align: center;
}
.newsbar b { color: var(--brand); font-weight: 600; }

.hero { position: relative; z-index: 2; text-align: center; padding: 54px 24px 30px; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 52px);
  font-weight: 500; letter-spacing: -.015em;
  line-height: 1.18; margin: 0 auto 14px; max-width: 780px;
}
.hero .hero-sub { font-size: 17px; color: var(--fg-2); max-width: 600px; margin: 0 auto; }

/* hero 输入卡(玻璃, radius 24) */
.hero-input {
  max-width: 700px; margin: 30px auto 0;
  background: color-mix(in srgb, var(--bg-2) 78%, transparent);
  border: 1px solid var(--card-border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  overflow: hidden; text-align: left;
}
.hero-input textarea {
  display: block; width: 100%; border: none; background: none; resize: none;
  min-height: 80px; max-height: 300px; padding: 18px 20px 6px;
  font-size: 15.5px; line-height: 1.6; color: var(--fg); outline: none;
}
.hero-input .hero-input-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px 12px;
}
.hero-input .mini-note { font-size: 12px; color: var(--fg-3); margin-left: auto; padding-right: 6px; }

.hero-cta { display: flex; gap: 12px; justify-content: center; margin: 22px 0 8px; flex-wrap: wrap; }

/* 模型 chips 行 */
.model-chips { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.model-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: var(--r-l);
  border: 1px solid var(--card-border); background: var(--bg-2);
  font-size: 13.5px; text-align: left; cursor: pointer;
  transition: all .15s; color: var(--fg); text-decoration: none !important;
}
.model-chip:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.model-chip .mc-name { font-weight: 600; font-size: 14px; }
.model-chip .mc-meta { font-size: 12px; color: var(--fg-3); }
.model-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.model-chip .tag-hot {
  font-size: 10.5px; font-weight: 600; color: var(--brand);
  background: var(--brand-tint); padding: 2px 7px; border-radius: var(--r-pill);
}

/* 特性卡 */
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; padding: 40px 24px 8px; max-width: 1280px; margin: 0 auto; width: 100%; }
.feat { padding: 22px; }
.feat .fi { width: 40px; height: 40px; border-radius: var(--r-m);
  background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 14px; }
.feat h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 600; }
.feat p { margin: 0; font-size: 14px; color: var(--fg-2); line-height: 1.65; }

/* 区块标题 */
.sec { max-width: 1280px; margin: 0 auto; padding: 56px 24px 0; width: 100%; }
.sec-head { text-align: center; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 500; letter-spacing: -.01em; margin: 0 0 8px; }
.sec-head p { color: var(--fg-2); margin: 0; font-size: 15.5px; }

/* 价格卡 */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; padding: 0 0 8px; }
.price-card { position: relative; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.price-card.hot { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.price-card .pc-badge { position: absolute; top: -11px; left: 20px;
  background: var(--brand); color: var(--on-brand); font-size: 11.5px; font-weight: 600;
  padding: 3px 11px; border-radius: var(--r-pill); }
.price-card h3 { margin: 0; font-size: 17px; font-weight: 600; }
.price-card .pc-ctx { font-size: 12.5px; color: var(--fg-3); }
.price-card .pc-price { font-size: 14px; line-height: 1.9; color: var(--fg-2); }
.price-card .pc-price b { color: var(--fg); font-weight: 600; }
.price-card p { margin: 0; font-size: 13px; color: var(--fg-2); flex: 1; }
.price-note { text-align: center; font-size: 12.5px; color: var(--fg-3); margin-top: 12px; }

/* 双栏: 文字 + 代码卡 */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.split h3 { font-size: 24px; font-weight: 500; margin: 0 0 10px; letter-spacing: -.01em; }
.split p { color: var(--fg-2); margin: 8px 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* footer */
.foot { margin-top: 64px; border-top: 1px solid var(--card-border); background: var(--bg-3); }
.foot .container { padding: 40px 24px 26px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; }
.foot h4 { font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.foot a { display: block; color: var(--fg-2); font-size: 13.5px; padding: 3px 0; }
.foot a:hover { color: var(--brand); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--card-border); font-size: 12.5px; color: var(--fg-3); }

/* ==================== Console(platform 式) ==================== */
.console { display: flex; min-height: 100vh; }
.console-main { flex: 1; min-width: 0; padding: 28px 30px 60px; }
.console-main > h1 { font-size: 24px; font-weight: 500; margin: 0 0 4px; letter-spacing: -.01em; }
.console-main > .desc { color: var(--fg-2); margin: 0 0 22px; font-size: 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.tile { padding: 18px; }
.tile .t-label { font-size: 13px; color: var(--fg-2); margin: 0 0 6px; }
.tile .t-value { font-size: 26px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.tile .t-sub { font-size: 12.5px; color: var(--fg-3); margin-top: 4px; }

/* 登录卡片 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background:
    radial-gradient(600px 400px at 20% -10%, var(--brand-tint-2), transparent),
    radial-gradient(500px 400px at 110% 110%, var(--brand-tint), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-2);
  border: 1px solid var(--card-border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 30px 28px 26px; }
.auth-card .auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-legal { font-size: 12px; color: var(--fg-3); text-align: center; margin: 14px 0 0; line-height: 1.6; }
.auth-err { background: var(--err-tint); color: var(--err); font-size: 13px;
  border-radius: var(--r-s); padding: 8px 12px; margin-bottom: 4px; }

/* 用量图表 */
.chart-card { padding: 20px; }
.chart-card .chart-title { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px; }
.chart-card h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.chart-svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--fg-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

/* key 行 */
.key-cell { display: flex; flex-direction: column; gap: 5px; min-width: 220px; }
.key-cell .k-name { font-weight: 600; font-size: 14px; }
.key-cell .k-meta { font-size: 12px; color: var(--fg-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ==================== Chat(chat.deepseek.com 式) ==================== */
.chat-app { display: flex; height: 100vh; overflow: hidden; }
.chat-side {
  width: 264px; flex: none; display: flex; flex-direction: column;
  background: var(--bg-3); border-right: 1px solid var(--card-border);
  padding: 14px 12px; gap: 8px; overflow-y: auto;
}
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-scroll { flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.chat-log { max-width: 780px; margin: 0 auto; padding: 26px 24px 12px; width: 100%; }
.chat-input-wrap { max-width: 780px; margin: 0 auto; width: 100%; padding: 0 24px 22px; }
.chat-input {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.chat-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.chat-input textarea {
  display: block; width: 100%; border: none; background: none; resize: none;
  min-height: 54px; max-height: 280px; padding: 14px 18px 6px;
  font-size: 15px; line-height: 1.55; color: var(--fg); outline: none;
}
.chat-input .ci-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; }
.chat-input .ci-bar .ci-note { margin-left: auto; font-size: 12px; color: var(--fg-3); padding-right: 6px; }

.msg-row { display: flex; gap: 14px; padding: 18px 0; }
.msg-row + .msg-row { border-top: 1px solid var(--n-100); }
[data-theme="dark"] .msg-row + .msg-row { border-top-color: var(--n-150); }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; margin-top: 2px; }
.msg-avatar.user { background: var(--brand); color: var(--on-brand); }
.msg-avatar.ai { background: var(--n-200); color: var(--fg); }
.msg-body { flex: 1; min-width: 0; }
.msg-name { font-size: 13px; font-weight: 600; color: var(--fg-2); margin-bottom: 5px; }
.msg-actions { display: flex; gap: 4px; margin-top: 8px; opacity: 0; transition: opacity .15s; }
.msg-row:hover .msg-actions { opacity: 1; }
.msg-actions .icon-btn { width: 26px; height: 26px; font-size: 13px; }
.img-thumb { max-width: 240px; max-height: 200px; border-radius: var(--r-m); border: 1px solid var(--card-border); margin-top: 6px; }
.msg-file { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--fg-2); margin-top: 6px; }
.thinking { border-left: 3px solid var(--n-300); padding-left: 12px; color: var(--fg-3);
  font-size: 13.5px; font-style: italic; margin: 4px 0 8px; white-space: pre-wrap; }

.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: var(--fg-3); gap: 10px; text-align: center; padding: 20px; }
.chat-empty h2 { color: var(--fg); font-size: 26px; font-weight: 500; margin: 0; }

.conv-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-m); border: none; background: none;
  text-align: left; color: var(--fg-2); font-size: 13.5px;
}
.conv-item:hover { background: var(--hover); color: var(--fg); }
.conv-item.on { background: var(--active); color: var(--fg); }
.conv-item .c-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .c-del { opacity: 0; }
.conv-item:hover .c-del { opacity: 1; }

/* ==================== Docs(api-docs 式) ==================== */
.docs-app { display: flex; min-height: 100vh; }
.docs-nav { width: 240px; flex: none; border-right: 1px solid var(--card-border);
  padding: 20px 14px; overflow-y: auto; position: sticky; top: 0; height: 100vh; }
.docs-nav .dn-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--fg-3); text-transform: uppercase; margin: 18px 10px 6px; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: var(--r-s);
  color: var(--fg-2); font-size: 13.5px; text-decoration: none !important; }
.docs-nav a:hover { background: var(--hover); color: var(--fg); }
.docs-nav a.on { background: var(--brand-tint); color: var(--brand); font-weight: 500; }
.docs-main { flex: 1; min-width: 0; display: flex; justify-content: center; }
.docs-body { max-width: 780px; width: 100%; padding: 34px 32px 80px; }
.docs-body h1 { font-size: 30px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 6px; }
.docs-body h2 { font-size: 21px; font-weight: 600; margin: 36px 0 10px; padding-top: 10px;
  border-top: 1px solid var(--n-100); }
[data-theme="dark"] .docs-body h2 { border-top-color: var(--n-150); }
.docs-body h3 { font-size: 16.5px; font-weight: 600; margin: 24px 0 8px; }
.docs-body p, .docs-body li { color: var(--fg-2); }
.docs-body li { margin: 5px 0; }
.docs-body .field-row { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 13.5px; }
.docs-body .field-row dt { font-family: var(--mono); color: var(--fg); font-size: 12.5px; }
.docs-body .field-row dd { margin: 0; color: var(--fg-2); }
.docs-toc { width: 220px; flex: none; position: sticky; top: 0; height: 100vh;
  padding: 34px 18px 20px; overflow-y: auto; }
.docs-toc .toc-title { font-size: 12px; font-weight: 700; letter-spacing: .05em;
  color: var(--fg-3); text-transform: uppercase; margin-bottom: 12px; }
.docs-toc a { display: block; font-size: 12.5px; color: var(--fg-3); padding: 4px 0;
  text-decoration: none !important; border-left: 2px solid transparent; padding-left: 10px; }
.docs-toc a:hover { color: var(--fg); }
.docs-toc a.on { color: var(--brand); border-left-color: var(--brand); }
@media (max-width: 1024px) { .docs-toc { display: none; } }
@media (max-width: 860px) { .docs-nav { display: none; } }

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
  .console-main { padding: 20px 16px 50px; }
  .side { width: 68px; padding: 14px 8px; }
  .side .side-label, .side a span.txt, .side button.side-item span.txt,
  .side .side-foot .u-name { display: none; }
  .side a, .side button.side-item { justify-content: center; padding: 0; }
  .side-foot { align-items: center; }
  .chat-side { width: 210px; }
  .topbar .container { gap: 10px; }
  .topbar nav { overflow-x: auto; }
}
