/* X-seeker.cn 前端样式（frontend/style.css）
   2026-08-25 文案审计统一改造：
   - 首页营销+登录、独立注册页样式；
   - 撤满宽顶栏 → 侧栏底部品牌灰字 + 账户区；
   - 三画布统一「上显示区 + 下圆角气泡输入」样式（借鉴 WorkBuddy 输入窗口）。
   配色：主色 #c0392b（红，呼应考试批改）；背景浅灰 #f5f6f8。字体：Book Antiqua / 楷体。 */

* { box-sizing: border-box; }
body { font-family: "Book Antiqua", "楷体", serif; margin: 0; background: #f5f6f8; color: #222; }

/* 通用 */
.hidden { display: none !important; }
h1 { font-size: 22px; margin-top: 0; }
h2 { font-size: 17px; border-left: 4px solid #c0392b; padding-left: 8px; margin-top: 22px; }
h3 { font-size: 15px; margin-bottom: 6px; }
input, select, textarea { padding: 8px; border: 1px solid #ccc; border-radius: 6px; font-family: inherit; font-size: 14px; }
button { padding: 8px 16px; background: #c0392b; color: #fff; border: none; border-radius: 6px; cursor: pointer; align-self: flex-start; }
button:hover { opacity: .9; }
.hint { color: #777; font-size: 13px; }
.hint.warn { color: #c0392b; font-weight: bold; }
/* 演示模式角标：AI 返回含「演示」字样时亮起，提示当前为降级/演示输出 */
.demo-badge { display: inline-block; background: #fff3cd; color: #8a6d3b; border: 1px solid #ffd78a; border-radius: 4px; font-size: 11px; font-weight: normal; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.brand { font-weight: bold; font-size: 20px; color: #c0392b; }
.brand-en { color: #555; font-size: 13px; margin-top: 2px; }
.brand-sub { color: #333; font-size: 16px; margin-top: 10px; line-height: 1.6; max-width: 540px; }
.brand-tip { color: #888; font-size: 13px; margin-top: 8px; line-height: 1.5; max-width: 540px; }
/* 品牌区重排（B 方案：中文名 + 英文角标 + couplet + 定位语） */
.brand-en-eyebrow { color: #c0392b; font-size: 14px; letter-spacing: 2px; font-weight: bold; margin-bottom: 4px; }
.brand-cn { font-size: 52px; font-weight: bold; color: #222; letter-spacing: 6px; line-height: 1.15; margin: 2px 0; }
.brand-title-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.brand-title-row .brand-cn { margin: 2px 0 0; }
.brand-title-row .brand-slogan { font-size: 20px; color: #555; margin-top: 0; letter-spacing: 2px; }
.brand-position { font-size: 19px; color: #c0392b; margin-top: 10px; font-weight: bold; letter-spacing: 2px; }
.field-label { font-size: 14px; color: #555; }
.row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.roles { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.roles label { font-size: 14px; }
.ghost-btn { background: #fff; color: #c0392b; border: 1px solid #c0392b; padding: 5px 12px; border-radius: 6px; font-size: 13px; }
.ghost-btn:hover { background: #c0392b; color: #fff; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 12px; background: #eef2f7; color: #444; border: 1px solid #e0e6ee; }

/* ============ 首页：营销 + 登录 ============ */
#auth.panel { max-width: none; margin: 0; border-radius: 0; box-shadow: none; min-height: 100vh; }
.home-wrap {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
.home-brand {
  padding: 40px 40px 0;
  background: linear-gradient(135deg, #fff 0%, #fdf3f2 100%);
  display: flex; flex-direction: column; justify-content: flex-start;
}
.home-value {
  grid-column: 1 / 2; grid-row: 2 / 3;
  padding: 0 40px 40px 12px;
  display: flex; align-items: flex-end; gap: 28px;
  background: linear-gradient(135deg, #fff 0%, #fdf3f2 100%);
  min-height: 0;
}
.value-content { flex: 1; padding-bottom: 8px; }
.pains { list-style: none; padding: 0; margin: 20px 0 0; }
.pains li { padding: 7px 0 7px 22px; position: relative; font-size: 17px; color: #333; }
.pains li::before { content: "•"; position: absolute; left: 0; color: #c0392b; font-weight: bold; }
.mascot { font-size: 15px; color: #888; margin-top: 12px; }
#auth { position: relative; }
.hero-cat { width: 240px; max-width: 26vw; max-height: 46vh; height: auto; pointer-events: none; flex-shrink: 0; align-self: flex-end; }
.home-login {
  grid-column: 2 / 3; grid-row: 1 / 3;
  width: 380px; flex-shrink: 0; background: #fff; padding: 40px 40px 32px;
  display: flex; flex-direction: column; justify-content: flex-start; border-left: 1px solid #eee;
  min-height: 100vh;
}
.home-login h2 { border: none; padding: 0; margin: 0 0 18px; }
.home-login input { width: 100%; margin-bottom: 12px; }
.home-login button { width: 100%; }

/* ============ 独立注册页（与首页同构：左上品牌 / 右上注册卡 / 左下猫+文字，复用 .home-* 样式） ============ */
#register.panel { max-width: none; margin: 0; min-height: 100vh; }
.wechat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

/* ============ 应用外壳 ============ */
#app.panel { max-width: none; margin: 0; border-radius: 0; box-shadow: none; min-height: 100vh; display: flex; flex-direction: column; background: #f5f6f8; }
#shell { display: flex; flex: 1; min-height: 0; }
#sidebar {
  width: 240px; flex-shrink: 0; background: #fff; border-right: 1px solid #eee;
  padding: 14px 10px; overflow-y: auto; display: flex; flex-direction: column;
}
.menu-group { font-size: 12px; font-weight: bold; color: #999; margin: 14px 6px 6px; letter-spacing: .5px; }
.menu-group:first-child { margin-top: 4px; }
.menu-group.grey { color: #bbb; }
.menu-item { display: block; width: 100%; text-align: left; background: none; color: #222; border: none; padding: 8px 10px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.menu-item:hover { background: #f0f4ff; }
.menu-item.grey { color: #bbb; cursor: default; font-size: 13px; padding: 6px 10px; }
.menu-item.grey:hover { background: none; }
/* 侧栏底部：账户区 + 品牌（审计定稿 §3：品牌沉左下灰字） */
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #eee; }
.side-who { font-size: 13px; color: #555; margin-bottom: 6px; }
.side-link { display: block; width: 100%; text-align: left; background: none; color: #555; border: none; padding: 5px 0; font-size: 13px; cursor: pointer; }
.side-link:hover { color: #333; }
.brand-foot { font-size: 11px; color: #bbb; margin-top: 8px; line-height: 1.4; }

#main { flex: 1; padding: 20px 24px; overflow-y: auto; min-width: 0; }
.view { max-width: 980px; }
#view-writing.view, #view-reading.view, #view-qa.view, #view-materials.view { max-width: none; }

/* 工作台 */
/* 发起练习入口已统一在左侧菜单树，原卡片样式不再使用 */
#recent-list { list-style: none; padding: 0; }
#recent-list li { padding: 8px 10px; border: 1px solid #eee; border-radius: 6px; margin-bottom: 6px; cursor: pointer; }
#recent-list li:hover { background: #f0f4ff; }
.pane { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 18px 20px; max-width: 640px; }
.pane .hint { margin: 0 0 12px; }

/* ============ 统一画布（上显示区 + 下圆角气泡） ============ */
.canvas { display: flex; flex-direction: column; height: calc(100vh - 90px); max-width: 1100px; margin: 0 auto; }
.canvas-top { display: flex; align-items: center; gap: 10px; padding: 6px 4px 10px; }
.back-link { color: #555; text-decoration: none; font-size: 13px; }
.job-no { font-size: 13px; color: #2b4a7a; background: #eef3fc; border: 1px solid #c9d6f0; border-radius: 6px; padding: 2px 9px; margin-left: 8px; white-space: nowrap; }
/* 作业 / ✎ / ⬇ 按钮组推到右侧，让 job 号在「返回工作台」右侧清晰可见 */
.canvas-top .icon-btn:first-of-type { margin-left: auto; }
.icon-btn { margin-left: 4px; background: none; border: 1px solid #ccc; color: #555; border-radius: 6px; padding: 4px 10px; font-size: 14px; }
.icon-btn:hover { background: #eee; color: #333; }

/* 显示区：对话气泡 */
.canvas-display { flex: 1; overflow-y: auto; padding: 16px; background: #fff; border: 1px solid #eee; border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.bub { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.bub.me { align-self: flex-end; background: #f1f3f5; color: #222; border-bottom-right-radius: 4px; }
.bub.ai { align-self: flex-start; background: #f1f3f5; color: #222; border-bottom-left-radius: 4px; }
.bub .stamp { font-size: 11px; color: #888; font-weight: bold; margin-bottom: 4px; }
.bub pre { white-space: pre-wrap; font-family: inherit; margin: 0; font-size: 14px; }
.bub-img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; margin-bottom: 4px; }
.att-preview { display: none; flex-wrap: wrap; gap: 8px; padding: 6px 12px 0; }
.att-thumb { position: relative; width: 56px; height: 56px; border-radius: 8px; background-size: cover; background-position: center; border: 1px solid #eee; }
.att-remove { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: #c0392b; color: #fff; font-size: 12px; line-height: 18px; text-align: center; cursor: pointer; }

/* 底部气泡输入条（借鉴 WorkBuddy） */
.bubble-bar { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; padding: 10px 12px; background: #fff; border: 1px solid #eee; border-radius: 22px; }
.bubble-plus { background: none; border: none; color: #888; font-size: 24px; cursor: pointer; padding: 0 6px; line-height: 1; align-self: center; }
.bubble-bar textarea { flex: 1; border: none; outline: none; resize: none; font-family: inherit; font-size: 14px; min-height: 64px; max-height: 160px; padding: 8px 4px; background: transparent; line-height: 1.5; }
.bubble-send { background: #555; color: #fff; border: none; border-radius: 50%; width: 44px; height: 44px; font-size: 18px; cursor: pointer; align-self: center; flex-shrink: 0; }
.bubble-send:hover { opacity: .9; }
.bubble-send:disabled { opacity: .5; cursor: default; }

/* ============ 写作作业列表（Job List）抽屉 ============ */
.joblist { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.joblist-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.joblist-head span { font-weight: bold; font-size: 14px; color: #333; }
.joblist-items { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.job-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #eee; border-radius: 8px; cursor: pointer; font-size: 14px; }
.job-item:hover { background: #f0f4ff; }
.job-item .ji-topic { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #222; }
.job-item .ji-id { font-size: 11px; color: #999; flex-shrink: 0; }
.job-item .ji-open { color: #c0392b; font-size: 13px; flex-shrink: 0; }
.job-empty { font-size: 13px; color: #999; padding: 6px 2px; }

/* ============ 材料提取 ============ */
#create-materials-pane #m-sources { width: 100%; min-height: 120px; }
#create-materials-pane #m-focus { min-width: 260px; }

/* ============ 问答题卡片 ============ */
#qa-list { list-style: none; padding: 0; }
.qa-card { border: 1px solid #eee; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.qa-qhead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.qa-num { font-weight: bold; font-size: 15px; }
.verdict { font-size: 13px; padding: 3px 10px; border-radius: 12px; font-weight: bold; }
.verdict-ok { background: #e6f7ec; color: #1a7f43; border: 1px solid #b7e4c7; }
.verdict-warn { background: #fff7e6; color: #ad6800; border: 1px solid #ffd591; }
.verdict-bad { background: #fdeaea; color: #c0392b; border: 1px solid #f5c2c2; }
.qa-question { font-size: 14px; margin-bottom: 4px; }
.qa-ref { font-size: 13px; color: #777; margin-bottom: 4px; }
.qa-student { font-size: 14px; margin-bottom: 4px; }
.qa-student em { color: #1a5fb4; font-style: italic; }
.qa-err { font-size: 13px; color: #c0392b; margin-bottom: 4px; background: #fdf3f2; border-left: 3px solid #c0392b; padding: 6px 8px; border-radius: 4px; }
.qa-model { font-size: 14px; color: #1a7f43; }
.qa-overview { border: 1px solid #e0e6ee; border-radius: 8px; padding: 12px 14px; margin-top: 12px; background: #fafbfc; }
.qa-overview h4 { margin: 0 0 8px; }
.qa-overview div { font-size: 14px; margin-bottom: 6px; line-height: 1.5; }
.qa-overview-head h3 { margin: 4px 0 12px; }

/* ============ 监护人授权弹层 ============ */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: #fff; border-radius: 12px; padding: 22px 24px; width: min(420px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.modal-box h3 { margin: 0 0 8px; }
.modal-box .hint { margin: 0 0 12px; }
.modal-box input { width: 100%; margin-bottom: 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ============ 移动端适配（窄屏单列堆叠，字号放大） ============ */
@media (max-width: 820px) {
  .home-wrap { grid-template-columns: 1fr; grid-template-rows: none; }
  .home-brand { padding: 28px 22px 0; }
  .home-value {
    grid-column: 1 / 2; grid-row: auto;
    padding: 18px 22px 30px 14px;
    flex-direction: column; align-items: flex-start; gap: 18px;
  }
  .home-login {
    grid-column: 1 / 2; grid-row: auto;
    width: 100%; border-left: none; border-top: 1px solid #eee;
    min-height: 0; padding: 28px 22px 36px;
  }
  .brand-cn { font-size: 46px; }
  .brand-title-row .brand-slogan { font-size: 18px; }
  .brand-position { font-size: 18px; }
  .pains li { font-size: 17px; }
  .brand-sub, .brand-tip { font-size: 15px; }
  .hero-cat { width: 200px; max-width: 55vw; max-height: 40vh; align-self: flex-start; }
}
