/* ================= 蓝蚂蚁AI · 深色创作风格 ================= */
:root {
  --bg: #0d0d10;
  --bg-soft: #16161a;
  --panel: #1c1c22;
  --panel-2: #232329;
  --border: #2e2e36;
  --text: #ececf1;
  --text-dim: #9a9aa5;
  --accent: #3b82f6;
  --accent-hover: #2f6fdd;
  --danger: #ef4444;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 28px; height: 60px;
  background: rgba(13, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo-icon { font-size: 24px; }
.logo-name { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.main-nav { display: flex; gap: 6px; }
.nav-link {
  color: var(--text-dim); text-decoration: none; font-size: 14px;
  padding: 7px 14px; border-radius: 8px; transition: all .2s;
}
.nav-link:hover { color: var(--text); background: var(--panel); }
.nav-link.active { color: var(--text); background: var(--panel-2); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-entry { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.user-name { font-size: 14px; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 按钮 ---------- */
.btn-primary {
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  transition: background .2s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--text-dim); border: 1px solid var(--border);
  cursor: pointer; padding: 6px 12px; border-radius: 8px; font-size: 13px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-outline {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
  cursor: pointer; padding: 9px 14px; border-radius: 10px; font-size: 13px; white-space: nowrap;
}
.btn-outline:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- 会话栏 ---------- */
.sidebar {
  position: fixed; top: 60px; left: 0; bottom: 0; z-index: 40;
  width: 240px; background: var(--bg-soft); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 10px;
}
.btn-new-conv {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; padding: 10px; border-radius: 10px;
  cursor: pointer; transition: all .2s; margin-bottom: 12px;
}
.btn-new-conv:hover { border-color: var(--accent); color: var(--accent); }
.conv-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.conv-item {
  position: relative; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background .15s; border: 1px solid transparent;
}
.conv-item:hover { background: var(--panel); }
.conv-item.active { background: var(--panel-2); border-color: #3b82f655; }
.conv-item .ci-title {
  font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; padding-right: 22px; display: block;
}
.conv-item .ci-meta { font-size: 11px; color: #5c5c66; margin-top: 4px; display: block; }
.conv-item .ci-del {
  position: absolute; top: 8px; right: 8px; background: transparent; border: none;
  color: #5c5c66; cursor: pointer; font-size: 12px; padding: 2px; display: none;
}
.conv-item:hover .ci-del { display: block; }
.conv-item .ci-del:hover { color: var(--danger); }
.conv-item .ci-ren {
  position: absolute; top: 8px; right: 26px; background: transparent; border: none;
  color: #5c5c66; cursor: pointer; font-size: 12px; padding: 2px; display: none;
}
.conv-item:hover .ci-ren { display: block; }
.conv-item .ci-ren:hover { color: var(--accent); }
.conv-empty { color: #5c5c66; font-size: 12px; text-align: center; padding: 24px 0; }
.sidebar-toggle { display: none; }
.sidebar-mask { position: fixed; inset: 60px 0 0 0; z-index: 39; background: rgba(0,0,0,.5); }

/* ---------- 首页（含会话栏偏移） ---------- */
.view-home, .view-history { max-width: 1080px; margin-left: 240px; }
.view-home { padding: 56px 24px 80px; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .view-home, .view-history { margin-left: 0; }
  .sidebar-toggle { display: inline-block; }
}
.view-history { padding: 48px 24px 80px; }
.hero-title {
  text-align: center; font-size: 40px; font-weight: 700;
  background: linear-gradient(120deg, #fff, #b8c7ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title.small { font-size: 28px; margin-bottom: 32px; }
.hero-sub { text-align: center; color: var(--text-dim); margin-top: 12px; font-size: 15px; }

/* 示例卡片 */
.sample-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; margin: 44px 0 8px;
}
.sample-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  height: 190px; cursor: pointer; border: 1px solid var(--border);
  transition: transform .2s, border-color .2s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; color: #fff;
}
.sample-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.sample-card .card-bg {
  position: absolute; inset: 0; z-index: 0; opacity: .9;
  display: flex; align-items: center; justify-content: center; font-size: 52px;
}
.sample-card .card-grad {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.78));
}
.sample-card .card-title { position: relative; z-index: 2; font-size: 17px; font-weight: 600; }
.sample-card .card-tag {
  position: relative; z-index: 2; display: inline-block; margin-bottom: 6px;
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: rgba(59,130,246,.85);
}
.sample-card .card-desc {
  position: relative; z-index: 2; font-size: 12px; color: #d4d4dc;
  margin-top: 6px; line-height: 1.5; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 生成结果区（对话线程） */
.result-area {
  margin: 32px 0 4px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
}
.result-area.thread {
  display: flex; flex-direction: column; gap: 18px; background: transparent;
  border: none; padding: 0;
}
.thread-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
/* 用户指令气泡（右对齐，参考即梦样式） */
.msg-user {
  align-self: flex-end; max-width: 76%;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 16px 16px 4px 16px; padding: 10px 16px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.msg-user .msg-text {
  color: var(--text); font-size: 14px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; text-align: left; align-self: stretch;
}
.msg-user .msg-atts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.msg-user .msg-atts img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.result-status { font-size: 12px; color: var(--text-dim); }
.result-status.done { color: var(--text-dim); }
.result-status.run { color: var(--accent); }
/* 回到底部悬浮按钮 */
.to-bottom {
  position: fixed; bottom: 210px; left: 50%; transform: translateX(-50%); z-index: 30;
  background: rgba(70,70,80,.92); color: #fff; border: none; border-radius: 16px;
  padding: 8px 18px; font-size: 13px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.35); backdrop-filter: blur(4px);
}
.to-bottom:hover { background: rgba(95,95,108,.95); }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.result-kind { font-size: 12px; color: var(--accent); background: rgba(59,130,246,.15); padding: 3px 10px; border-radius: 6px; }
.result-prompt { font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.result-body { margin-top: 14px; font-size: 15px; line-height: 1.8; white-space: pre-wrap; }
.result-body img, .result-body video { max-width: 100%; border-radius: 10px; margin-top: 8px; }

/* ---- Markdown 排版（对话结果，贴近方舟体验中心的阅读效果） ---- */
.result-body.md { white-space: normal; }
.result-body.md p { margin: 0 0 10px; }
.result-body.md p:last-child { margin-bottom: 0; }
.result-body.md h3, .result-body.md h4, .result-body.md h5, .result-body.md h6 {
  margin: 16px 0 8px; line-height: 1.5; font-weight: 700;
}
.result-body.md h3 { font-size: 17px; }
.result-body.md h4 { font-size: 16px; }
.result-body.md h5, .result-body.md h6 { font-size: 15px; }
.result-body.md ul, .result-body.md ol { margin: 6px 0 10px; padding-left: 22px; }
.result-body.md li { margin: 3px 0; }
.result-body.md li > p { margin: 0; }
.result-body.md strong { color: #fff; font-weight: 700; }
.result-body.md em { color: var(--text); }
.result-body.md a { color: #6ba6ff; text-decoration: none; border-bottom: 1px solid #6ba6ff55; }
.result-body.md a:hover { border-bottom-color: #6ba6ff; }
.result-body.md blockquote {
  margin: 10px 0; padding: 6px 12px; border-left: 3px solid #3a3a45;
  color: var(--text-dim); background: #ffffff08; border-radius: 0 8px 8px 0;
}
.result-body.md hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.result-body.md code.md-inline {
  background: #ffffff14; padding: 1px 6px; border-radius: 5px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
}
.result-body.md pre.md-code {
  background: #0f0f14; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; overflow-x: auto; margin: 10px 0; white-space: pre;
}
.result-body.md pre.md-code code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.65;
}
.result-body.md .md-table-wrap { overflow-x: auto; margin: 10px 0; }
.result-body.md table { border-collapse: collapse; width: 100%; font-size: 14px; }
.result-body.md th, .result-body.md td {
  border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top;
}
.result-body.md th { background: #ffffff0d; font-weight: 600; }
.result-loading { display: flex; align-items: center; gap: 10px; color: var(--text-dim); margin-top: 14px; font-size: 14px; }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 输入框 */
.composer-wrap { max-width: 760px; margin: 40px auto 0; }
.composer {
  position: relative;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 12px 14px 10px; transition: border-color .2s;
}
.composer:focus-within { border-color: #3b82f6aa; }

/* 素材预览条 */
.attach-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 10px; }
.attach-item {
  position: relative; width: 64px; height: 64px; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--border); background: var(--bg-soft);
}
.attach-item img, .attach-item video { width: 100%; height: 100%; object-fit: cover; }
.attach-item .attach-name {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px;
  color: #fff; background: rgba(0,0,0,.55); padding: 2px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.attach-item .attach-remove {
  position: absolute; top: 2px; right: 2px; width: 16px; height: 16px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.65);
  color: #fff; font-size: 10px; line-height: 16px; padding: 0; cursor: pointer; text-align: center;
}
.attach-item.uploading::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23fff' stroke-width='3' stroke-dasharray='40' stroke-dashoffset='30'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center no-repeat;
}

/* 主输入区：上传按钮 + 文本框 */
.composer-main { display: flex; gap: 12px; align-items: flex-start; }
.attach-btn {
  flex: none; width: 64px; height: 64px; border-radius: 12px;
  background: var(--bg-soft); border: 1px dashed #4a4a55;
  color: var(--text-dim); font-size: 24px; cursor: pointer; transition: all .2s;
}
.attach-btn:hover { color: var(--accent); border-color: var(--accent); background: #1a2333; }
.prompt-input {
  flex: 1; background: transparent; border: none; outline: none; resize: none;
  color: var(--text); font-size: 15px; line-height: 1.7; font-family: inherit; min-height: 64px;
}
.prompt-input::placeholder { color: #5c5c66; }

/* 底部工具栏 */
.composer-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.footer-left { display: flex; gap: 6px; }
.tab {
  background: transparent; border: none; color: var(--text-dim);
  font-size: 13px; padding: 6px 14px; border-radius: 8px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel-2); color: var(--text); font-weight: 600; }
.footer-right { display: flex; align-items: center; gap: 12px; }

/* 模型选择器 */
.model-select { position: relative; }
.model-btn {
  background: transparent; border: none; color: var(--text-dim);
  font-size: 13px; cursor: pointer; padding: 6px 8px; border-radius: 8px; white-space: nowrap;
}
.model-btn:hover { color: var(--text); background: var(--panel-2); }
.model-menu {
  position: absolute; right: 0; bottom: 36px; z-index: 60; min-width: 240px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.model-option {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  background: transparent; border: none; color: var(--text);
  padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.model-option:hover { background: #2e2e38; }
.model-option.selected { background: rgba(59,130,246,.15); }
.model-option .mo-desc { font-size: 11px; color: var(--text-dim); }
.model-option.disabled { opacity: .55; cursor: not-allowed; }

/* 对话能力开关（深度思考 / 联网搜索） */
.model-switch-group { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
.model-switch-group .ms-title { font-size: 11px; color: var(--text-dim); padding: 4px 12px 2px; }
.model-switch {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: none; color: var(--text);
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; text-align: left;
}
.model-switch:hover { background: #2e2e38; }
.model-switch .ms-label { flex: 1; }
.model-switch .ms-hint { font-size: 11px; color: var(--text-dim); }
.model-switch .ms-dot {
  width: 30px; height: 17px; border-radius: 999px; background: #3a3a45;
  position: relative; transition: background .18s; flex: none;
}
.model-switch .ms-dot::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #8b8b96; transition: transform .18s, background .18s;
}
.model-switch.on .ms-dot { background: rgba(59,130,246,.35); }
.model-switch.on .ms-dot::after { transform: translateX(13px); background: var(--accent); }
.model-switch.on .ms-hint { color: var(--accent); }

/* 深度思考过程 */
.reasoning-box {
  margin-bottom: 10px; border-left: 2px solid #3a3a45; padding: 2px 0 2px 10px;
}
.reasoning-box > summary {
  cursor: pointer; font-size: 12px; color: var(--text-dim); list-style: none; outline: none;
}
.reasoning-box > summary::-webkit-details-marker { display: none; }
.reasoning-box > summary::before { content: "▸ "; }
.reasoning-box[open] > summary::before { content: "▾ "; }
.reasoning-box .reasoning-text {
  margin-top: 6px; font-size: 12.5px; line-height: 1.75; color: #8b8b96;
  white-space: pre-wrap; max-height: 240px; overflow-y: auto;
}
.model-empty { padding: 10px 12px; font-size: 12px; color: var(--text-dim); }

/* 圆形发送按钮 */
.send-circle {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); border: none; color: #fff;
  font-size: 18px; font-weight: 700; cursor: pointer; transition: background .2s;
}
.send-circle:hover { background: var(--accent-hover); }
.send-circle:disabled { opacity: .4; cursor: not-allowed; }
.char-count { font-size: 12px; color: #5c5c66; }
.model-tag { font-size: 12px; color: var(--text-dim); }
.model-tag b { color: #fbbf24; font-weight: 600; }
.composer-tip { text-align: center; color: #5c5c66; font-size: 12px; margin-top: 12px; }

/* 语音识别按钮 */
.mic-btn {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); font-size: 16px; cursor: pointer; transition: all .2s;
}
.mic-btn:hover { color: var(--text); border-color: var(--text-dim); }
.mic-btn.recording {
  color: #fff; background: var(--danger); border-color: var(--danger);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .6; } }

/* 引用参考弹层 */
.ref-menu {
  position: absolute; left: 14px; bottom: 64px; z-index: 60; width: 280px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.ref-menu .ref-tip { font-size: 11px; color: var(--text-dim); padding: 6px 10px; }
.ref-menu .ref-tip b { color: var(--accent); }
.ref-option {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: none; color: var(--text);
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.ref-option:hover { background: #2e2e38; }
.ref-option img, .ref-option video { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.ref-option .ro-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-empty { padding: 10px 12px; font-size: 12px; color: var(--text-dim); }
/* @ 菜单：选中高亮 + 序号标注 */
.mention-menu { max-height: 300px; overflow-y: auto; }
.mention-option.sel { background: #2e2e38; outline: 1px solid #3b82f666; }
.ref-option .ro-ord { margin-left: auto; font-size: 10px; color: var(--text-dim); flex: none; }
/* 素材条：顺序角标 + 拖拽排序 */
.attach-item { cursor: grab; }
.attach-item:active { cursor: grabbing; }
.attach-item.dragging { opacity: .35; }
.attach-item.drag-over { outline: 2px solid #3b82f6; outline-offset: -2px; }
.attach-item .attach-ord {
  position: absolute; top: 2px; left: 2px; z-index: 2;
  min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px;
  background: #2563eb; color: #fff; font-size: 9px; line-height: 15px;
  text-align: center; font-weight: 600; pointer-events: none;
}

/* 新建对话按钮 */
.new-chat-btn { white-space: nowrap; }

/* 总账号徽标 */
.admin-badge {
  font-size: 12px; color: #fbbf24; background: rgba(251,191,36,.12);
  border: 1px solid rgba(251,191,36,.4); padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}

/* 历史记录归属 */
.h-owner { font-size: 11px; color: #8b95a5; background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; margin-left: 8px; }

/* ---------- 我的作品 ---------- */
.history-list { display: flex; flex-direction: column; gap: 14px; }
.history-item {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; display: flex; gap: 16px; align-items: flex-start;
}
.history-item .h-kind { font-size: 12px; padding: 3px 10px; border-radius: 6px; white-space: nowrap; margin-top: 2px; }
.h-chat { background: rgba(139,92,246,.18); color: #b79cff; }
.h-image { background: rgba(59,130,246,.18); color: #7fb0ff; }
.h-video { background: rgba(236,72,153,.18); color: #ff8fc2; }
.h-main { flex: 1; min-width: 0; }
.h-prompt { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.h-result { font-size: 13px; color: var(--text-dim); line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.h-result img, .h-result video { max-width: 280px; border-radius: 8px; display: block; margin-top: 8px; }
.h-time { font-size: 12px; color: #5c5c66; margin-top: 8px; }
.h-del {
  background: transparent; border: none; color: #5c5c66; cursor: pointer;
  font-size: 16px; padding: 4px;
}
.h-del:hover { color: var(--danger); }
.empty-state { text-align: center; color: var(--text-dim); padding: 60px 0; font-size: 14px; }

/* ---------- 登录弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  position: relative; width: 380px; max-width: 100%;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px 28px 24px;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; background: transparent;
  border: none; color: var(--text-dim); font-size: 16px; cursor: pointer;
}
.modal-logo { text-align: center; font-size: 22px; margin-bottom: 6px; }
.modal-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--bg-soft); padding: 4px; border-radius: 10px; }
.mtab {
  flex: 1; background: transparent; border: none; color: var(--text-dim);
  font-size: 13px; padding: 8px; border-radius: 8px; cursor: pointer;
}
.mtab.active { background: var(--panel-2); color: var(--text); font-weight: 600; }
.pwd-hint { text-align: center; color: #5c5c66; font-size: 11px; margin-top: 10px; }
.form-row { margin-bottom: 14px; }
.code-row { display: flex; gap: 10px; }
.code-row .form-input { flex: 1; }
.form-input {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; color: var(--text); font-size: 14px; outline: none;
}
.form-input:focus { border-color: var(--accent); }
.form-error { color: var(--danger); font-size: 12px; min-height: 18px; margin-bottom: 8px; }
.btn-wechat {
  width: 100%; background: #07c160; border: none; color: #fff;
  padding: 11px; border-radius: 10px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.btn-wechat:hover { background: #06ad56; }
.divider {
  display: flex; align-items: center; margin: 18px 0;
  color: #5c5c66; font-size: 12px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.divider span { padding: 0 12px; }
.agreement { text-align: center; color: #5c5c66; font-size: 11px; margin-top: 16px; }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%);
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  padding: 10px 22px; border-radius: 10px; font-size: 14px; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero-title { font-size: 28px; }
  .main-nav { gap: 2px; }
  .user-name { display: none; }
  .sample-cards { grid-template-columns: 1fr; }
}

/* ================= 生成参数栏（图片/视频） ================= */
.param-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px 2px;
}
.param-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 10px 5px 12px;
  font-size: 12px; color: var(--text-dim);
}
.param-chip .pc-label { color: #6b6b78; }
.param-chip select {
  background: transparent; border: none; outline: none; color: var(--text);
  font-size: 12px; font-family: inherit; cursor: pointer; padding-right: 2px;
}
.param-chip select option { background: var(--panel-2); color: var(--text); }
.param-chip.hi { border-color: #3b82f655; background: rgba(59,130,246,.1); }
.param-hint { font-size: 11px; color: #5c5c66; margin-left: auto; }

/* ================= 首页灵感示例 ================= */
.hero-ideas {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-top: 22px; max-width: 760px; margin-left: auto; margin-right: auto;
}
.hero-idea {
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; padding: 8px 14px;
  border-radius: 999px; cursor: pointer; transition: .18s; font-family: inherit;
}
.hero-idea:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }

/* ================= 结果媒体操作 ================= */
.result-media { position: relative; display: inline-block; max-width: 100%; }
.result-media img, .result-media video {
  max-width: 100%; border-radius: 10px; display: block; cursor: zoom-in;
}
.result-media video { cursor: default; }
.media-actions {
  position: absolute; right: 10px; top: 10px; display: flex; gap: 6px;
  opacity: 0; transition: .18s;
}
.result-media:hover .media-actions { opacity: 1; }
.media-btn {
  background: rgba(20,20,24,.78); color: #fff; border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer;
  backdrop-filter: blur(6px); font-family: inherit;
}
.media-btn:hover { background: rgba(59,130,246,.85); }

/* ================= 作品筛选 ================= */
.history-filter { display: flex; gap: 8px; margin-bottom: 20px; }
.hf-btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 13px; padding: 7px 16px; border-radius: 999px; cursor: pointer;
  font-family: inherit; transition: .18s;
}
.hf-btn:hover { color: var(--text); }
.hf-btn.active { background: var(--panel-2); color: var(--text); border-color: #3b82f655; font-weight: 600; }

/* ================= 预览弹层 ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(6,6,8,.92); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; gap: 16px;
}
.lb-stage { max-width: 92vw; max-height: 76vh; display: flex; align-items: center; justify-content: center; }
.lb-stage img, .lb-stage video {
  max-width: 92vw; max-height: 76vh; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.lb-close {
  position: absolute; right: 24px; top: 20px;
  background: rgba(255,255,255,.08); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer;
}
.lb-close:hover { background: rgba(255,255,255,.2); }
.lb-bar { display: flex; align-items: center; gap: 16px; }
.lb-info { font-size: 12px; color: var(--text-dim); max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-btn {
  background: var(--accent); color: #fff; text-decoration: none;
  padding: 8px 20px; border-radius: 999px; font-size: 13px; font-weight: 500;
}
.lb-btn:hover { background: var(--accent-hover); }

/* 多图结果网格 */
.result-gallery {
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 4px;
}
.result-gallery .result-media img { width: 100%; }
/* 窄屏时提示文字换行显示，避免被裁剪 */
@media (max-width: 900px) {
  .param-hint { flex-basis: 100%; margin-left: 0; text-align: left; }
}
.param-hint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }

/* ================= 模型菜单分组 / 滚动 ================= */
.model-menu { max-height: 62vh; overflow-y: auto; }
.model-group {
  font-size: 11px; color: #5c5c66; padding: 8px 12px 4px;
  letter-spacing: .5px; border-top: 1px solid var(--border); margin-top: 4px;
}
.model-group:first-child { border-top: none; margin-top: 0; }

/* ================= 音频结果 ================= */
.result-audio {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
}
.result-audio audio { width: min(460px, 100%); height: 40px; }
.result-audio .media-btn { text-decoration: none; }

/* 模型多时菜单改为向下展开并限高，避免超出屏幕顶部 */
.model-menu { bottom: auto; top: calc(100% + 8px); max-height: min(58vh, 480px); }

/* ================= 模型菜单（全量清单 + 搜索） ================= */
.model-menu {
  display: flex; flex-direction: column; min-width: 320px;
  padding: 0; overflow: hidden; max-height: min(60vh, 520px);
}
.mm-search { flex: none; padding: 8px; border-bottom: 1px solid var(--border); }
.mm-search input {
  width: 100%; box-sizing: border-box; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; color: var(--text); font-size: 13px;
  font-family: inherit; outline: none;
}
.mm-search input:focus { border-color: var(--accent); }
.mm-search input::placeholder { color: #5c5c66; }
.mm-list { flex: 1 1 auto; overflow-y: auto; padding: 6px; min-height: 0; }
.mm-list .model-option { padding: 8px 10px; }
.mm-list .mo-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-menu .model-switch-group { flex: none; margin: 0; padding: 4px 6px 8px; }
.model-menu::-webkit-scrollbar, .mm-list::-webkit-scrollbar { width: 8px; }
.mm-list::-webkit-scrollbar-thumb { background: #33333d; border-radius: 4px; }
.mm-list::-webkit-scrollbar-thumb:hover { background: #45454f; }

/* ================= 模型价格标签 ================= */
.model-option .mo-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.model-option .mo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-option .mo-price {
  flex: none; font-size: 11px; color: #fbbf24; background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.22); border-radius: 999px;
  padding: 1px 8px; white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* ================= 未登录落地页（仿聚客AI官网） ================= */
.landing {
  position: fixed; inset: 0; z-index: 80; overflow: hidden;
  background: #050507; color: #fff;
}
body.landing-on .topbar,
body.landing-on .sidebar,
body.landing-on .sidebar-mask,
body.landing-on .view-home,
body.landing-on .view-history { display: none !important; }

/* ---- 1:1 嵌入原站登录页 ---- */
.lp-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; background: #08090a; display: block;
}
.lp-catch {
  position: absolute; inset: 0; z-index: 2; cursor: pointer;
}
.lp-brand {
  position: absolute; top: 12px; left: 14px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 4px 16px 4px 5px; border-radius: 999px;
  background: rgba(9, 11, 13, .82);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lp-brand-logo {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: radial-gradient(circle at 32% 30%, #1e2c34, #0b1116 72%);
  box-shadow: 0 0 26px rgba(122, 200, 255, .32), inset 0 0 10px rgba(255,255,255,.05);
}
.lp-brand-name {
  font-size: 1.05rem; font-weight: 600; letter-spacing: .02em;
  color: #f2f7fa; white-space: nowrap;
}
.lp-loading {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #08090a; color: rgba(255,255,255,.66); font-size: 14px;
}
.lp-loading.hidden { display: none; }
.lp-spin {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255,255,255,.16); border-top-color: #7ac8ff;
  animation: lpSpin .9s linear infinite;
}
@keyframes lpSpin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .lp-brand { top: 10px; left: 10px; padding: 3px 12px 3px 4px; }
  .lp-brand-logo { width: 30px; height: 30px; font-size: 17px; }
  .lp-brand-name { font-size: .95rem; }
}

/* 背景网格 + 星点 */
.lp-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.032) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 45%, black 30%, transparent 85%);
}
.lp-stars { position: absolute; inset: 0; }
.lp-stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: rgba(255,255,255,.75); animation: lpTwinkle 3.5s infinite;
}
@keyframes lpTwinkle { 0%,100% { opacity:.15; } 50% { opacity:.9; } }

/* 顶部栏 */
.lp-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
}
.lp-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.lp-logo-icon {
  width: 30px; height: 30px; border-radius: 8px; font-size: 17px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px rgba(59,130,246,.5);
}
.lp-logo-name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.lp-top-right { display: flex; align-items: center; gap: 12px; }
.lp-globe {
  width: 34px; height: 34px; border-radius: 50%; font-size: 15px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  color: #fff; cursor: pointer;
}
.lp-globe:hover { background: rgba(255,255,255,.14); }
.lp-login-sm {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 13px; padding: 8px 22px; border-radius: 8px; cursor: pointer;
  transition: .18s;
}
.lp-login-sm:hover { background: #fff; color: #0a0a0c; }

/* 星球舞台 */
.lp-stage {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: min(620px, 92vw); height: min(620px, 92vw);
}
.lp-planet {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 92%; height: 92%; border-radius: 50%;
  border: 1px solid rgba(190,205,255,.35);
  background: radial-gradient(circle at 38% 32%, rgba(90,110,200,.10), rgba(10,12,24,.6) 62%, rgba(5,6,12,.9));
  box-shadow:
    0 0 60px rgba(110,140,255,.18),
    inset 0 0 90px rgba(80,110,220,.12),
    inset 0 0 22px rgba(160,180,255,.25);
}
.lp-planet-dots {
  position: absolute; inset: 4%; border-radius: 50%;
  background-image: radial-gradient(rgba(190,205,255,.4) 1px, transparent 1.4px);
  background-size: 13px 13px;
  mask-image: radial-gradient(circle at 42% 38%, transparent 26%, black 62%, black 78%, transparent 96%);
  -webkit-mask-image: radial-gradient(circle at 42% 38%, transparent 26%, black 62%, black 78%, transparent 96%);
  opacity: .5; animation: lpSpin 90s linear infinite;
}
@keyframes lpSpin { to { transform: rotate(360deg); } }
.lp-planet-glow {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 108%, rgba(120,150,255,.14), transparent 55%);
}
.lp-orbit {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.10);
}
.lp-orbit-1 { width: 150%; height: 44%; transform: translate(-50%, -50%) rotate(-16deg); }
.lp-orbit-2 { width: 146%; height: 50%; transform: translate(-50%, -50%) rotate(24deg); border-color: rgba(255,255,255,.07); }

/* 漂浮模型图标 */
.lp-chip {
  position: absolute; left: var(--x); top: var(--y); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: lpFloat 7s ease-in-out var(--d, 0s) infinite alternate;
}
.lp-chip i {
  width: 42px; height: 42px; border-radius: 12px; font-style: normal;
  font-size: 19px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 6px 18px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.25);
}
.lp-chip em {
  font-style: normal; font-size: 11px; color: rgba(255,255,255,.62); white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0,0,0,.8);
}
@keyframes lpFloat {
  from { transform: translate(0, -7px); }
  to   { transform: translate(0, 9px); }
}

/* 中央文案 */
.lp-copy {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 4; text-align: center; width: max-content; max-width: 88vw;
}
.lp-title { font-size: clamp(30px, 5.2vw, 52px); font-weight: 800; letter-spacing: 2px; }
.lp-type {
  font-size: clamp(30px, 5.2vw, 52px); font-weight: 800; letter-spacing: 2px;
  margin-top: 6px; min-height: 1.25em; color: #fff;
}
.lp-caret {
  display: inline-block; width: 3px; height: .95em; margin-left: 6px;
  background: #e8ecff; vertical-align: -0.12em; animation: lpCaret 1s steps(2) infinite;
}
@keyframes lpCaret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

.lp-actions { display: flex; gap: 14px; justify-content: center; margin-top: 44px; }
.lp-btn {
  min-width: 128px; padding: 12px 26px; font-size: 15px; cursor: pointer;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.30);
  background: rgba(255,255,255,.04); color: #fff; transition: .18s;
}
.lp-btn:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.1); }
.lp-btn-primary { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.10); }
.lp-btn-primary:hover { background: #fff; color: #0a0a0c; }
.lp-biz {
  display: inline-block; margin-top: 18px; font-size: 12px;
  color: rgba(255,255,255,.55); text-decoration: none;
}
.lp-biz:hover { color: rgba(255,255,255,.9); text-decoration: underline; }

/* 右下角作品展映 */
.lp-gallery {
  position: absolute; right: 26px; bottom: 24px; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  background: rgba(20,22,30,.72); border: 1px solid rgba(255,255,255,.16);
  color: #e8e8f0; font-size: 13px; padding: 10px 18px; border-radius: 10px;
  cursor: pointer; backdrop-filter: blur(6px); transition: .18s;
}
.lp-gallery:hover { border-color: rgba(255,255,255,.4); background: rgba(35,38,50,.85); }

/* 底部 */
.lp-foot {
  position: absolute; bottom: 14px; left: 0; right: 0; z-index: 5;
  text-align: center; font-size: 11px; color: rgba(255,255,255,.35);
}

@media (max-width: 640px) {
  .lp-chip i { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
  .lp-chip em { font-size: 10px; }
  .lp-actions { margin-top: 26px; }
  .lp-btn { min-width: 104px; padding: 10px 18px; font-size: 14px; }
}

/* ================= 落地页 v2（复刻聚客AI orbit 模板，样式取自原站提取） ================= */
.landing { background: #000; z-index: 80; }

/* ---- 原站主题变量 ---- */
.auth-template-stage-orbit {
  --orbit-stage-dark:#08090a;
  --orbit-globe-cool:#7fbbef; --orbit-globe-silver:#f0f5fc; --orbit-globe-warm:#aebccd;
  --orbit-glass-white:#fff; --orbit-glass-cool:#adc9e6; --orbit-glass-warm:#edf0f5;
  --orbit-glass-tint:#f5fcff; --orbit-glass-shadow:#171a1e;
  --orbit-glow-cool:#b8d8f8; --orbit-glow-warm:#e5eaf2;
  --orbit-space-cool:#7ab6dd;
  --orbit-ink:#f1f4f2; --orbit-highlight:#d6e9fb; --orbit-muted:#b7bdc5; --orbit-dim:#89939e;
  --orbit-line:#ffffff26;
  --orbit-focus-cool:#d1e5f8; --orbit-focus-warm:#e3e8ef;
  --orbit-entry-surface:#1c2228; --orbit-entry-hover:#29333e; --orbit-entry-border:#657782;
  --orbit-safe-x:4.5%;
  --orbit-hero-center-y:49%;
  --orbit-hero-width:440px;
  --orbit-ease:cubic-bezier(.2,.7,.2,1);
  --orbit-hero-ice:#b9f0ec; --orbit-hero-white:#f4fcff; --orbit-hero-silver:#c4d6eb;
  --orbit-headline-highlight:linear-gradient(115deg,var(--orbit-hero-white) 12%,var(--orbit-hero-ice) 46%,var(--orbit-hero-white) 64%,var(--orbit-hero-silver) 90%);
  --orbit-headline-glow:0 0 24px rgba(122,182,221,.18);
  --radius-sm:8px;
  z-index:1; background:var(--orbit-stage-dark); color:var(--orbit-ink);
  letter-spacing:0; display:block; position:fixed; inset:0; overflow:hidden;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
}
.auth-template-stage-orbit { --orbit-hero-width:360px; }
@media (max-width:1100px){ .auth-template-stage-orbit { --orbit-hero-width:290px; } }
@media (max-width:760px){
  .auth-template-stage-orbit { --orbit-safe-x:24px; --orbit-hero-center-y:40%; --orbit-hero-width:246px; }
}
@media (max-width:480px){ .auth-template-stage-orbit { --orbit-hero-width:232px; } }

/* ---- 极光背景（原站参数） ---- */
.aurora-canvas { z-index:0; position:fixed; inset:0; overflow:hidden; pointer-events:none; }
.aurora-band { filter:blur(100px); animation:aurora-drift 25s ease-in-out infinite alternate; position:absolute; }
.aurora-band-1 { background:radial-gradient(ellipse at center,rgba(124,57,237,.22) 0,rgba(124,57,237,.05) 50%,transparent 70%); width:80%; height:60%; top:-30%; left:10%; }
.aurora-band-2 { background:radial-gradient(ellipse at 30% 50%,rgba(124,57,237,.12) 0,transparent 60%); width:60%; height:50%; top:-10%; left:-20%; opacity:1; animation-duration:30s; animation-delay:-10s; }
.aurora-band-3 { background:radial-gradient(ellipse at 70% 30%,rgba(64,150,238,.07) 0,transparent 60%); width:50%; height:40%; top:0; right:-10%; opacity:1; animation-duration:35s; animation-delay:-18s; }
@keyframes aurora-drift {
  0% { transform:translate(0,0) scale(1); }
  50% { transform:translate(4%,3%) scale(1.08); }
  100% { transform:translate(-3%,-2%) scale(1.04); }
}

/* ---- 主体与舞台 ---- */
.auth-hero-body { position:relative; z-index:10; display:flex; flex:1 1 auto; flex-direction:column; align-items:center; justify-content:center; padding:40px 24px; min-height:100dvh; }
.orbit-stage { position:absolute; inset:0; width:100%; height:100%; display:block; }

/* ---- 顶部导航（原站 grid 布局） ---- */
.auth-template-nav {
  z-index:2; width:100vw; min-height:5.5rem; background:none; border:0; box-shadow:none;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:1rem;
  margin-top:-2.5rem; margin-left:calc(50% - 50vw); padding:1.15rem clamp(1rem,3vw,3rem);
  display:grid; position:relative;
}
.auth-hero-brand { grid-column:1; justify-self:start; display:flex; align-items:center; gap:.34rem; min-width:0; text-decoration:none; }
.auth-hero-logo {
  width:2rem; height:2rem; border-radius:999px; font-size:1.05rem; font-style:normal;
  background:linear-gradient(135deg,#123,#234); border:1px solid var(--orbit-line);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 28px rgba(64,150,238,.35);
}
.auth-hero-wordmark { text-overflow:ellipsis; white-space:nowrap; max-width:14rem; font-size:1.12rem; overflow:hidden; color:var(--orbit-ink); font-weight:600; }
.auth-template-nav-actions { grid-column:3; justify-self:end; align-items:center; gap:.35rem; display:flex; }
.auth-nav-icon {
  position:relative; display:inline-flex; width:2.5rem; height:2.5rem; align-items:center; justify-content:center;
  border-radius:1rem; border:1px solid var(--orbit-line); background:rgba(255,255,255,.04);
  color:var(--orbit-muted); transition:.18s; cursor:pointer;
}
.auth-nav-icon:hover { color:var(--orbit-ink); background:rgba(255,255,255,.1); }
.auth-template-nav-action {
  letter-spacing:.01em; border-radius:999px; padding:.6rem .85rem; font-size:.76rem; font-weight:650;
  color:rgba(241,244,242,.72); background:none; border:0; cursor:pointer; transition:.18s;
}
.auth-template-nav-action:hover { color:var(--orbit-ink); }

/* ---- 中央文案（原站 grid 行高与渐变字） ---- */
.orbit-chrome { pointer-events:none; position:absolute; inset:0; }
.orbit-chrome a, .auth-template-stage-orbit .orbit-chrome button { pointer-events:auto; }
.orbit-chrome > * { position:absolute; }
.orbit-verbwrap {
  top:var(--orbit-hero-center-y); width:var(--orbit-hero-width); text-align:center; contain:layout;
  max-width:calc(100% - 40px); left:50%; transform:translate(-50%,-50%);
}
.orbit-headline {
  font-family:inherit; text-wrap:nowrap; grid-template-rows:56px 76px; gap:6px; margin:0; display:grid;
}
.orbit-prefix {
  font-size:48px; color:var(--orbit-ink); margin:0; font-weight:600; line-height:56px; display:block;
}
.orbit-verb {
  font-size:74px; font-weight:600; line-height:76px;
  color:var(--orbit-hero-ice); background:var(--orbit-headline-highlight);
  background-clip:text; -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  text-shadow:var(--orbit-headline-glow); display:block;
}
.orbit-verb-line { max-width:100%; min-height:42px; font:400 13px/21px inherit; color:var(--orbit-muted); margin:14px auto 0; }
.orbit-verb-line > span { text-wrap:balance; display:block; }
.orbit-verb-line > span:first-child { color:var(--orbit-ink); font-weight:500; }
.orbit-center-actions { justify-content:center; gap:12px; margin-top:18px; display:flex; }
.orbit-cta-primary, .orbit-cta-secondary {
  border:1px solid var(--orbit-line); border-radius:var(--radius-sm);
  justify-content:center; align-items:center; gap:16px; min-width:132px; min-height:44px;
  margin:0; padding:10px 17px; font-size:13px; font-weight:500; line-height:20px;
  transition:background .16s,border-color .16s; display:inline-flex; cursor:pointer;
  text-decoration:none; font-family:inherit;
}
.orbit-cta-primary { border-color:var(--orbit-entry-border); background:var(--orbit-entry-surface); color:var(--orbit-highlight); box-shadow:inset 0 1px 0 rgba(127,187,239,.12); }
.orbit-cta-primary:hover { background:var(--orbit-entry-hover); border-color:#7d92a5; }
.orbit-cta-secondary { color:var(--orbit-muted); background:none; }
.orbit-cta-secondary:hover { background:var(--orbit-surface,#101716); color:var(--orbit-ink); }
.orbit-secondary-links { justify-content:center; margin-top:10px; display:flex; }
.auth-template-nav-center-link {
  border-radius:999px; color:rgba(241,244,242,.72); padding:.55rem .8rem; min-height:24px;
  background:none; border:0; font-size:11px; line-height:18px; cursor:pointer; font-family:inherit; transition:.18s;
}
.auth-template-nav-center-link:hover { color:var(--orbit-highlight); background:none; }

/* ---- 左右作品焦点卡 ---- */
.orbit-focus {
  top:var(--orbit-hero-center-y); text-align:center; contain:layout; width:228px; max-width:20%;
  min-height:185px; transform:translateY(-50%);
}
.orbit-focus-left { left:10%; }
.orbit-focus-right { right:10%; }
.orbit-eb { font:12px ui-monospace,SFMono-Regular,Consolas,monospace; color:var(--orbit-highlight); line-height:1.6; }
.orbit-focus-left .orbit-eb, .orbit-focus-left .orbit-focus-name { color:var(--orbit-focus-cool); }
.orbit-focus-right .orbit-eb, .orbit-focus-right .orbit-focus-name { color:var(--orbit-focus-warm); }
.orbit-focus-name { min-height:56px; font:500 20px/1.4 inherit; overflow-wrap:anywhere; margin-top:10px; }
.orbit-focus-line { color:var(--orbit-dim); font-size:13px; line-height:1.7; margin-top:4px; }
@media (max-width:1100px){ .orbit-focus { display:none; } }

/* ---- 计数器 / 进度轨 ---- */
.orbit-counter {
  right:var(--orbit-safe-x); font:12px ui-monospace,SFMono-Regular,Consolas,monospace;
  text-align:right; bottom:104px;
}
.orbit-counter b { font-size:30px; font-weight:400; color:var(--orbit-ink); }
.orbit-counter > span { color:var(--orbit-dim); margin-left:12px; }
.orbit-rail { justify-content:flex-end; gap:5px; margin-top:10px; display:flex; }
.orbit-rail i { background:var(--orbit-line); width:14px; height:1px; transition:width .3s,background .3s; }
.orbit-rail i.on { background:var(--orbit-highlight); width:26px; }

/* ---- 作品展映 / 备案 ---- */
.orbit-transport { right:var(--orbit-safe-x); align-items:center; gap:10px; display:flex; bottom:44px; }
.orbit-view-toggle {
  border:1px solid var(--orbit-line); border-radius:var(--radius-sm); min-height:36px;
  color:var(--orbit-muted); background:none; align-items:center; gap:8px; padding:8px 14px;
  font-size:12px; display:inline-flex; cursor:pointer; font-family:inherit; transition:.18s;
}
.orbit-view-toggle:hover { background:rgba(16,23,22,.9); color:var(--orbit-ink); }
.orbit-filing {
  max-width:calc(100% - 2 * var(--orbit-safe-x)); bottom:12px; left:50%; transform:translate(-50%);
  text-align:center;
}
.filing-line { font-size:11px; line-height:1.6; color:rgba(255,255,255,.55); }

/* ---- 响应式字号（原站断点） ---- */
@media (max-width:1440px){ .orbit-verb { font-size:64px; line-height:68px; } }
@media (max-width:1100px){ .orbit-verb { font-size:52px; line-height:56px; } .orbit-headline { grid-template-rows:50px 68px; gap:4px; } .orbit-prefix { font-size:42px; line-height:50px; } }
@media (max-width:760px){
  .orbit-verb { font-size:44px; line-height:48px; } .orbit-headline { grid-template-rows:42px 54px; }
  .orbit-prefix { font-size:35px; line-height:42px; }
  .orbit-counter { bottom:88px; } .orbit-transport { display:none; }
}
@media (max-width:370px){ .orbit-verb { font-size:40px; } }

/* ================= 落地页入场动画（对应原站 orbit-hero 渐显） ================= */
@keyframes orbit-enter {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
@keyframes orbit-enter-plain {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes orbit-enter-mid {
  from { opacity: 0; transform: translateY(calc(-50% + 14px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}
.orbit-verbwrap { animation: orbit-enter .9s cubic-bezier(.2,.7,.2,1) .1s both; }
.orbit-focus-left { animation: orbit-enter-mid .9s cubic-bezier(.2,.7,.2,1) .3s both; }
.orbit-focus-right { animation: orbit-enter-mid .9s cubic-bezier(.2,.7,.2,1) .42s both; }
.orbit-counter { animation: orbit-enter-plain .9s cubic-bezier(.2,.7,.2,1) .55s both; }
.orbit-transport { animation: orbit-enter-plain .9s cubic-bezier(.2,.7,.2,1) .65s both; }
.orbit-filing { animation: orbit-enter-plain 1s cubic-bezier(.2,.7,.2,1) .75s both; }
.orbit-stage { animation: orbit-enter-plain 1.2s cubic-bezier(.2,.7,.2,1) both; }
.auth-template-nav { animation: orbit-enter-plain .8s cubic-bezier(.2,.7,.2,1) .05s both; }

/* 动词渐变字呼吸光 */
@keyframes verb-breathe {
  0%,100% { filter: drop-shadow(0 0 10px rgba(122,182,221,.25)); }
  50%     { filter: drop-shadow(0 0 22px rgba(122,182,221,.5)); }
}
.orbit-verb { animation: verb-breathe 4.5s ease-in-out infinite; }

/* 打字机光标 */
.orbit-verb::after {
  content: ""; display: inline-block; width: 3px; height: .78em; margin-left: 8px;
  background: var(--orbit-hero-ice); vertical-align: -.06em;
  animation: lpCaret 1s steps(2) infinite;
}
@keyframes lpCaret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* ================= Agent 创作方案卡 ================= */
.plan-card {
  margin-top: 14px; padding: 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
}
.plan-card.generated { opacity: .92; }
.plan-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.plan-badge { font-size: 13px; font-weight: 600; color: var(--text); }
.plan-target { font-size: 12px; color: var(--accent); background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.28); padding: 3px 10px; border-radius: 999px; }
.plan-sec { margin-bottom: 12px; }
.plan-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.plan-hint { font-size: 11px; color: #6f6f7a; }
.plan-prompt, .plan-neg textarea {
  width: 100%; resize: vertical; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.7; font-family: inherit; outline: none;
}
.plan-prompt:focus, .plan-neg textarea:focus { border-color: var(--accent); }
.plan-neg { margin-bottom: 12px; }
.plan-neg > summary { cursor: pointer; font-size: 12px; color: var(--text-dim); list-style: none; padding: 2px 0 6px; }
.plan-neg > summary::-webkit-details-marker { display: none; }
.plan-neg > summary::before { content: "▸ "; }
.plan-neg[open] > summary::before { content: "▾ "; }
.plan-refs { display: flex; gap: 10px; flex-wrap: wrap; }
.plan-ref { width: 92px; margin: 0; }
.plan-ref img, .plan-ref-file {
  width: 92px; height: 92px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-soft); display: flex;
  align-items: center; justify-content: center; font-size: 22px;
}
.plan-ref figcaption { margin-top: 5px; font-size: 11px; color: var(--text-dim); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.plan-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-dim); }
.plan-field-wide { grid-column: span 2; }
.plan-field select {
  width: 100%; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 10px; font-size: 12.5px; outline: none; cursor: pointer;
}
.plan-field select:focus { border-color: var(--accent); }
.plan-notes { font-size: 12px; color: var(--text-dim); line-height: 1.65; margin-bottom: 12px; }
.plan-actions { display: flex; gap: 10px; align-items: center; }
.plan-actions .btn-primary { padding: 9px 20px; }
.plan-actions .btn-ghost { padding: 9px 16px; }
.plan-go:disabled { opacity: .6; cursor: default; }

/* 询问式交互：问题 + 选项 */
.ask-card .ask-list { display: flex; flex-direction: column; gap: 14px; }
.ask-item .ask-q { font-size: 13.5px; color: var(--text); margin-bottom: 8px; }
.ask-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-opt {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px; cursor: pointer; transition: all .15s;
}
.ask-opt:hover { border-color: var(--accent); color: #cfe0ff; }
.ask-opt.picked { background: rgba(59,130,246,.16); border-color: var(--accent); color: #dbeafe; }

/* 固定模型说明（Agent 模式模型菜单） */
.mm-fixed { padding: 14px; }
.mm-fixed-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mm-fixed-badge { font-size: 11px; color: var(--accent); background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.28); padding: 2px 8px; border-radius: 999px; }
.mm-fixed-name { font-size: 14px; font-weight: 600; }
.mm-fixed-desc { font-size: 11.5px; color: var(--text-dim); word-break: break-all; margin-bottom: 10px; }
.mm-fixed-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mm-fixed-list li { font-size: 12px; color: var(--text-dim); padding-left: 14px; position: relative; }
.mm-fixed-list li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); }
