/* =====================================================================
   幻愘留言板 · 前台 UI 主题（第一版修改 → 第二版修改微调）
   ---------------------------------------------------------------------
   本次只做“前端美化”，不涉及任何 PHP 逻辑、数据结构与交互行为改动。
   第二版修改：按需求还原 ① 留言卡片顶部配色 ② 分页按钮原渐变样式（仅箭头）
              ③ 素材恢复外部引用 ④ 登录按钮原配色。
   第三版修改：① 留言内容 / 页脚版权加粗 ② 删除验证码刷新阴影层
              ③ 弹窗关闭按钮换暖橙色 + 修复手机端关闭叉号不显示 ④ 链接悬停指针 22.cur。
   第三版修改（配色修订）：关闭按钮改为蓝色渐变「深蓝 #1e40af → 宝蓝 #2f6df6」，
              与青蓝主题统一、白字对比度 8.9:1 / 4.5:1；叉号悬停同步为蓝色。
   设计方向：简约、留白、细边框、柔和阴影；动效统一使用
   transform / opacity（GPU 合成层），时长与缓动统一，保证顺滑不抖动。

   文件结构：
     0. 设计变量 / 字体 / 全局背景
     1. 页面布局与标题
     2. 留言卡片（含置顶、管理员回复）
     3. 留言表单（验证码 / 输入框 / 发布按钮）
     4. 分页
     5. 页脚
     6. 数据加载骨架屏
     7. 系统提示弹窗
     8. 响应式与“减少动态效果”适配
   ===================================================================== */

/* =====================================================================
   0. 设计变量 / 字体 / 全局背景
   ===================================================================== */
:root {
  /* 中性色 */
  --ui-ink:        #1b2537;   /* 主文字 */
  --ui-ink-soft:   #3c4a5e;   /* 次级文字 */
  --ui-muted:      #7b8798;   /* 辅助文字 */
  --ui-line:       #e6ebf2;   /* 分隔线 */
  --ui-line-soft:  #eef2f7;
  --ui-surface:    #ffffff;
  --ui-surface-2:  rgba(255, 255, 255, .72);
  --ui-canvas:     #f8fafc;

  /* 品牌色：青 → 蓝 */
  --ui-brand:      #0d9488;
  --ui-brand-2:    #0ea5a4;
  --ui-brand-ink:  #0f766e;
  --ui-accent:     #2563eb;

  /* 形状与阴影 */
  --ui-radius-sm:  10px;
  --ui-radius:     14px;
  --ui-radius-lg:  20px;
  --ui-radius-pill: 999px;
  --ui-shadow-xs:  0 1px 2px rgba(17, 34, 58, .04);
  --ui-shadow-sm:  0 1px 2px rgba(17, 34, 58, .04), 0 8px 20px -14px rgba(17, 34, 58, .22);
  --ui-shadow-md:  0 2px 4px rgba(17, 34, 58, .04), 0 18px 36px -22px rgba(17, 34, 58, .30);
  --ui-shadow-lg:  0 24px 60px -28px rgba(17, 34, 58, .38);

  /* 动效：统一缓动 */
  --ui-ease:       cubic-bezier(.22, 1, .36, 1);
  --ui-ease-soft:  cubic-bezier(.4, 0, .2, 1);
  --ui-dur:        .28s;

  /* 兼容旧版样式表中引用到的变量名（保持其它规则可用） */
  --book-teal:    var(--ui-brand);
  --book-deep:    #0b3b6f;
  --book-ink:     var(--ui-ink);
  --book-muted:   var(--ui-muted);
  --book-line:    var(--ui-line);
  --book-card-bg: var(--ui-surface);
  --c-prev-1: #4f7cff;
  --c-prev-2: #7b5cff;
  --c-next-1: #0ea5a4;
  --c-next-2: #14b8a6;
  --c-publish-1: #0d9488;
  --c-publish-2: #2563eb;
  /* 弹窗「关闭」按钮：蓝色渐变（深蓝 → 宝蓝）。
     与站内青→蓝主色同一冷色体系，稳而不跳；深浅跨度拉开后渐变清晰可见，
     白色文字在两端的对比度为 8.9:1 / 4.5:1，均满足 WCAG AA。 */
  --c-close-btn-1: #1e40af;
  --c-close-btn-2: #2f6df6;
  --c-close-ink:   #2563eb;
}

/* 第二版修改 · 素材仍使用原站外部引用（字体见 <head> 中的 font.css，
   Logo 与右下角形象由 bootstrap.min.css 指向 www.hkgzs.top），此处不再做本地覆盖。 */

/* 预留滚动条空间，避免弹窗开关时页面左右抖动 */
html {
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* 自定义滚动条：细、中性，与整体风格一致（提高优先级以覆盖外部样式表） */
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cfd8e3, #b9c5d4);
  border-radius: var(--ui-radius-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}
html::-webkit-scrollbar-thumb:hover { background-clip: content-box; background-color: #9fadbe; }

/* 全局背景：极淡的冷色渐变 + 两团缓慢漂移的光晕（纯 transform 动画） */
body {
  position: relative;
  min-height: 100vh;
  color: var(--ui-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: .01em;
  background-color: var(--ui-canvas);
  background-image:
    radial-gradient(1200px 620px at 8% -12%, rgba(13, 148, 136, .10), transparent 62%),
    radial-gradient(1000px 560px at 102% -6%, rgba(37, 99, 235, .09), transparent 60%),
    radial-gradient(900px 520px at 50% 112%, rgba(14, 165, 164, .07), transparent 62%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 背景光晕层：固定定位、纯渐变（不做 filter:blur，避免低端机掉帧），26s 缓慢漂移 */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  pointer-events: none;
  opacity: .55;
  will-change: transform;
}
body::before {
  top: -18vmax;
  left: -14vmax;
  background: radial-gradient(circle at 50% 50%,
              rgba(14, 165, 164, .30) 0%,
              rgba(14, 165, 164, .16) 38%,
              rgba(14, 165, 164, .05) 58%,
              rgba(14, 165, 164, 0) 72%);
  animation: ui-drift-a 26s var(--ui-ease-soft) infinite alternate;
}
body::after {
  bottom: -22vmax;
  right: -16vmax;
  background: radial-gradient(circle at 50% 50%,
              rgba(59, 110, 224, .26) 0%,
              rgba(59, 110, 224, .14) 38%,
              rgba(59, 110, 224, .04) 58%,
              rgba(59, 110, 224, 0) 72%);
  animation: ui-drift-b 32s var(--ui-ease-soft) infinite alternate;
}
@keyframes ui-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
}
@keyframes ui-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.08); }
  to   { transform: translate3d(-5vmax, -3vmax, 0) scale(1); }
}

/* 内容层置于光晕之上；容器去掉外部样式表里的 1px 模糊（性能与清晰度更好） */
.container-fluid {
  position: relative;
  z-index: 1;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* 顶部滚动进度条：改为 3px 细条 + 青蓝渐变（提高优先级覆盖外部 dzc.css） */
body .progress-container {
  height: 3px;
  background: rgba(17, 34, 58, .06);
  z-index: 9999;
}
body .progress-bar {
  background: linear-gradient(90deg, #0d9488, #0ea5a4 45%, #3b82f6 100%);
  box-shadow: 0 0 8px rgba(13, 148, 136, .45);
  transition: width .18s linear;
}

/* 文字选中色 */
::selection { background: rgba(13, 148, 136, .18); color: var(--ui-ink); }

/* 鼠标光标（第三版修改）
   页面整体沿用站点自定义光标；链接悬停时改为站点提供的 22.cur 指针，
   与原站 .mb-5 a:hover 保持一致（外部素材，原站不可访问时自动回退系统指针）。 */
a:hover,
a:focus {
  cursor: url('https://www.hkgzs.top/image/22.cur'), auto;
}

/* 站点 Logo / 右下角装饰形象：第二版修改恢复为原站外部图片引用，
   尺寸与位置沿用 bootstrap.min.css 中的原始定义。 */

/* =====================================================================
   1. 页面布局与标题
   ===================================================================== */
.container-fluid > .col-lg-8.offset-lg-2 {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  padding: 2.6rem 20px 0;
}

/* 外部 Bootstrap 里 .mt-3 / label / h1 带荧光字效与手写体，这里统一收敛为清爽样式 */
.mt-3, .my-3 {
  margin-top: 0 !important;
  font-family: inherit;
  font-weight: inherit;
  text-shadow: none;
}
label {
  display: inline-block;
  margin-bottom: .45rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ui-ink-soft);
  text-shadow: none;
}

h1.book-title {
  position: relative;
  margin: .5rem 0 1.6rem;
  padding-bottom: .7rem;
  font-family: 'Haipai', "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(2rem, 5.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .1em;
  text-align: center;
  color: #0b3b6f;
  background-image: linear-gradient(112deg, #0f766e 0%, #0d9488 38%, #1d6fd8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 18px rgba(13, 148, 136, .16));
  text-shadow: none;
  animation: ui-title-in .7s var(--ui-ease) both;
}
/* 标题下方的细渐变短线：加载时由中间向两侧展开 */
h1.book-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 64px;
  height: 3px;
  margin-left: -32px;
  border-radius: var(--ui-radius-pill);
  background: linear-gradient(90deg, #0d9488, #3b82f6);
  transform-origin: center;
  animation: ui-line-in .85s var(--ui-ease) .12s both;
}
@keyframes ui-title-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ui-line-in {
  from { opacity: 0; transform: scaleX(.2); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* =====================================================================
   2. 留言卡片（置顶区 #top 与列表区 #list 共用）
   ===================================================================== */
.msg-card {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  overflow: hidden;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
  transition: transform var(--ui-dur) var(--ui-ease),
              box-shadow var(--ui-dur) var(--ui-ease),
              border-color var(--ui-dur) var(--ui-ease);
  animation: ui-card-in .5s var(--ui-ease) both;
}
.msg-card:hover {
  transform: translateY(-2px);
  border-color: #dbe4ef;
  box-shadow: var(--ui-shadow-md);
}
@keyframes ui-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
/* 首屏卡片依次浮现（最多 5 张，避免等待过久） */
#list .msg-card:nth-child(1) { animation-delay: .02s; }
#list .msg-card:nth-child(2) { animation-delay: .06s; }
#list .msg-card:nth-child(3) { animation-delay: .10s; }
#list .msg-card:nth-child(4) { animation-delay: .14s; }
#list .msg-card:nth-child(5) { animation-delay: .18s; }

/* 卡片头部：第二版修改 · 还原为原站配色（青色 → 深蓝渐变 + 白色文字）
   .bg-info 在原 Bootstrap 中带 !important 渐变，这里沿用同一渐变并保留提权，
   仅调整内边距与字距，使标题与正文的层次仍更清晰。 */
.msg-card .msg-card-header {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.25rem;
  border: 0;
  background: linear-gradient(220.55deg, #24cfc5 0%, #001c63 100%) !important;
  color: #fff !important;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-shadow: none;
}
.msg-card .msg-time-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  color: #fff;
  opacity: .9;
}
.msg-card .msg-time { font-variant-numeric: tabular-nums; }

.msg-card .msg-card-body {
  padding: 1.15rem 1.25rem 1.25rem;
  color: var(--ui-ink);
  font-size: 1.02rem;
  /* 第三版修改 · 留言内容加粗 */
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: .012em;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-shadow: none;
}
.msg-card .msg-text { display: inline; }

/* 置顶标记：低饱和胶囊，不抢正文 */
.badge-top {
  display: inline-flex;
  align-items: center;
  margin-right: .45rem;
  padding: .12rem .5rem;
  border: 1px solid rgba(13, 148, 136, .22);
  border-radius: var(--ui-radius-pill);
  background: rgba(13, 148, 136, .08);
  color: var(--ui-brand-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: 1px;
}

/* 管理员回复：暖色细边框卡片 */
.msg-card .reply-card {
  margin-top: 1rem;
  border: 1px solid #f4e3bd;
  border-left: 3px solid #e0a83a;
  border-radius: var(--ui-radius-sm);
  overflow: hidden;
  background: #fffcf4;
  box-shadow: none;
  transition: border-color var(--ui-dur) var(--ui-ease), box-shadow var(--ui-dur) var(--ui-ease);
}
.msg-card .reply-card:hover {
  transform: none;
  border-color: #eed9a8;
  box-shadow: var(--ui-shadow-xs);
}
.msg-card .reply-card .reply-card-header {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .95rem;
  border: 0;
  background: transparent !important;
  color: #9a6b12 !important;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-shadow: none;
}
.msg-card .reply-card .reply-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  color: #d99a2b;
}
.msg-card .reply-card .reply-card-body {
  padding: 0 .95rem .85rem;
  background: transparent !important;
  color: #6f5a2c;
  font-size: .96rem;
  /* 第三版修改 · 回复正文同步加粗 */
  font-weight: 700;
  line-height: 1.78;
  text-shadow: none;
}

/* 空数据提示：改为居中的轻量空状态 */
#list > p.mt-3.text-danger,
#list > p.mt-3.text-success {
  margin-top: 1rem !important;
  margin-bottom: 1rem;
  padding: 2.4rem 1rem;
  border: 1px dashed var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface-2);
  color: var(--ui-muted) !important;
  font-size: .95rem;
  text-align: center;
}

/* =====================================================================
   3. 留言表单（验证码 / 输入框 / 发布按钮）
   ===================================================================== */
#myform {
  margin-top: 1.4rem;
  padding: 1.15rem;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface-2);
  -webkit-backdrop-filter: blur(8px) saturate(1.04);
  backdrop-filter: blur(8px) saturate(1.04);
  box-shadow: var(--ui-shadow-sm);
  animation: ui-card-in .55s var(--ui-ease) .1s both;
}
#myform .form-group { margin-bottom: .9rem; }
#myform .form-group:last-child { margin-bottom: 0; }

/* 验证码：输入框 + 图形验证码同一行 */
.scode-group {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: .6rem;
}
.scode-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: .5rem .95rem;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .28em;
  transition: border-color var(--ui-dur) var(--ui-ease),
              box-shadow var(--ui-dur) var(--ui-ease),
              background var(--ui-dur) var(--ui-ease);
}
.scode-input::placeholder {
  color: #a6b2c2;
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: .02em;
}
.scode-input:focus {
  border-color: var(--ui-brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .12);
  outline: 0;
}
.scode-box {
  position: relative;
  flex: 0 0 auto;
  width: 126px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-xs);
  cursor: pointer;
  transition: border-color var(--ui-dur) var(--ui-ease), box-shadow var(--ui-dur) var(--ui-ease);
}
.scode-box:hover {
  border-color: rgba(13, 148, 136, .45);
  box-shadow: 0 4px 14px -6px rgba(13, 148, 136, .4);
}
.scode-box:active { transform: scale(.985); }
.scode-box:focus-visible {
  outline: 0;
  border-color: var(--ui-brand);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .14);
}
.scode-img {
  display: block;
  width: 110px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  cursor: pointer;
}
/* 第三版修改 · 删除验证码上的“刷新”阴影遮罩层：
   该元素（.scode-refresh）不再参与显示，验证码图完整露出；
   点击验证码图仍会刷新（相关逻辑在 index.php 中，未改动）。 */
.scode-refresh { display: none !important; }

/* 留言输入框 + 字数统计 */
.content-group { position: relative; }
#myform #content {
  min-height: 128px;
  padding: .85rem 1rem 1.9rem;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-size: 1rem;
  line-height: 1.72;
  resize: vertical;
  transition: border-color var(--ui-dur) var(--ui-ease),
              box-shadow var(--ui-dur) var(--ui-ease);
}
#myform #content::placeholder { color: #a6b2c2; }
#myform #content:focus {
  border-color: var(--ui-brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .12);
  outline: 0;
}
.content-counter {
  position: absolute;
  right: .75rem;
  bottom: .5rem;
  padding: 0 .3rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, .85);
  color: var(--ui-muted);
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* 发布按钮 */
.btn-publish {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .78rem 1.4rem;
  border: 0;
  border-radius: var(--ui-radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .06em;
  background: linear-gradient(112deg, #0d9488 0%, #0f9d9a 55%, #2f6df6 100%);
  box-shadow: 0 8px 20px -10px rgba(13, 148, 136, .65);
  transition: transform .2s var(--ui-ease), box-shadow .2s var(--ui-ease), filter .2s var(--ui-ease);
}
.btn-publish:hover,
.btn-publish:focus {
  color: #fff;
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow: 0 12px 26px -12px rgba(13, 148, 136, .75);
}
.btn-publish:active { transform: translateY(0) scale(.992); }
.btn-publish:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .18), 0 8px 20px -10px rgba(13, 148, 136, .65);
}
.btn-publish .send-icon {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  transition: transform .3s var(--ui-ease);
}
.btn-publish:hover .send-icon { transform: translate(2px, -2px) rotate(-6deg); }
/* 掠过式高光：悬停时从左到右扫过 */
.btn-publish::after {
  content: "";
  position: absolute;
  top: 0;
  left: -55%;
  width: 38%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent);
  transform: skewX(-18deg);
  transition: left .6s var(--ui-ease);
  pointer-events: none;
}
.btn-publish:hover::after { left: 125%; }
.btn-publish .btn-spinner {
  display: none;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 255, 255, .38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ui-spin .7s linear infinite;
}
.btn-publish.is-loading { pointer-events: none; opacity: .9; }
.btn-publish.is-loading .send-icon { display: none; }
.btn-publish.is-loading .btn-spinner { display: inline-block; }

/* =====================================================================
   4. 分页（上一页 / 页码 / 下一页）
   ---------------------------------------------------------------------
   第二版修改 · 还原原样：上一页蓝紫渐变、下一页青碧渐变，
   按钮内只保留箭头（不显示文字），悬停时箭头向外轻移。
   ===================================================================== */
#pager {
  display: flex;
  gap: .6rem;
  align-items: center;
  justify-content: center;
  margin: 1.2rem 0;
  padding: 0;
  list-style: none;
}
#pager .page-item { display: block; }
#pager .page-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: .5rem 1.1rem;
  border: 1px solid rgba(31, 45, 61, .12);
  border-radius: var(--ui-radius-pill);
  background: #fff;
  color: #33507a;
  font-size: .95rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(31, 45, 61, .06);
  transition: transform .18s var(--ui-ease), box-shadow .18s var(--ui-ease),
              background .18s var(--ui-ease), color .18s var(--ui-ease);
}
#pager .page-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(31, 45, 61, .12);
  text-decoration: none;
}
#pager .page-link:active { transform: translateY(0) scale(.97); }

/* 页码信息：浅蓝底胶囊，不可点击 */
#pager .page-item-info .page-link,
#pager .page-count {
  cursor: default;
  background: #eef4ff;
  color: #33507a;
  border-color: transparent;
  box-shadow: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#pager .page-item-info .page-link:hover { transform: none; box-shadow: none; }

/* 上一页：蓝紫渐变 + 左箭头 */
#pager #prev {
  background: linear-gradient(135deg, var(--c-prev-1), var(--c-prev-2));
  color: #fff;
  border: 0;
  box-shadow: 0 6px 16px rgba(79, 124, 255, .30);
}
#pager #prev:hover { color: #fff; box-shadow: 0 10px 22px rgba(79, 124, 255, .40); }
#pager #prev:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(79, 124, 255, .22), 0 6px 16px rgba(79, 124, 255, .30);
}
#pager #prev::before {
  content: "←";
  font-size: 1.05em;
  line-height: 1;
  transition: transform .18s var(--ui-ease);
}
#pager #prev:hover::before { transform: translateX(-3px); }

/* 下一页：青碧渐变 + 右箭头 */
#pager #next {
  background: linear-gradient(135deg, var(--c-next-1), var(--c-next-2));
  color: #fff;
  border: 0;
  box-shadow: 0 6px 16px rgba(14, 165, 164, .30);
}
#pager #next:hover { color: #fff; box-shadow: 0 10px 22px rgba(14, 165, 164, .40); }
#pager #next:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .22), 0 6px 16px rgba(14, 165, 164, .30);
}
#pager #next::after {
  content: "→";
  font-size: 1.05em;
  line-height: 1;
  transition: transform .18s var(--ui-ease);
}
#pager #next:hover::after { transform: translateX(3px); }

/* =====================================================================
   5. 页脚（纯文字，链接下划线动效）
   ===================================================================== */
.site-footer {
  margin-top: 2.2rem;
  margin-bottom: 3.2rem;
  text-align: center;
  /* 第三版修改 · 页脚版权信息加粗 */
  font-weight: 700;
  text-shadow: none;
}
.site-footer-divider {
  height: 1px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 1rem;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(17, 34, 58, .14), transparent);
}
.site-footer-text {
  margin: 0;
  color: var(--ui-muted);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.site-footer .site-footer-link,
.site-footer-link {
  display: inline-flex;
  align-items: center;
  gap: .26rem;
  position: relative;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ui-ink-soft);
  font-size: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s var(--ui-ease);
}
.site-footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0d9488, #3b82f6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ui-ease);
}
.site-footer-link:hover,
.site-footer-link:focus { color: var(--ui-brand-ink); text-decoration: none; }
.site-footer-link:hover::after,
.site-footer-link:focus::after { transform: scaleX(1); }
.site-footer-link:focus-visible {
  outline: 0;
  border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .18);
}
.site-footer-link .ext-icon {
  width: .8em;
  height: .8em;
  opacity: .65;
  transition: transform .2s var(--ui-ease), opacity .2s var(--ui-ease);
}
.site-footer-link:hover .ext-icon { transform: translate(1px, -1px); opacity: 1; }

/* =====================================================================
   6. 数据加载：旋转指示 + 骨架屏
   ===================================================================== */
.ui-loading { padding: .5rem 0; }
.ui-loading-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin: .5rem 0 1rem;
  color: var(--ui-muted);
  font-size: .9rem;
  letter-spacing: .04em;
}
.ui-spinner {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(13, 148, 136, .2);
  border-top-color: var(--ui-brand);
  border-radius: 50%;
  animation: ui-spin .8s linear infinite;
}
.ui-skeleton-card {
  margin-bottom: .9rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-xs);
}
.ui-skeleton-line {
  height: .72rem;
  border-radius: var(--ui-radius-pill);
  background: linear-gradient(90deg, #eef2f7 25%, #f7fafc 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: ui-shimmer 1.5s ease infinite;
}
.ui-skeleton-line + .ui-skeleton-line { margin-top: .6rem; }
.ui-skeleton-line.w-30 { width: 30%; }
.ui-skeleton-line.w-60 { width: 60%; }
.ui-skeleton-line.w-90 { width: 90%; }

@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* =====================================================================
   7. 系统提示弹窗（前台与登录页共用）
   ---------------------------------------------------------------------
   .modal / .modal-dialog / .modal-backdrop 三者时长统一为 .26s，
   关闭时同步淡出，避免 Bootstrap 提前 display:none 造成的“闪一下”。
   ===================================================================== */
#myModal.fade,
#my-alert.fade { transition: opacity .26s var(--ui-ease); }

#myModal .modal-dialog,
#my-alert .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100% - 2rem);
}
#myModal.fade .modal-dialog,
#my-alert.fade .modal-dialog {
  transform: translateY(14px) scale(.97);
  opacity: 0;
  transition: transform .26s var(--ui-ease), opacity .26s var(--ui-ease);
  will-change: transform, opacity;
}
#myModal.show .modal-dialog,
#my-alert.show .modal-dialog { transform: none; opacity: 1; }

#myModal .modal-content,
#my-alert .modal-content {
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--ui-radius-lg);
  overflow: hidden;
  box-shadow: var(--ui-shadow-lg);
}
#myModal .modal-header,
#my-alert .modal-header {
  display: flex;
  align-items: center;
  padding: 1.05rem 1.25rem .8rem;
  border-bottom: 1px solid var(--ui-line-soft);
  background: linear-gradient(180deg, #fbfdfe, #f6fafb);
}
#myModal .modal-title,
#my-alert .modal-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--ui-ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-shadow: none;
}
#myModal .modal-title::before,
#my-alert .modal-title::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #2f6df6);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
  font-weight: 700;
  box-shadow: 0 4px 10px -4px rgba(13, 148, 136, .8);
}
/* 右上角关闭叉号（第三版修改）
   ---------------------------------------------------------------------
   修复：原先依赖字体字形 “×” 绘制，部分手机系统字体缺少该字形时会得到零宽空白，
   叉号因此“不显示”。现改为两条 CSS 线条绘制，完全不依赖字体，桌面/手机一致。
   同时禁止被标题挤压（flex: 0 0 auto），并加大触控热区。 */
#myModal .close,
#my-alert .close {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9aa5b5;
  font-size: 0;              /* 隐藏原始 × 字符，改用 CSS 线条绘制 */
  line-height: 1;
  opacity: 1;
  text-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: color .2s var(--ui-ease), background .2s var(--ui-ease), transform .3s var(--ui-ease);
}
#myModal .close::before,
#myModal .close::after,
#my-alert .close::before,
#my-alert .close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background .2s var(--ui-ease);
}
#myModal .close::before,
#my-alert .close::before { transform: translate(-50%, -50%) rotate(45deg); }
#myModal .close::after,
#my-alert .close::after { transform: translate(-50%, -50%) rotate(-45deg); }
/* 悬停 / 聚焦：与底部「关闭」按钮同一色系（蓝），两处关闭入口视觉呼应 */
#myModal .close:hover,
#my-alert .close:hover {
  color: var(--c-close-ink);
  background: rgba(37, 99, 235, .09);
  opacity: 1;
  transform: rotate(90deg);
}
#myModal .close:focus,
#my-alert .close:focus {
  outline: 0;
  color: var(--c-close-ink);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

#myModal .modal-body,
#my-alert .modal-body {
  padding: 1.5rem 1.5rem 1.1rem;
  color: var(--ui-ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
  text-shadow: none;
}
.sys-msg { font-weight: 600; }

#myModal .modal-footer,
#my-alert .modal-footer {
  justify-content: center;
  padding: .4rem 1.25rem 1.35rem;
  border-top: 0;
}
/* 第三版修改 · 弹窗底部「关闭」按钮配色（蓝色渐变）
   ---------------------------------------------------------------------
   取色：深蓝 #1e40af → 宝蓝 #2f6df6。
     · 统一：与站内「青 #0d9488 → 蓝 #2563eb」同属冷色体系，落在同一界面里协调；
     · 克制：关闭是次要操作，用沉稳的深蓝打底，不与「发布留言」抢视觉；
     · 可读：两端白色文字对比度 8.9:1 / 4.5:1，满足 WCAG AA；
     · 质感：内高光 + 同色柔和投影，悬停上浮 1px 并掠过一道高光（与「发布留言」同款）。 */
#myModal .modal-footer .btn,
#my-alert .modal-footer .btn,
.btn-close-modal {
  position: relative;
  overflow: hidden;
  min-width: 7.5rem;
  padding: .58rem 1.9rem;
  border: 0;
  border-radius: var(--ui-radius-sm);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .08em;
  background: linear-gradient(135deg, var(--c-close-btn-1) 0%, var(--c-close-btn-2) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 8px 20px -10px rgba(37, 99, 235, .50);
  transition: transform .2s var(--ui-ease), box-shadow .2s var(--ui-ease), filter .2s var(--ui-ease);
}
#myModal .modal-footer .btn:hover,
#my-alert .modal-footer .btn:hover,
.btn-close-modal:hover {
  color: #fff;
  transform: translateY(-1px);
  filter: saturate(1.06) brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .26),
    0 12px 26px -12px rgba(37, 99, 235, .66);
}
#myModal .modal-footer .btn:active,
#my-alert .modal-footer .btn:active,
.btn-close-modal:active { transform: translateY(0) scale(.985); }
#myModal .modal-footer .btn:focus-visible,
#my-alert .modal-footer .btn:focus-visible,
.btn-close-modal:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(47, 109, 246, .26),
    0 8px 20px -10px rgba(37, 99, 235, .50);
}
/* 掠过式高光：与「发布留言」同款，悬停时自左向右扫过 */
#myModal .modal-footer .btn::after,
#my-alert .modal-footer .btn::after,
.btn-close-modal::after {
  content: "";
  position: absolute;
  top: 0;
  left: -55%;
  width: 38%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .34), transparent);
  transform: skewX(-18deg);
  transition: left .6s var(--ui-ease);
  pointer-events: none;
}
#myModal .modal-footer .btn:hover::after,
#my-alert .modal-footer .btn:hover::after,
.btn-close-modal:hover::after { left: 125%; }

/* 遮罩：只过渡 opacity，与弹窗同步 */
.modal-backdrop {
  background: rgba(15, 26, 44, .34);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: opacity .26s var(--ui-ease);
}
.modal-backdrop.show { opacity: 1; }

/* =====================================================================
   8. 响应式
   ===================================================================== */
@media (max-width: 991px) {
  .container-fluid > .col-lg-8.offset-lg-2 {
    max-width: 100%;
    padding: 1.5rem 16px 0;
  }
}

@media (max-width: 576px) {
  body { font-size: .98rem; }
  h1.book-title {
    margin-top: .25rem;
    margin-bottom: 1.2rem;
    font-size: clamp(1.7rem, 8vw, 2.1rem);
    letter-spacing: .08em;
  }
  .msg-card .msg-card-body { padding: 1rem 1.05rem 1.1rem; font-size: 1rem; }
  .msg-card .msg-card-header { padding: .55rem 1.05rem; }
  #myform { padding: .9rem; border-radius: var(--ui-radius); }
  .scode-box { width: 112px; }
  .scode-img { width: 98px; height: 36px; }
  .scode-input { letter-spacing: .18em; }
  #pager .page-link { padding: .45rem .85rem; font-size: .85rem; }
  /* 第三版修改 · 手机端加大弹窗关闭叉号的触控热区（叉号由 CSS 绘制，不依赖字体） */
  #my-alert .close,
  #myModal .close { width: 2.25rem; height: 2.25rem; }
  #my-alert .close::before,
  #my-alert .close::after,
  #myModal .close::before,
  #myModal .close::after { width: 15px; height: 2px; }
  .site-footer { margin-bottom: 4.5rem; }
}

/* =====================================================================
   9. 尊重系统“减少动态效果”偏好
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  body::before,
  body::after { animation: none !important; }
}
