/* 测试交流墙 —— 网页端样式(无框架, 无构建)
 *
 * 版式: 顶栏一条(吸顶); 下面一行分成两栏 —— 左边 6 成是评论区(大标题 + 列表 + 正下方的发表框),
 * 右边 4 成上面是【界面预览】的展示图、下面是【待测试内容】文件列表(都直接列出, 不折叠)。
 * 字号全部写 rem, 只有 html 上那一条 font-size 在动, 整页跟着窗口缩放。
 */
:root {
  --bg: #f4f7fc;
  --card: #ffffff;
  --line: #e3e9f2;
  --line-2: #edf1f8;
  --text: #1b2431;
  --muted: #6b7789;
  --brand: #2563eb;
  --brand-2: #4f46e5;
  --brand-dark: #1d4ed8;
  --brand-soft: #eef4ff;
  --ok: #12805c;
  --err: #d92d20;
  --warn: #b45309;
  --radius: 14px;
  --shadow-1: 0 1px 2px #1020400d;
  --shadow-2: 0 10px 30px #10285a12;
  --ring: 0 0 0 3px #2563eb29;
}

/* 字号跟着窗口宽度走: 1440 宽以下恒为 16px, 之后随窗口变宽而变大, 封顶 22px —— 大屏上不会缩在中间一小块。 */
html { font-size: clamp(16px, 0.4vw + 10.9px, 22px); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--text);
  font: 0.875rem/1.6 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
        "Source Han Sans SC", "Noto Sans CJK SC", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1100px 520px at 8% -12%, #e6efff 0%, #e6efff00 62%),
    radial-gradient(900px 460px at 102% -6%, #eeebff 0%, #eeebff00 58%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 600; margin: 0; }
.muted { color: var(--muted); font-size: 0.75rem; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 0.8125rem; }
.hint.warn { color: var(--warn); font-weight: 600; }
.empty { color: var(--muted); font-size: 0.8125rem; text-align: center; padding: 38px 0; margin: 0; }

button { font: inherit; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }

input, textarea {
  font: inherit; color: var(--text); background: #fbfcfe;
  border: 1px solid #d5dde9; border-radius: 10px; padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, textarea:focus {
  outline: none; background: #fff; border-color: var(--brand); box-shadow: var(--ring);
}
textarea { width: 100%; resize: none; line-height: 1.7; }

.primary {
  color: #fff; border: 0; border-radius: 10px; padding: 10px 20px; font-weight: 600;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 6px 16px #2563eb2e;
  transition: filter .15s, box-shadow .15s, transform .12s;
}
.primary:hover:not(:disabled) {
  filter: brightness(1.06); box-shadow: 0 9px 22px #2563eb3d; transform: translateY(-1px);
}
.primary:active:not(:disabled) { transform: translateY(0); }
.primary.wide { width: 100%; padding: 12px 18px; letter-spacing: 2px; }

.ghost {
  background: #fff; color: #475569; border: 1px solid #dbe2ec;
  border-radius: 10px; padding: 7px 14px; font-size: 0.8125rem;
  transition: border-color .15s, color .15s, background .15s;
}
.ghost:hover { border-color: #bcd0f5; color: var(--brand); background: var(--brand-soft); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-1);
}

/* ---------------- 那个小圆标(登录卡 / 顶栏各一个) ---------------- */
.logo {
  width: 3.1rem; height: 3.1rem; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; border-radius: 17px;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 10px 22px #2563eb3d;
}
.logo.sm {
  width: 2.15rem; height: 2.15rem; margin: 0; border-radius: 11px;
  box-shadow: 0 5px 14px #2563eb33;
}

/* ---------------- 登录 ---------------- */
.center-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 34px 20px;
}
.login-card {
  width: 100%; max-width: 27rem; padding: 2.2rem 2rem 1.7rem;
  text-align: center; box-shadow: var(--shadow-2);
}
.login-card h1 { font-size: 1.3rem; letter-spacing: .2px; }
.login-card .sub { margin: 9px 0 22px; color: var(--muted); font-size: 0.8125rem; line-height: 1.7; }
.block { display: block; text-align: left; margin-bottom: 16px; font-size: 0.8125rem; color: #3a4553; }
.block input {
  margin-top: 6px; width: 100%; text-transform: uppercase; text-align: center;
  font-family: ui-monospace, "Consolas", "Courier New", monospace;
  font-size: 0.9375rem; letter-spacing: 1.4px;
}
.err { color: var(--err); font-size: 0.8125rem; min-height: 20px; margin-top: 10px; }
.agree { margin: 12px 0 0; color: var(--muted); font-size: 0.6875rem; }

/* ---------------- 声明(登录卡里那份) ---------------- */
.terms {
  margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--line);
  text-align: left; color: #5a6678; font-size: 0.6875rem; line-height: 1.8;
}
.terms-title {
  font-size: 0.6875rem; font-weight: 600; color: #44506a;
  letter-spacing: 2px; margin-bottom: 6px;
}
.terms p { margin: 0 0 6px; }
.terms ul { margin: 6px 0; padding-left: 1.05rem; }
.terms li { margin: 2px 0; }
.terms strong { color: #3d4a60; font-weight: 600; }
.terms em { font-style: normal; font-weight: 600; color: var(--warn); }

/* ---------------- 顶栏: 标题居中, 常驻吸顶 ---------------- */
header {
  position: sticky; top: 0; z-index: 20;      /* 右边那些大图往下滚时, 顶栏不动 */
  flex: none; padding: 13px 1.3rem;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  background: #ffffffdd; backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px #1020400f;
}
.head-side { min-width: 0; }                    /* 左边留个空位, 中间那块才真居中 */
.brand { display: flex; align-items: center; gap: 13px; justify-self: center; min-width: 0; }
/* 右边垫一块和左边图标一样宽的空位 —— 标题才真的落在页面正中, 不被图标顶偏 */
.brand::after { content: ""; flex: none; width: 2.15rem; }
.brand-text {
  font-weight: 700; font-size: 1.5rem; letter-spacing: .6px; line-height: 1.25;
  white-space: nowrap;
}
.who { justify-self: end; display: flex; align-items: center; gap: 10px; }
.who > * { flex: none; white-space: nowrap; }
.who-code {
  font-size: 0.75rem; color: var(--muted); letter-spacing: .4px;
  background: #f2f5fb; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px;
}
/* 剩余灵石: 进页面就摆在这儿, 不用点 */
.who-lingshi {
  font-size: 0.75rem; font-weight: 600; color: var(--ok);
  background: linear-gradient(180deg, #edf9f3, #e4f5ec);
  border: 1px solid #c4e6d4; border-radius: 999px; padding: 3px 12px;
}

/* ---------------- 版式: 左 60% 讨论区 / 右 40% 界面展示图 + 待测试内容 ---------------- */
/* 整页走"页面滚动"——右边那些大图一张张往下铺; 顶栏吸顶; 左边讨论区吸在顶栏下面、
 * 自己内部滚, 里面的发表框照旧钉在讨论区正下方(不用翻到底)。 */
#mainView { min-height: 100vh; display: flex; flex-direction: column; }

.layout {
  flex: 1 1 auto;
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 18px;
}

.feed-col {
  flex: 0 0 60%; min-width: 0;
  position: sticky; top: calc(var(--hdr-h, 80px) + 16px);
  height: calc(100vh - var(--hdr-h, 80px) - 32px);
  display: flex; flex-direction: column; gap: 14px;
}
.side {
  flex: 1 1 40%; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
}
/* 右栏两块: 上面界面展示图, 下面待测试内容 */
.side-block { padding: 16px 18px 18px; }
.side-title {
  font-size: 0.9375rem; font-weight: 600; letter-spacing: .3px;
  padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}

/* ---------------- 评论列表 ---------------- */
.feed-card {
  flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow-2);
}
/* 评论区大标题: 一直看得见, 不跟着评论列表滚。
 * ★2026-10-01 用户要求: 原来那条"欢迎 + 声明"整块不要了, 换成几个大字「评论区」, 做大、有艺术感。
 * 做法: 渐变文字 + 两团柔光 + 右上角一个大圆圈点缀, 干净不花。 */
.feed-hero {
  flex: none; margin: 0; padding: 22px 24px 20px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(460px 170px at 12% -45%, #cbdcff8c 0%, #cbdcff00 70%),
    radial-gradient(380px 160px at 94% 140%, #e2d9ff8c 0%, #e2d9ff00 70%),
    linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  border-bottom: 1px solid var(--line);
}
.feed-hero::after {                    /* 右上角一个大圆圈, 当装饰 */
  content: ""; position: absolute; right: -36px; top: -50px;
  width: 152px; height: 152px; border-radius: 50%;
  background: linear-gradient(135deg, #7ea6ff33, #8b7bff26);
}
.feed-hero-title {
  margin: 0; position: relative;
  font-size: 2.7rem; font-weight: 800; line-height: 1.12; letter-spacing: .18em;
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 80%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px #2563eb26);
}

.feed-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 22px 18px; }
.feed-scroll::-webkit-scrollbar { width: 9px; }
.feed-scroll::-webkit-scrollbar-thumb { background: #d5dfec; border-radius: 999px; }
.feed-scroll::-webkit-scrollbar-thumb:hover { background: #c2cfe2; }

/* 【加载更多】: 评论列表底部那个按钮, 点一下再拉 30 条旧的(见 app.js 的 loadMore) */
.feed-more { padding: 14px 0 4px; text-align: center; }
.feed-more .ghost { padding: 9px 30px; }
.feed-more .ghost.busy { opacity: .6; }

.fb-item { border-top: 1px solid var(--line-2); padding: 14px 0; }
.fb-item:first-child { border-top: 0; padding-top: 12px; }
.fb-item.mine {
  border-top: 0; margin: 5px 0; padding: 13px 14px; border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  box-shadow: inset 3px 0 0 -1px var(--brand);
}
.fb-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
/* 头像: 颜色按激活码算(见 app.js 的 avatarBg), 不同人颜色不一样 */
.fb-avatar {
  flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.6875rem; font-weight: 600; letter-spacing: .2px;
}
.fb-who { font-weight: 600; font-size: 0.8125rem; color: #24344d; }
.fb-tag {
  font-size: 0.6875rem; color: #1d4ed8; background: #e3edff;
  border: 1px solid #cfe0fb; border-radius: 999px; padding: 1px 9px;
}
/* 每条评论上的【删除】: 只有管理员(A001)看得见 —— 见 static/app.js 的 fbCard */
.fb-del {
  margin-left: auto; font: inherit; font-size: 0.6875rem; line-height: 1.5;
  color: #b42318; background: #fef3f2; border: 1px solid #fecdca;
  border-radius: 999px; padding: 1px 9px; cursor: pointer;
}
.fb-del:hover { background: #fee4e2; }
.fb-del:disabled { opacity: .55; cursor: default; }

/* ---------------- 回复(★2026-09-30 加的): 每条评论上有个【回复】, 回复挂在评论下面 ---------------- */
.fb-act {                        /* 那个【回复】小按钮 */
  font: inherit; font-size: 0.6875rem; line-height: 1.5;
  color: var(--brand); background: #f2f7ff; border: 1px solid #cfe0fb;
  border-radius: 999px; padding: 1px 9px; cursor: pointer;
}
.fb-act:hover { background: #e4efff; }
.fb-replies {                    /* 回复列表: 缩进 + 左边一条竖线, 一眼看出是从属关系 */
  margin: 10px 0 0 calc(1.75rem + 9px); padding-left: 1rem;
  border-left: 2px solid #e3ebf7;
}
.fb-reply { border-top: 0; padding: 9px 0; }
.fb-reply:first-child { padding-top: 2px; }
.fb-reply .fb-avatar { width: 1.35rem; height: 1.35rem; font-size: 0.5625rem; }
.fb-reply .fb-text, .fb-reply .fb-shots { margin-left: calc(1.35rem + 8px); }
.fb-reply .fb-text { font-size: 0.8125rem; }
.fb-reply.mine { padding: 9px 11px; margin: 3px 0; }
.fb-reply-box { margin-top: 11px; margin-left: calc(1.75rem + 9px); }
.fb-reply-box textarea { font-size: 0.8125rem; }
.fb-reply-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.fb-reply-foot .primary, .fb-reply-foot .ghost { padding: 6px 16px; font-size: 0.8125rem; }
.fb-text {
  margin: 7px 0 0 calc(1.75rem + 9px); white-space: pre-wrap; word-break: break-word;
  font-size: 0.875rem;
}
.fb-shots { display: flex; flex-wrap: wrap; gap: 8px; margin: 11px 0 0 calc(1.75rem + 9px); }
.fb-shots img {
  width: 7.6rem; height: 5.6rem; object-fit: cover;
  border: 1px solid var(--line); border-radius: 10px; cursor: zoom-in;
  box-shadow: var(--shadow-1);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.fb-shots img:hover {
  border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 18px #1020401f;
}

/* ---------------- 发表框(评论区正下方) ---------------- */
.composer { flex: none; padding: 16px 20px 18px; box-shadow: var(--shadow-2); }
.composer textarea { background: #fbfcfe; }
.post-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 12px;
}

/* 选截图: 3 个格子, 也可以直接往输入框里 Ctrl+V 粘 */
.shots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px; }
.shots:empty { display: none; }
.shot-cell {
  position: relative; width: 4.6rem; height: 4.6rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed #c8d6e8; border-radius: 11px;
  background: #f8fafd; cursor: pointer; overflow: hidden;
  transition: border-color .15s, background .15s, transform .15s;
}
.shot-cell:hover { border-color: var(--brand); background: var(--brand-soft); }
.shot-cell input[type="file"] { display: none; }
.shot-plus { font-size: 1.4rem; color: #9fb0c4; line-height: 1; }
.shot-cell.has { border-style: solid; border-color: var(--line); cursor: default; }
.shot-cell.has img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-del {
  position: absolute; top: 3px; right: 3px;
  width: 1.25rem; height: 1.25rem; padding: 0; line-height: 1;
  color: #fff; background: #000000a8; border: 0; border-radius: 50%;
  font-size: 0.875rem;
}
.shot-del:hover { background: var(--err); }

/* ---------------- 右栏上半: 界面展示图(一列大图, 按序号从上往下铺) ---------------- */
.board-list { display: flex; flex-direction: column; gap: 14px; }
.board-pic {
  display: block; width: 100%; height: auto; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: 10px; background: #f7f9fc;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.board-pic:hover {                    /* 点一下放大, 再点一下缩回(复用看大图弹层) */
  border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 18px #1020401f;
}

/* ---------------- 文件列表 ---------------- */
.tool-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-2);
}
.tool-row:first-child { border-top: 0; }
.tool-info { min-width: 0; }
.tool-name { font-weight: 600; font-size: 0.875rem; word-break: break-all; }
.tool-row .primary { flex: none; white-space: nowrap; }
/* 右侧按钮组: 【功能说明】链接 + 【下载】按钮 并排(★2026-10-21, 见 app.js loadTools) */
.tool-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.tool-acts .ghost { text-decoration: none; white-space: nowrap; }

/* ---------------- 弹层 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 40; padding: 24px;
  background: #0f172a73; backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}

/* 看大图 */
.shot-modal { flex-direction: column; gap: 10px; cursor: zoom-out; background: #0f172ad9; }
.shot-modal img {
  max-width: 92vw; max-height: 82vh; border-radius: 12px;
  background: #fff; box-shadow: 0 18px 50px #00000066;
}
.shot-modal p { color: #e6ecf5; margin: 0; }

/* ---------------- 小提示条 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 60; max-width: 82vw;
  background: #1f2733f2; color: #fff;
  border-radius: 12px; padding: 10px 20px; font-size: 0.8125rem;
  box-shadow: 0 12px 30px #0f172a3d;
}
.toast.bad { background: var(--err); }

/* ---------------- 中等宽度: 顶栏改成上下两行(标题一行、账号一行), 免得挤在一起 ---------------- */
@media (max-width: 62rem) {
  header {
    grid-template-columns: minmax(0, 1fr); justify-items: center;
    row-gap: 10px; padding: 12px 1rem;
  }
  .head-side { display: none; }
}

/* ---------------- 窄屏: 改成上下排(评论区在上, 界面展示图 + 待测试内容依次在下, 整页滚动) ---------------- */
@media (max-width: 46rem) {
  .brand-text { font-size: 1.2rem; white-space: normal; }
  .who { gap: 7px; flex-wrap: wrap; justify-content: center; }
  .who-code { padding: 2px 9px; }
  .who-lingshi { padding: 2px 9px; font-size: 0.6875rem; }
  #mainView { height: auto; min-height: 100vh; }
  .layout { flex-direction: column; padding: 12px; gap: 12px; }
  .feed-col { flex: none; position: static; height: auto; }
  .side { flex: none; min-width: 0; }
  .feed-card { min-height: 62vh; }
  .card { padding: 15px; }
  .feed-hero { padding: 16px 16px 14px; }
  .feed-hero-title { font-size: 2rem; }
  .feed-scroll { padding: 6px 15px 16px; }
  .fb-replies { margin-left: 0.6rem; padding-left: 0.7rem; }
  .fb-text, .fb-shots, .fb-reply-box { margin-left: 0; }
  .fb-reply .fb-text, .fb-reply .fb-shots { margin-left: 0; }
  .post-foot { flex-direction: column; align-items: stretch; }
  .post-foot .primary { width: 100%; }
}
