/* ==========================================================
   星创荟 Star Creation Hub — 前端复刻
   深色主题 · 智能体广场 · 响应式（桌面 / 平板 / 手机）
   对接后端时只需替换 static/js/data.js 中的数据来源
   ========================================================== */

/* ---------- 1. 主题变量（与原站一致的取值） ---------- */
:root {
  --bg: #0b0b0b;
  --font: #fff;
  --desc-font: #a3a3aa;
  --card-bg: #222;          /* --employee-bg-color */
  --border: #111112;        /* --boder-color */
  --primary: #409eff;
  --primary-l3: rgb(121, 187, 255);
  --primary-l4: rgb(166, 211, 255);
  --dialog-bg: #111111;
  --input-bg: #161616;
  --radius: 15px;
  --header-h: 85px;
  --sidebar-w: 300px;
  --card-w: 250px;
  --card-h: 342px;
  --avatar: 80px;
  --mask-w: 184px;
  --mask-h: 82px;
  --title-size: 35px;
  --name-size: 22px;
}

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

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--font);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

ul, li { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }

/* 隐藏滚动条但保留滚动 */
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- 2. 底色 + 双层光晕背景（原站 #app 背景） ---------- */
#app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  background-image: url(../img/bg-left.png), url(../img/bg-right.png);
  background-repeat: no-repeat, no-repeat;
  background-position: top left, top right;
  background-size: 50%, 50%;
}

/* ---------- 3. 顶部导航 ---------- */
.header {
  flex: 0 0 var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--header-h);
  padding: 0 3.125% 0 60px;
  position: relative;
  z-index: 30;
}

.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

.logo { display: block; cursor: pointer; }
.logo img { height: 35px; width: auto; }

.header-menu { display: flex; align-items: center; }

.menu-li {
  margin-right: 5px;
  width: 104px;
  height: 38px;
  line-height: 36px;
  text-align: center;
  font-size: 15px;
  color: var(--primary-l3);
  border: 1px solid var(--primary-l4);
  border-radius: 10px;
  transition: all 0.2s;
  white-space: nowrap;
}
.menu-li:hover { background: var(--primary); color: #ffffffde; border-color: var(--primary); }

.menu-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0 12px;
  border-radius: 50%;
  background: var(--primary);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
}
.menu-avatar.is-login { background-size: cover; background-position: center; }

/* 汉堡按钮：仅移动端出现 */
.hamburger {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid #2a2a2a;
}
.hamburger i { display: block; width: 16px; height: 1.5px; background: #ddd; border-radius: 2px; }

/* ---------- 4. 主体：侧边栏 + 内容 ---------- */
.layout-body {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: space-between;
}

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding-left: 60px;
  position: relative;
  z-index: 20;
}

.sidebar-menu { flex: 1; width: 100%; height: 0; overflow-y: auto; }

.sidebar-menu .menu-item {
  height: 48px;
  line-height: 48px;
  padding: 0 18px;
  margin-bottom: 2px;
  font-size: 15px;
  color: #fff;
  border-radius: 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-menu .menu-item:hover { background: #000; border-radius: 10px; }
.sidebar-menu .menu-item.is-active {
  background: #000;
  border-radius: 10px;
  border-bottom-color: transparent;
}

.sidebar-info { flex-shrink: 0; }

/* 抽屉里的额外入口：桌面端不显示 */
.sidebar-extra { display: none; }
.sidebar-extra .extra-li {
  height: 42px;
  line-height: 42px;
  padding: 0 18px;
  font-size: 14px;
  color: var(--desc-font);
  cursor: pointer;
}
.sidebar-extra .extra-li:hover { color: #fff; }

.account-info {
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.account-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #3a3a3a url(../img/default-avatar.svg) center/60% no-repeat;
  background-color: #333;
  flex-shrink: 0;
}

.account-item {
  margin-top: 37px;
  width: 280px;
  display: flex;
  align-items: center;
}
.account-item .item-li {
  flex: 1;
  text-align: center;
  border-left: 1px solid var(--border);
  cursor: pointer;
}
.account-item .item-li:last-child { border-right: 1px solid var(--border); }
.account-item .item-li .desc { font-size: 13px; color: var(--desc-font); }
.account-item .item-li .num { margin-top: 12px; font-size: 14px; color: #fff; }

.sidebar-info .line-none {
  display: block;
  padding-bottom: 20px;
  font-size: 14px;
  color: #888;
  text-align: center;
}

/* ---------- 5. 内容区 ---------- */
.content-main {
  flex: 1;
  min-width: 0;
  padding: 0 2.8645% 0 2.0833%;
  overflow-y: auto;
  overflow-x: hidden;
}

.copy-writing { width: 100%; height: 100%; display: flex; flex-direction: column; }

.page-head { flex-shrink: 0; }
.page-title { font-weight: 800; font-size: var(--title-size); color: var(--font); line-height: 1.2; }
.page-sub-desc { margin-top: 10px; font-size: 14px; color: var(--desc-font); }

/* ---------- 6. 智能体卡片 ---------- */
.writing-ul {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 20px;
  padding-top: 10px;
  padding-bottom: 40px;
}

.writing-li {
  position: relative;
  flex: 0 0 auto;
  width: var(--card-w);
  height: var(--card-h);
  background-color: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform linear 0.2s;
}
.writing-li:hover { transform: translateY(-5px); }

.writing-li .top-box { position: absolute; left: 0; top: 0; width: 100%; height: 40%; }

/* 卡片顶部城市天际线封面 */
.writing-li .top-box .bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.7;
}

/* 头像底部的弧形"托"——原站同款 SVG 遮罩 */
.writing-li .top-box .img-box {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -35px;
  z-index: 2;
  display: inline-block;
  width: var(--mask-w);
  height: var(--mask-h);
  margin: auto;
  fill: currentColor;
  color: var(--card-bg);
  transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  user-select: none;
}

.writing-li .top-box .img {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -40px;
  z-index: 3;
  width: var(--avatar);
  height: var(--avatar);
  margin: auto;
  border-radius: 50%;
  object-fit: cover;
  background: #2b2b2b;
}

.writing-li .name-desc {
  position: absolute;
  top: 40%;
  bottom: 20px;
  left: 0;
  right: 0;
  margin-top: 66px;
  padding: 0 44px;
  text-align: center;
}

.writing-li .name {
  font-weight: 800;
  font-size: var(--name-size);
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.writing-li .desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  color: #ffffffad;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 卡片右上角标签（可选） */
.writing-li .is-vip { position: absolute; right: 0; top: 0; z-index: 4; }

/* ---------- 7. 弹窗 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
}
.overlay.is-open { display: flex; animation: fadeIn 0.22s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

.dialog {
  position: relative;
  width: 100%;
  max-width: 503px;
  padding: 34px 40px 36px;
  background: var(--dialog-bg);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: popIn 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
.dialog-wide { max-width: 800px; }
.dialog-sm { max-width: 400px; }

.dialog-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 1;
  color: #777;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.dialog-close:hover { color: #fff; background: #ffffff14; }

.dialog-title { font-size: 18px; font-weight: 600; color: #eee; text-align: center; }
.dialog-sub { margin-top: 8px; font-size: 13px; color: #888; text-align: center; line-height: 1.7; }

/* 欢迎页 */
.welcome-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.welcome-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.welcome-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 34px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.42) 100%);
}
.welcome-logo {
  width: 62%;
  height: auto;
  margin-bottom: 44px;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.35));
}
.welcome-title { font-size: 17px; font-weight: 600; color: #fff; line-height: 1.7; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }
.welcome-sub { margin-top: 10px; font-size: 15px; color: rgba(255, 255, 255, 0.92); letter-spacing: 0.5px; }
.welcome-close { z-index: 3; color: #ddd; right: 12px; top: 10px; }
.welcome-close:hover { background: rgba(255, 255, 255, 0.16); }

/* 登录弹窗 */
.login-tabs {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin: 24px 0 22px;
  border-bottom: 1px solid #232323;
}
.login-tab {
  position: relative;
  padding: 0 2px 12px;
  font-size: 15px;
  color: #969694;
  transition: color 0.2s;
}
.login-tab.is-active { color: #fff; }
.login-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.field {
  display: flex;
  align-items: center;
  height: 46px;
  margin-bottom: 16px;
  padding: 0 14px;
  background: var(--input-bg);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  transition: border-color 0.2s;
}
.field:focus-within { border-color: var(--primary); }
.field .prefix {
  flex-shrink: 0;
  padding-right: 12px;
  margin-right: 12px;
  font-size: 14px;
  color: #bbb;
  border-right: 1px solid #2f2f2f;
}
.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  outline: none;
  font-size: 14px;
  color: #eee;
}
.field input::placeholder { color: #6b6b6b; }

.field .send-code {
  flex-shrink: 0;
  padding-left: 12px;
  font-size: 13px;
  color: var(--primary);
  white-space: nowrap;
}
.field .send-code:disabled { color: #666; cursor: default; }

.btn-primary {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  transition: filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { filter: brightness(0.95); }

.agreement { margin-top: 16px; font-size: 12px; color: #777; text-align: center; line-height: 1.8; }
.agreement a { color: var(--primary); }

/* 邀请好友 / 客服弹窗内容 */
.invite-body { margin-top: 26px; text-align: center; }
.invite-qr {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.invite-qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.invite-qr-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: #b9b9b9;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(2px);
  cursor: pointer;
  transition: opacity .2s;
}
.invite-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn-ghost {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  font-size: 13px;
  color: var(--primary-l3);
  background: rgba(64, 158, 255, 0.08);
  border: 1px solid rgba(64, 158, 255, 0.28);
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-ghost:hover { background: rgba(64, 158, 255, 0.18); color: #fff; }
.btn-ghost[disabled] { opacity: .45; cursor: not-allowed; }
.invite-tip b { color: var(--primary-l3); font-weight: 700; }
.invite-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 18px;
  font-size: 15px;
  letter-spacing: 1px;
  background: #1c1c1c;
  border: 1px dashed #3a3a3a;
  border-radius: 10px;
}
.invite-code b { color: var(--primary); font-weight: 600; }
.invite-code .copy { font-size: 13px; color: var(--primary); }

.service-list { margin-top: 24px; }
.service-list .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 14px;
  color: #ccc;
  border-bottom: 1px solid #1f1f1f;
}
.service-list .row:last-child { border-bottom: 0; }
.service-list .row span:last-child { color: var(--desc-font); }

/* 客服二维码 */
.service-qr {
  width: 190px;
  height: 190px;
  margin: 20px auto 0;
  padding: 8px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.service-qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.service-qr-tip {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #8a8a8a;
}
.service-tel {
  color: var(--primary) !important;
  font-weight: 600;
  text-decoration: none;
}
.service-tel:hover { text-decoration: underline; }

/* ---------- 8. 对话页 ---------- */
.chat-page {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.chat-page.is-active { display: flex; }
.copy-writing.is-hidden { display: none; }

.chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 18px;
  border-bottom: 1px solid #1a1a1a;
}
.chat-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #2a2a2a;
  font-size: 16px;
  color: #bbb;
  transition: all 0.2s;
}
.chat-back:hover { color: #fff; border-color: #444; }
.chat-head img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.chat-head .info .name { font-size: 17px; font-weight: 700; }
.chat-head .info .desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--desc-font);
  max-width: 60vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 4px 10px;
}

.msg { display: flex; gap: 12px; margin-bottom: 22px; align-items: flex-start; }
.msg .avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg .bubble {
  max-width: min(72%, 720px);
  padding: 13px 17px;
  font-size: 14px;
  line-height: 1.75;
  color: #e8e8e8;
  background: #1d1d1d;
  border-radius: 14px;
  border-top-left-radius: 4px;
  word-break: break-word;
  white-space: pre-wrap;
}
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble {
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  border-top-right-radius: 4px;
}
.msg.me .avatar { background: #2b2b2b; }

.chat-input-wrap { flex: 0 0 auto; padding: 12px 0 22px; }
.chat-input {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 14px;
  background: #151515;
  border: 1px solid #262626;
  border-radius: 14px;
  transition: border-color 0.2s;
}
.chat-input:focus-within { border-color: #3a3a3a; }
.chat-input textarea {
  flex: 1;
  min-height: 24px;
  max-height: 140px;
  padding: 4px 0;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: #eee;
  background: none;
  border: 0;
  outline: none;
  resize: none;
}
.chat-input textarea::placeholder { color: #6b6b6b; }
.chat-send {
  flex-shrink: 0;
  height: 36px;
  padding: 0 20px;
  font-size: 14px;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  transition: filter 0.2s;
}
.chat-send:hover { filter: brightness(1.1); }
.chat-send:disabled { opacity: 0.5; cursor: default; }

.chat-tip { margin-top: 10px; font-size: 12px; color: #555; text-align: center; }

/* 打字动画 */
.typing { display: inline-flex; gap: 4px; align-items: center; height: 20px; }
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #888;
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* ---------- 9. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 12%;
  z-index: 300;
  padding: 11px 22px;
  font-size: 13px;
  color: #fff;
  background: rgba(30, 30, 30, 0.96);
  border: 1px solid #333;
  border-radius: 10px;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 9.5 我的资产 ---------- */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
  padding-bottom: 40px;
}
.assets-card {
  padding: 26px 26px 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  transition: transform 0.2s;
}
.assets-card:hover { transform: translateY(-4px); }
.assets-card .assets-label { font-size: 13px; color: var(--desc-font); }
.assets-card .assets-value {
  margin-top: 14px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.assets-card .assets-value span { margin-left: 4px; font-size: 14px; font-weight: 400; color: var(--desc-font); }
.assets-card .assets-tip { margin-top: 16px; font-size: 12px; color: #6f6f76; }

/* ---------- 10. 遮罩（移动端抽屉用） ---------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}
.drawer-mask.is-open { opacity: 1; visibility: visible; }

/* ---------- 11. 对接后端后的补充样式 ---------- */

/* 顶栏算力胶囊 */
.power-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  margin-right: 8px;
  padding: 0 14px;
  font-size: 13px;
  color: var(--primary-l3);
  background: rgba(64, 158, 255, 0.1);
  border: 1px solid rgba(64, 158, 255, 0.28);
  border-radius: 10px;
  white-space: nowrap;
}
.power-pill b { font-weight: 700; color: #fff; }
.power-pill[hidden] { display: none; }

/* 头像文字兜底 */
.menu-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* 卡片 VIP 角标 */
.writing-li .card-tag {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 5;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #ffd76e;
  background: rgba(255, 215, 110, 0.14);
  border: 1px solid rgba(255, 215, 110, 0.4);
  border-radius: 20px;
}

/* 骨架屏 / 空状态 */
.agent-skeleton {
  width: var(--card-w);
  height: var(--card-h);
  border-radius: var(--radius);
  background: linear-gradient(100deg, #1b1b1b 30%, #252525 50%, #1b1b1b 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

.grid-empty {
  width: 100%;
  padding: 70px 20px;
  font-size: 15px;
  line-height: 2;
  color: #bbb;
  text-align: center;
}
.grid-empty span { font-size: 13px; color: #777; }

/* 资产页补充 */
.assets-login { padding: 60px 20px; text-align: center; color: var(--desc-font); }
.assets-loading { padding: 40px 0; font-size: 13px; color: #777; }
.assets-section { margin-top: 34px; padding-bottom: 40px; }
.assets-h3 { font-size: 16px; font-weight: 700; color: #eee; margin-bottom: 14px; }
.assets-records { display: flex; flex-direction: column; gap: 10px; }
.records-empty { padding: 26px 0; font-size: 13px; color: #777; }
.record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #1a1a1a;
  border: 1px solid #232323;
  border-radius: 12px;
}
.record-name { font-size: 14px; color: #eee; }
.record-time { margin-top: 6px; font-size: 12px; color: #7a7a7a; }
.record-right { display: flex; align-items: center; gap: 14px; }
.record-cost { font-size: 15px; font-weight: 700; color: #ff9d6b; }
.record-cost.is-plus { color: #4ade80; }
.record-balance { font-size: 12px; color: #7a7a7a; }

/* 邀请弹窗补充 */
.invite-tip { margin-top: 14px; font-size: 12px; color: #7a7a7a; }

/* 对话页补充 */
.chat-new {
  margin-left: auto;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--primary-l3);
  border: 1px solid rgba(64, 158, 255, 0.28);
  border-radius: 8px;
  transition: all 0.2s;
}
.chat-new:hover { background: rgba(64, 158, 255, 0.14); color: #fff; }

.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chat-quick:empty { display: none; }
.quick-chip {
  padding: 7px 13px;
  font-size: 12.5px;
  color: #b9c7d6;
  background: #171717;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  transition: all 0.2s;
}
.quick-chip:hover { color: #fff; border-color: var(--primary); background: rgba(64, 158, 255, 0.1); }

/* 对话内容 Markdown 排版 */
.msg .bubble .md-p { margin: 0 0 8px; }
.msg .bubble .md-p:last-child { margin-bottom: 0; }
.msg .bubble .md-h { margin: 12px 0 8px; font-size: 15px; font-weight: 700; color: #fff; }
.msg .bubble .md-ul { margin: 4px 0 10px; padding-left: 20px; }
.msg .bubble .md-ul li { list-style: disc; margin: 4px 0; }
.msg .bubble .md-quote {
  margin: 8px 0;
  padding: 8px 12px;
  font-size: 13.5px;
  color: #b9c7d6;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
}
.msg .bubble .md-hr { height: 1px; margin: 12px 0; background: #2c2c2c; }
.msg .bubble .md-pre {
  margin: 10px 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.6;
  background: #101010;
  border: 1px solid #262626;
  border-radius: 8px;
}
.msg .bubble code {
  padding: 1px 5px;
  font-family: Consolas, Monaco, monospace;
  font-size: 12.5px;
  color: #ffd7a8;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}
.msg .bubble .md-pre code { padding: 0; color: #d7e4f0; background: none; }
.msg .bubble strong { color: #fff; font-weight: 700; }
.msg .bubble a { color: var(--primary-l3); text-decoration: underline; word-break: break-all; }

@media (max-width: 720px) {
  .power-pill { display: none; }
  .chat-new { padding: 6px 11px; }
}

/* ==========================================================
   轮播图 / 移动端底部导航
   ========================================================== */

.header-title { display: none; }

/* 轮播图 */
.banner-swiper {
  position: relative;
  flex: none;            /* 父级是 flex 列，避免被压缩成 0 高 */
  width: 100%;
  margin-top: 18px;
  border-radius: 16px;
  overflow: hidden;
  background: #14151a;
}
.banner-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.banner-slide {
  position: relative;
  flex: 0 0 100%;
  display: block;
  aspect-ratio: 1000 / 300;
  overflow: hidden;
}
.banner-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-slide .banner-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 22px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}
.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.2s;
}
.banner-dot.is-active {
  width: 16px;
  border-radius: 4px;
  background: #fff;
}

/* 「热门」分组标题：仅移动端显示 */
.section-hot {
  display: none;
  flex: none;
  margin: 22px 2px 0;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

/* 底部标签栏：仅移动端显示 */
.tabbar { display: none; }

/* ==========================================================
   响应式
   ========================================================== */

/* 大屏笔记本：保留三列，微调间距 */
@media (max-width: 1440px) {
  .header { padding: 0 2.5% 0 44px; }
  .sidebar { flex-basis: 260px; width: 260px; padding-left: 44px; }
  .content-main { padding: 0 2% 0 1.6%; }
}

/* 平板横屏 / 小笔记本：卡片缩小一档 */
@media (max-width: 1180px) {
  :root {
    --card-w: 232px;
    --card-h: 320px;
    --avatar: 74px;
    --mask-w: 170px;
    --mask-h: 76px;
    --title-size: 30px;
    --name-size: 20px;
    --sidebar-w: 240px;
  }
  .writing-ul { gap: 22px; }
  .writing-li .name-desc { padding: 0 30px; }
}

/* 侧边栏收起为抽屉的分界点 */
@media (max-width: 1024px) {
  :root { --header-h: 68px; }

  .header { padding: 0 20px; }
  .hamburger { display: flex; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    width: 268px;
    padding: 78px 18px 18px;
    background: #0e0e0e;
    border-right: 1px solid #1c1c1c;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  .sidebar.is-open { transform: none; }

  /* 抽屉展开时，收起顶栏右侧按钮，汉堡变关闭图标 */
  body.drawer-open .header-menu { opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  body.drawer-open .hamburger i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  body.drawer-open .hamburger i:nth-child(2) { opacity: 0; }
  body.drawer-open .hamburger i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
  .hamburger i { transition: transform 0.22s, opacity 0.22s; }
  .sidebar-extra {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #1c1c1c;
  }

  .content-main { padding: 0 20px; }
  .account-item { width: 100%; }
  .account-info { padding: 10px 0; }
  .account-item { margin-top: 22px; }
  .sidebar .line-none { padding-bottom: 8px; font-size: 12px; }

  .writing-ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
  }
  .writing-li { width: 100%; height: 318px; }
}

/* 平板竖屏 / 大手机 */
@media (max-width: 720px) {
  :root {
    --header-h: 62px;
    --title-size: 24px;
    --name-size: 19px;
    --avatar: 70px;
    --mask-w: 160px;
    --mask-h: 72px;
  }

  .header { padding: 0 14px; }
  .logo img { height: 28px; }

  /* 手机上把「邀请好友 / 联系客服」收进抽屉，只留登录 */
  .header-menu .menu-li[data-action="invite"],
  .header-menu .menu-li[data-action="service"] { display: none; }
  .header-menu .menu-li {
    width: auto;
    height: 32px;
    line-height: 30px;
    padding: 0 13px;
    margin-right: 2px;
    font-size: 13px;
    border-radius: 8px;
  }
  .menu-avatar { width: 32px; height: 32px; margin: 0 0 0 8px; }

  .content-main { padding: 0 14px; }
  .page-sub-desc { font-size: 13px; }

  .writing-ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
  }
  .writing-li { height: 300px; }
  .writing-li .name-desc { margin-top: 58px; padding: 0 16px; }
  .writing-li .desc { font-size: 13px; }

  /* 顶栏：居中标题，隐藏 LOGO 与文字登录按钮 */
  .header { position: relative; }
  .header-title {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
  }
  .header .logo { display: none; }
  .header-menu #btnLogin { display: none; }

  /* 移动端版式：轮播图 + 热门 */
  .page-head { display: none; }
  .banner-swiper { margin-top: 12px; border-radius: 12px; }
  .banner-slide { aspect-ratio: 2 / 1; }
  .section-hot { display: block; margin-top: 20px; }
  .writing-ul { margin-top: 12px; padding-bottom: 8px; }
  .writing-li:hover { transform: none; }

  /* 底部标签栏 */
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: stretch;
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(11, 11, 13, 0.97);
    border-top: 1px solid #1e1f24;
    backdrop-filter: blur(14px);
  }
  .tabbar.is-hidden { display: none; }
  .tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 56px;
    padding: 0;
    background: none;
    border: 0;
    color: #7d7f87;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
  }
  .tabbar-item svg { width: 21px; height: 21px; }
  .tabbar-item.is-active { color: #4b9bff; }

  #app { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  body.in-chat #app { padding-bottom: 0; }

  .account-item { width: 100%; }

  .dialog { padding: 28px 22px 26px; border-radius: 14px; }
  .chat-head .info .desc { max-width: 46vw; }
  .msg .bubble { max-width: 80%; }
}

/* 手机竖屏 */
@media (max-width: 480px) {
  :root {
    --header-h: 58px;
    --title-size: 21px;
    --name-size: 18px;
    --avatar: 64px;
    --mask-w: 148px;
    --mask-h: 66px;
    --card-h: 262px;
  }

  .logo img { height: 26px; }
  .content-main { padding: 0 12px; }

  /* 手机竖屏：两列卡片 */
  .writing-ul { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .writing-li { height: 238px; max-width: none; margin: 0; width: 100%; border-radius: 12px; }
  .writing-li .top-box { height: 42%; }
  .writing-li .top-box .img { bottom: -26px; width: 56px; height: 56px; }
  .writing-li .top-box .img-box { bottom: -22px; width: 118px; height: 52px; }
  .writing-li .name-desc { margin-top: 40px; padding: 0 10px; }
  .writing-li .name { font-size: 15px; line-height: 1.28; }
  .writing-li .desc { margin-top: 6px; font-size: 11.5px; line-height: 1.5; text-align: left; }
  .section-hot { font-size: 16px; margin-top: 18px; }

  .header-menu .menu-avatar { width: 30px; height: 30px; }

  .dialog { padding: 26px 18px 22px; }
  .login-tabs { gap: 26px; }
  .field { height: 44px; }
  .btn-primary { height: 44px; }

  .chat-body { padding: 16px 0 8px; }
  .msg .bubble { max-width: 84%; font-size: 13.5px; }
  .chat-input-wrap { padding: 8px 0 14px; }
  .chat-send { padding: 0 14px; }
  .chat-tip { display: none; }
  .toast { bottom: 16%; }
}
