/* ============================================================
   学生教学网站 · Layui 主题层
   布局与组件走 Layui，这里只保留主题定制
   ============================================================ */
:root {
  --primary: #2ea3f2;
  --primary-dark: #1b7fc4;
  --ink: #333333;
  --muted: #747474;
  --light: #f7f9fc;
  --dark: #14212e;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(20, 50, 90, .06);
  --shadow-md: 0 12px 32px rgba(20, 50, 90, .12);
  --ease: cubic-bezier(.22, .61, .36, 1);
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 注：不要用 optimizeLegibility —— Chromium 下它会把行内 SVG 后面的第一个汉字渲染成错字（2026-10-08 导航栏 BUG） */
  text-rendering: optimizeSpeed;
}
h1, h2, h3 { letter-spacing: .015em; }
code, pre, kbd {
  font-family: "JetBrains Mono", "SF Mono", SFMono-Regular, Consolas, "Courier New", monospace;
}
b, strong, .dl-num b { font-variant-numeric: tabular-nums; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* Layui 主按钮跟随主题色 */
.layui-btn-normal { background-color: var(--primary); }
.layui-btn-normal:hover { opacity: .9; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: box-shadow .3s;
}
/* 顶栏收缩态（滚动后由 JS 加上 .scrolled） */
.site-header.scrolled { box-shadow: 0 6px 22px rgba(10, 35, 70, .14); }
.site-header.scrolled .header-inner { height: 52px; }
.header-inner { transition: height .3s var(--ease); }
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.logo { font-size: 20px; font-weight: 800; color: var(--dark); white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
.logo img { height: 42px; width: 42px; object-fit: contain; }
.logo b { color: var(--primary); }
.layui-nav.site-nav {
  background: transparent; padding: 0;
  display: flex; align-items: center;
}
.site-header.scrolled .layui-nav.site-nav .layui-nav-item > a { line-height: 52px; }
.site-header.scrolled .nav-search-form { height: 52px; }
.layui-nav.site-nav .layui-nav-item > a { color: #444; font-size: 15px; white-space: nowrap; }
.site-nav .layui-nav-item > a:hover { color: var(--primary); }
.site-nav .layui-nav-bar { background: var(--primary); }
/* ---------- 导航栏菜单图标 ---------- */
.site-nav .layui-nav-item > a .nav-icon {
  width: 16px; height: 16px; margin-right: 6px;
  vertical-align: -3px; flex-shrink: 0;
}
.site-nav .layui-nav-child dd a .nav-icon {
  width: 14px; height: 14px; margin-right: 7px; vertical-align: -2px;
}
.site-nav .layui-nav-more { border-top-color: #999; }
.site-nav .layui-nav-child { background: #fff; border: 1px solid #eee; }
.site-nav .layui-nav-child dd a {
  color: #444; position: relative; overflow: hidden;
  transition: color .25s ease, background .25s ease, transform .25s ease;
}
.site-nav .layui-nav-child dd a::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--primary), #6ec1ff);
  transform: scaleY(0); transform-origin: top;
  transition: transform .25s ease;
}
.site-nav .layui-nav-child dd a::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(46,163,242,.14), transparent);
  transform: skewX(-18deg); transition: left .45s ease; pointer-events: none;
}
.site-nav .layui-nav-child dd a:hover {
  background: var(--light); color: var(--primary); transform: translateX(3px);
}
.site-nav .layui-nav-child dd a:hover::before { transform: scaleY(1); }
.site-nav .layui-nav-child dd a:hover::after { left: 130%; }
.nav-search-form { display: flex; align-items: center; padding: 0 8px; height: 60px; }
.nav-search-box { position: relative; display: inline-block; }
.nav-search-box .layui-input { width: 170px; height: 32px; padding-right: 36px; border-radius: 16px; }
.nav-search-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; font-size: 15px; padding: 4px 8px; line-height: 1;
}
.nav-search-btn:hover { opacity: .7; }
.nav-search-btn svg { display: block; transition: stroke .2s; }
.nav-search-btn:hover svg { stroke: var(--primary); }
/* ---------- 登录 / 注册：同款胶囊按钮 ---------- */
.layui-nav.site-nav .layui-nav-item.nav-auth { padding: 0 5px; }
.layui-nav.site-nav .layui-nav-item.nav-auth > a {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 20px; line-height: 1;
  border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s;
}
.layui-nav.site-nav .layui-nav-item.nav-auth > a svg { width: 15px; height: 15px; flex-shrink: 0; }
.auth-btn-login {
  border: 1.5px solid var(--primary); color: var(--primary);
  background: rgba(255,255,255,.7);
}
.layui-nav.site-nav .layui-nav-item.nav-auth > a.auth-btn-login:hover {
  background: rgba(46,163,242,.10); color: var(--primary-dark);
  transform: translateY(-1px);
}
.auth-btn-register {
  border: 1.5px solid transparent; color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 4px 14px rgba(46,163,242,.35);
}
.layui-nav.site-nav .layui-nav-item.nav-auth > a.auth-btn-register:hover {
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(46,163,242,.45);
}

/* ---------- 全屏轮播 ---------- */
#heroCarousel { height: 100vh !important; min-height: 600px; }
#heroCarousel [carousel-item] > * { height: 100%; }
.hero-slide { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,18,32,.58) 0%, rgba(8,18,32,.42) 55%, rgba(8,18,32,.62) 100%);
}
.hero-caption {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 0 24px;
}
.slide-kicker {
  font-size: 13px; letter-spacing: 4px; color: #ffd166;
  margin-bottom: 14px; font-weight: 700;
}
.hero-caption h1 { font-size: 54px; font-weight: 800; text-shadow: 0 4px 24px rgba(0,0,0,.35); margin-bottom: 16px; color: #fff; }
.hero-caption p { font-size: 20px; opacity: .92; max-width: 640px; margin-bottom: 32px; }
.hero-caption .layui-btn { margin: 0 6px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
/* 轮播里的 primary 按钮默认是透明底+深灰字，在深色照片上看不见，改成白色描边 */
.hero-caption .layui-btn-primary {
  background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.9); color: #fff;
}
.hero-caption .layui-btn-primary:hover { background: rgba(255,255,255,.30); border-color: #fff; color: #fff; }

/* ---------- 轮播左右箭头：常显、置于 caption 之上 ---------- */
#heroCarousel .layui-carousel-arrow {
  z-index: 5;
  width: 52px; height: 52px; line-height: 52px; margin-top: -26px;
  font-size: 24px; border-radius: 50%;
  background-color: rgba(0,0,0,.35); color: #fff;
  transition: background-color .25s, transform .25s;
}
#heroCarousel .layui-carousel-arrow[lay-type="sub"] { left: 24px; }
#heroCarousel .layui-carousel-arrow[lay-type="add"] { left: auto; right: 24px; }
#heroCarousel .layui-carousel-arrow:hover {
  background-color: var(--primary); transform: scale(1.08);
}

/* ---------- 分区 ---------- */
.section { padding: 80px 0; }
.section-title { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-title .kicker {
  color: var(--primary); font-weight: 700; font-size: 13px;
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 10px;
}
.section-title h2 { font-size: 38px; color: var(--dark); margin-bottom: 6px; }
.section-title .divider { width: 64px; height: 4px; background: var(--primary); border-radius: 2px; margin: 16px auto; }
.section-title p { color: var(--muted); }

/* ---------- 特性 ---------- */
.blurb-icon {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 18px;
  background: linear-gradient(135deg, rgba(46,163,242,.14), rgba(46,163,242,.04));
  border: 2px solid rgba(46,163,242,.25);
  display: flex; align-items: center; justify-content: center; font-size: 38px;
}

/* ---------- 特性链接 ---------- */
.feature-link { display: block; color: var(--ink); }
.feature-link:hover { color: var(--ink); }
.feature-link h3 { color: var(--dark); transition: color .25s; }
.feature-link:hover h3 { color: var(--primary); }
.feature-link .blurb-icon { transition: transform .25s; }
.feature-link:hover .blurb-icon { transform: scale(1.08); }

/* ---------- 内页头图 ---------- */
.page-header {
  background: linear-gradient(135deg, #123c5f 0%, #1b6ca8 55%, #2ea3f2 130%);
  color: #fff; text-align: center; padding: 150px 24px 72px; position: relative; overflow: hidden;
}
.page-header h1 { font-size: 46px; margin-bottom: 10px; color: #fff; }
.page-header p { opacity: .85; margin: 0; }
.page-header a.back { color: rgba(255,255,255,.7); }

/* ---------- CTA 横幅 ---------- */
.cta-band {
  background: linear-gradient(120deg, #0f4c81 0%, #2ea3f2 100%);
  color: #fff; text-align: center; padding: 88px 24px; position: relative; overflow: hidden;
}
.cta-band h2 { font-size: 38px; color: #fff; margin-bottom: 8px; }
.cta-band p { opacity: .9; margin-bottom: 28px; }

/* ---------- 头像 ---------- */
.avatar-xs { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: -9px; margin-right: 6px; }
.avatar-initial {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1b6ca8, var(--primary));
  color: #fff; font-weight: 700;
}
.avatar-xs.avatar-initial { font-size: 15px; }
.avatar-lg { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.avatar-lg.avatar-initial { font-size: 48px; }

/* ---------- 卡片微调 ---------- */
.layui-card { border-radius: 8px; }
.layui-card .card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.layui-card .card-title a { color: var(--dark); }
.layui-card .card-title a:hover { color: var(--primary); }
.meta { color: var(--muted); font-size: 13px; }
.work-img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #e9eef5;
  transition: transform .45s var(--ease);
}
/* ---------- 作品卡片悬停动效 ---------- */
.work-card { overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.work-card:hover { transform: translateY(-8px); box-shadow: 0 16px 34px rgba(20, 60, 110, .16); }
.work-card:hover .work-img { transform: scale(1.07); }
.work-thumb-wrap { position: relative; display: block; overflow: hidden; }
.work-thumb-wrap::after {
  content: ""; position: absolute; inset: 0; background: rgba(10, 25, 45, 0);
  transition: background .3s ease; pointer-events: none;
}
.work-card:hover .work-thumb-wrap::after { background: rgba(10, 25, 45, .25); }
.soft-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.soft-row .grow { flex: 1; min-width: 200px; }
.dl-num { text-align: center; }
.dl-num b { font-size: 24px; color: var(--primary); display: block; }

/* ---------- 公告 ---------- */
.notice-card { border-left: 4px solid var(--primary); }
/* 置顶公告：无背景色，与公告区融为一体，只留左侧 accent 条（老何要求去掉背景色） */
.notice-pinned {
  background: transparent;
  border: none; border-left: 4px solid #ffb800;
  border-radius: 0; padding: 4px 0 4px 20px; margin-bottom: 20px;
  box-shadow: none;
}
.notice-pinned-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.notice-pinned-head .meta { color: #98a2b3; font-size: 12.5px; }
.notice-pinned-title { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.notice-pinned-body { color: #55606e; line-height: 1.75; font-size: 14.5px; }
/* 普通公告：紧凑行列表，点开弹窗看全文 */
.notice-list {
  background: #fff; border: 1px solid #e8edf3; border-radius: 10px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(20, 50, 90, .05);
}
.notice-row {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; cursor: pointer;
  transition: background .15s ease;
}
.notice-row + .notice-row { border-top: 1px solid #f0f2f5; }
.notice-row:hover { background: #f6f9ff; }
.notice-row-title {
  flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notice-row-date { color: #98a2b3; font-size: 12.5px; white-space: nowrap; }
.notice-row-arrow { color: #c3ccd9; font-size: 18px; line-height: 1; }
.notice-full { padding: 20px 22px; }
.notice-full-meta { color: #98a2b3; font-size: 12.5px; margin-bottom: 10px; }
.notice-full-body { line-height: 1.8; font-size: 14.5px; color: var(--ink); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--dark); color: #9fb0c3; }
.site-footer h3 { color: #fff; font-size: 17px; margin-bottom: 16px; }
.site-footer a { color: #9fb0c3; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 18px; font-size: 13px; }

/* ---------- 个人中心 ---------- */
.profile-center { padding: 56px 32px; text-align: center; }
.profile-center h2 { margin: 0; }
.avatar-wrap { position: relative; display: inline-block; cursor: pointer; margin-bottom: 18px; }
.avatar-edit-badge {
  position: absolute; right: 0; bottom: 4px; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 1px solid #e6e6e6; box-shadow: 0 2px 8px rgba(0,0,0,.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #666;
  opacity: 0; transform: scale(.7); transition: opacity .2s, transform .2s;
}
.avatar-wrap:hover .avatar-edit-badge { opacity: 1; transform: scale(1); }
.bio-line {
  position: relative; display: inline-block; cursor: pointer;
  margin-top: 12px; padding: 6px 34px 6px 14px; border-radius: 8px;
  color: #555; max-width: 100%; transition: background .2s;
}
.bio-line:hover { background: var(--light); }
.bio-edit-badge {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: #999; opacity: 0; transition: opacity .2s;
}
.bio-line:hover .bio-edit-badge { opacity: 1; }

/* ---------- 导航下拉箭头：CSS 三角形，不依赖图标字体 ---------- */
.layui-nav .layui-nav-more::before {
  content: "" !important;
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
}

/* ---------- 留言板：回复与锚点 ---------- */
.message-card { scroll-margin-top: 84px; transition: box-shadow .3s, border-color .3s; }
.message-card:target {
  border: 1px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(46,163,242,.18);
}
.reply-item {
  margin-top: 12px; padding: 12px 16px;
  background: #f7fafd; border-radius: 10px;
  border-left: 3px solid #cfe3f7;
  scroll-margin-top: 84px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.reply-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.reply-item p { margin: 0 0 4px; font-size: 14px; }
.reply-toggle { font-size: 13.5px; color: var(--primary); cursor: pointer; }
.reply-toggle:hover { text-decoration: underline; }
.reply-form { margin-top: 12px; padding: 16px; background: #f7fafd; border-radius: 10px; }

/* ---------- 留言关系图谱（全宽） ---------- */
.voice-graph-section { padding-left: 0; padding-right: 0; }
.voice-graph-wrap {
  position: relative;
  background: #fff;
}
#voiceGraph { display: block; width: 100%; height: 560px; touch-action: manipulation; }
@media (max-width: 768px) { #voiceGraph { height: 420px; } }
.voice-tip {
  position: absolute; z-index: 6;
  display: flex; gap: 12px; align-items: flex-start;
  max-width: 300px; min-width: 200px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15,40,80,.20);
  border: 1px solid #e6edf5;
  padding: 14px 16px;
  transform: translate(-50%, calc(-100% - 20px));
  pointer-events: none;
}
.voice-tip[hidden] { display: none !important; }
.voice-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -7px;
  width: 14px; height: 14px; background: #fff;
  border-right: 1px solid #e6edf5; border-bottom: 1px solid #e6edf5;
  transform: translateX(-50%) rotate(45deg);
}
.voice-tip-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 2px solid var(--primary);
  background: #dfe9f3;
}
.voice-tip-name { font-weight: 700; font-size: 15px; color: var(--dark); margin-bottom: 4px; }
.voice-tip-name small { font-weight: 400; color: var(--gray); margin-left: 6px; font-size: 12px; }
.voice-tip-text { font-size: 13.5px; line-height: 1.65; color: #3c4a5c; }
.voice-tip-reply {
  margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: #5a6b80;
  background: #f2f7fd; border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0; padding: 6px 10px;
}
.voice-graph-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-size: 15px;
}

.voice-tip-foot {
  margin-top: 8px; font-size: 12px; color: var(--gray);
}

/* ---------- 卡片行居中 ---------- */
.row-center { display: flex; flex-wrap: wrap; justify-content: center; }
.row-center > [class*="layui-col-"] { float: none; }

/* ---------- 富文本正文 ---------- */
.richtext { font-size: 17px; line-height: 1.9; }
.richtext h3 { color: var(--dark); margin-top: 1.6em; }
.richtext blockquote {
  border-left: 4px solid var(--primary); background: var(--light);
  margin: 1.4em 0; padding: 14px 20px; border-radius: 0 8px 8px 0;
}
.richtext pre {
  background: #1e2a38; color: #d6e4f0; padding: 20px; border-radius: 8px; overflow-x: auto;
}
.richtext code { background: rgba(46,163,242,.12); padding: 2px 7px; border-radius: 4px; font-size: .92em; }
.richtext pre code { background: none; padding: 0; color: inherit; }
.richtext img { border-radius: 8px; max-width: 100%; }
.richtext table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
.richtext th, .richtext td { border: 1px solid #dfe6ee; padding: 10px 14px; }
.richtext th { background: var(--light); }

/* ---------- 滚动入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; }
.reveal.d2 { transition-delay: .24s; }

/* ---------- 响应式：平板及手机（≤992px）汉堡菜单 ---------- */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-mobile-only { display: none !important; }
@media (max-width: 992px) {
  .nav-toggle { display: block; }
  .nav-desktop-only { display: none !important; }
  .nav-mobile-only { display: block !important; }
  .header-inner { position: relative; }
  .layui-nav.site-nav {
    display: none;
    position: absolute; top: 60px; left: 0; right: 0;
    background: #fff; padding: 8px 0;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    max-height: calc(100vh - 60px); overflow-y: auto;
    z-index: 1001;
  }
  .layui-nav.site-nav.open { display: block; }
  .layui-nav.site-nav .layui-nav-item { display: block; }
  .layui-nav.site-nav .layui-nav-item a { padding: 10px 24px; line-height: 1.8; }
  .layui-nav.site-nav .layui-nav-bar { display: none; }
  .nav-search-form { display: flex; padding: 6px 24px 12px; height: auto; }
  .nav-search-box { width: 100%; }
  .nav-search-box .layui-input { width: 100%; }
  .layui-nav.site-nav .layui-nav-item.nav-auth > a { margin: 8px 24px; height: 38px; }
}

/* ---------- 留言墙（水波浮动） ---------- */
.msg-wall { columns: 3; column-gap: 20px; }
.msg-float {
  break-inside: avoid; margin-bottom: 20px; position: relative;
  animation: msg-float 6s ease-in-out infinite;
}
@keyframes msg-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.msg-float:hover { animation-play-state: paused; z-index: 3; }
.msg-card {
  cursor: pointer; margin-bottom: 0;
  transition: transform .25s ease, box-shadow .25s ease;
}
.msg-float:hover .msg-card {
  transform: scale(1.045);
  box-shadow: 0 16px 36px rgba(30, 90, 200, .18);
}
/* 从首页图谱跳转过来的目标留言：放大 + 蓝色光晕 */
.msg-float.msg-target { animation-play-state: paused; z-index: 3; }
.msg-float.msg-target .msg-card {
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(46, 163, 242, .30), 0 0 28px rgba(46, 163, 242, .45);
}
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.msg-head .avatar-xs { margin-right: 0; }
.msg-snippet {
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden; color: #3c4454; line-height: 1.7; margin-bottom: 0;
}
.msg-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; margin-bottom: 0; }
.msg-foot .meta { white-space: nowrap; }
.msg-badge {
  font-size: 12px; color: #0e9f6e; background: #e7f8f0;
  border-radius: 999px; padding: 2px 10px; font-weight: 600; white-space: nowrap;
}
.reply-fab {
  margin-left: auto; font-size: 13px; font-weight: 700; color: var(--primary);
  opacity: 0; transition: opacity .2s ease; white-space: nowrap;
}
.msg-float:hover .reply-fab, .msg-card:focus-visible .reply-fab { opacity: 1; }
.msg-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.msg-modal { padding: 4px 2px; }
.msg-modal .msg-full { color: #2b3242; line-height: 1.8; margin: 4px 0 12px; }
.msg-modal .msg-reply-form { margin-top: 16px; }
@media (hover: none) {
  .reply-fab { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .msg-float { animation: none; }
}
@media (max-width: 992px) {
  .msg-wall { columns: 2; }
}
@media (max-width: 600px) {
  .msg-wall { columns: 1; }
}

/* ---------- AI 助教浮窗 ---------- */
#ai-fab {
  position: fixed; right: 28px; bottom: 96px; z-index: 1500;
  width: 52px; height: 52px; border: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7c5cff); color: #fff;
  cursor: pointer; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s var(--ease), box-shadow .25s;
}
#ai-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 30px rgba(30, 90, 200, .35); }
#ai-fab { padding: 0; overflow: hidden; }
#ai-fab img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.ai-title { display: inline-flex; align-items: center; gap: 8px; }
.ai-title img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #fff; }
.ai-row { display: flex; gap: 8px; align-items: flex-start; }
.ai-row.ai-user { justify-content: flex-end; }
.ai-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; background: #fff; box-shadow: var(--shadow-sm); }
/* 预设头像选择器 */
.preset-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-height: 260px; overflow-y: auto; padding: 12px; border: 1px solid #e6eaf2; border-radius: 8px; background: #fafbfe; }
.preset-item { position: relative; cursor: pointer; }
.preset-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 50%; border: 2px solid transparent; display: block; transition: border-color .15s, box-shadow .15s, transform .18s ease; }
.preset-item:hover { z-index: 5; }
.preset-item:hover img { border-color: #1e5ac8; transform: scale(1.3); box-shadow: 0 4px 14px rgba(30, 90, 200, .28); }
.preset-item.selected img { border-color: #1e5ac8; box-shadow: 0 0 0 3px rgba(30, 90, 200, .18); }
#ai-panel {
  position: fixed; right: 28px; bottom: 160px; z-index: 1501;
  width: 380px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 200px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(10, 30, 80, .25);
  display: flex; flex-direction: column;
}
#ai-panel[hidden] { display: none; }
.ai-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #7c5cff);
}
#ai-close { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; opacity: .85; }
#ai-close:hover { opacity: 1; }
#ai-msgs {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; background: #f6f8fc;
}
.ai-msg {
  max-width: 88%; padding: 9px 12px; border-radius: 12px;
  font-size: 14px; line-height: 1.65; word-break: break-word;
}
.ai-user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ai-bot { align-self: flex-start; background: #fff; color: #2b3242; border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }
.ai-msg pre.paper-code { margin: 8px 0; font-size: 13px; max-width: 100%; overflow-x: auto; }
.ai-msg code.aic { background: rgba(30, 90, 200, .12); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.ai-user code.aic { background: rgba(255, 255, 255, .28); }
.ai-typing { color: var(--muted); }
.ai-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #edf0f6; background: #fff; align-items: flex-end; }
#ai-text {
  flex: 1; resize: none; border: 1px solid #dfe5ef; border-radius: 10px;
  padding: 9px 12px; font-size: 14px; line-height: 1.5; font-family: inherit;
}
#ai-text:focus { outline: none; border-color: var(--primary); }
#ai-send {
  flex-shrink: 0; width: 40px; height: 40px; border: none; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#ai-send:disabled { opacity: .5; cursor: not-allowed; }
.ai-login-tip { padding: 32px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.ai-login-tip a { color: var(--primary); font-weight: 700; }
@media (max-width: 600px) {
  #ai-fab { right: 16px; bottom: 92px; }
  #ai-panel { right: 16px; bottom: 152px; }
}

/* ---------- 响应式微调 ---------- */
@media (max-width: 768px) {
  .header-inner { padding: 0 12px; }
  .hero-caption h1 { font-size: 34px; }
  .hero-caption p { font-size: 17px; }
  .page-header { padding: 120px 24px 56px; }
  .page-header h1 { font-size: 34px; }
  .section-title h2 { font-size: 29px; }
  .section { padding: 56px 0; }
}

/* ============================================================
   V36 现代化升级层（字体 / 图片 / 动效）
   ============================================================ */

/* ---------- 顶部滚动进度条 ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 2000;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), #7cc7ff);
  border-radius: 0 3px 3px 0;
}

/* ---------- 回到顶部 ---------- */
.back-to-top {
  position: fixed; right: 28px; bottom: 32px; z-index: 1500;
  width: 48px; height: 48px; border: none; border-radius: 50%;
  background: #fff; color: var(--primary-dark); cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s;
}
.back-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }

/* ---------- Hero 文案入场（每张幻灯片切换时由 JS 重播） ---------- */
/* 注意：默认必须可见（opacity:1），动画只是锦上添花。
   之前默认 opacity:0、一旦 JS 没加上 .play，标题和按钮就彻底看不见。 */
.hero-caption > * { opacity: 1; }
.hero-caption.play > * { animation: captionUp .8s var(--ease); }
.hero-caption.play > :nth-child(1) { animation-delay: .10s; }
.hero-caption.play > :nth-child(2) { animation-delay: .22s; }
.hero-caption.play > :nth-child(3) { animation-delay: .34s; }
.hero-caption.play > :nth-child(4) { animation-delay: .46s; }
@keyframes captionUp {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: none; }
}
/* 轮播指示器：胶囊式，更现代 */
#heroCarousel .layui-carousel-ind { bottom: 34px; }
#heroCarousel .layui-carousel-ind ul { background: none; }
#heroCarousel .layui-carousel-ind li {
  width: 26px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.35); transition: background .3s, width .3s;
}
#heroCarousel .layui-carousel-ind li.layui-this {
  width: 40px; background: #fff;
}

/* ---------- 滚动显现：方向变体 ---------- */
.reveal-left { opacity: 0; transform: translateX(-36px); transition: opacity .7s ease, transform .7s var(--ease); }
.reveal-right { opacity: 0; transform: translateX(36px); transition: opacity .7s ease, transform .7s var(--ease); }
.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .7s ease, transform .7s var(--ease); }
.reveal-left.visible, .reveal-right.visible, .reveal-scale.visible { opacity: 1; transform: none; }

/* ---------- 徽章：柔和胶囊 ---------- */
.layui-badge {
  border-radius: 999px; padding: 3px 12px; height: auto; line-height: 1.7;
  font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(46,163,242,.25);
}

/* ---------- 按钮：悬停上浮 + 光泽扫过 ---------- */
.layui-btn {
  position: relative; overflow: hidden;
  border-radius: 999px !important;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s !important;
}
.layui-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(46,163,242,.35); }
.layui-btn-normal::after {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .55s ease;
}
.layui-btn-normal:hover::after { left: 130%; }

/* ---------- 卡片：圆角加大 + 悬停上浮（温和通用版） ---------- */
.layui-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(20, 50, 90, .05);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.layui-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.layui-card-body { padding: 22px 24px; }

/* ---------- 分区标题：渐变分隔线 + 更舒展的字距 ---------- */
.section-title h2 { font-weight: 800; letter-spacing: .04em; }
.section-title .kicker { letter-spacing: 5px; }
.section-title .divider {
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  width: 88px;
}

/* ---------- 内页头图：加细腻纹理 ---------- */
.page-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.6px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 30%, transparent 90%);
}

/* ---------- 页脚顶部渐变线 ---------- */
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), #7cc7ff);
}

/* ---------- 作品卡片圆角跟随 ---------- */
.work-card { border-radius: var(--radius); }

/* ---------- 表单输入：聚焦光环 ---------- */
.layui-input:focus, .layui-textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(46,163,242,.18) !important;
}

/* ---------- 尊重“减少动态效果”系统设置 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1 !important; transform: none !important; }
}

/* ---------- 代码块复制按钮 ---------- */
.richtext pre, .paper-code, .quiz-code { position: relative; }
.code-copy-btn {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08);
  color: #d6e4f0; font-size: 12px; line-height: 1; padding: 6px 10px;
  border-radius: 6px; cursor: pointer; opacity: .8; font-family: inherit;
  transition: opacity .2s, background .2s, color .2s, border-color .2s;
}
.code-copy-btn:hover { opacity: 1; background: rgba(255,255,255,.18); }
.code-copy-btn.copied { color: #7bed9f; border-color: rgba(123,237,159,.55); }
@media print { .code-copy-btn { display: none; } }

/* ---------- 教程卡片（电影站式悬停：上浮 + 图片透明层 + 阴影） ---------- */
.lesson-card { overflow: hidden; transition: transform .35s ease, box-shadow .35s ease; }
.lesson-card:hover { transform: translateY(-8px); box-shadow: 0 16px 34px rgba(20, 60, 110, .16); }
.lesson-thumb-wrap { position: relative; display: block; overflow: hidden; }
.lesson-thumb-wrap::after {
  content: ""; position: absolute; inset: 0; background: rgba(10, 25, 45, 0);
  transition: background .35s ease; pointer-events: none;
}
.lesson-card:hover .lesson-thumb-wrap::after { background: rgba(10, 25, 45, .28); }
.lesson-thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  display: block; background: #eef2f7;
  transition: transform .35s ease;
}
.lesson-card:hover .lesson-thumb { transform: scale(1.04); }
/* 卡片底部元信息行：左侧难度分类，右侧眼睛阅读数 */
.lesson-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lesson-views { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lesson-views svg { width: 15px; height: 15px; }

/* ---------- 课程分页（右下角） ---------- */
.lesson-pagination {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 8px; margin-top: 28px; flex-wrap: wrap;
}
.lesson-pagination .pg-btn, .lesson-pagination .pg-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 12px;
  border: 1px solid #e2e8f0; border-radius: 9px;
  background: #fff; color: #475569; font-size: 14px; line-height: 1;
  text-decoration: none; transition: border-color .2s, color .2s, box-shadow .2s;
}
.lesson-pagination .pg-num { padding: 0; width: 34px; font-weight: 600; }
.lesson-pagination a.pg-btn:hover, .lesson-pagination a.pg-num:hover {
  border-color: var(--primary); color: var(--primary);
  box-shadow: 0 2px 8px rgba(46,163,242,.18);
}
.lesson-pagination .pg-current {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: 0 4px 12px rgba(46,163,242,.35);
}
.lesson-pagination .pg-disabled { opacity: .45; cursor: not-allowed; }
.lesson-pagination .pg-ellipsis { color: #94a3b8; padding: 0 2px; letter-spacing: 1px; }

/* ---------- 密码框眼睛切换 ---------- */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap .layui-input { padding-right: 42px; }
.pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; color: #8a94a6;
  padding: 6px; line-height: 1; border-radius: 6px;
}
.pwd-eye:hover { color: var(--primary); }
.pwd-eye svg { width: 18px; height: 18px; display: block; }
