/* ============================================================
   仙堇教育 · 共享主题：水晶质感按钮 + 快捷键帮助面板
   适用：index.html / portal.html / admin.html / course.html
   ============================================================ */

/* ---------- 水晶质感蓝色按钮 ---------- */
.btn-primary,
.btn.primary,
.xj-portal .btn:not(.secondary):not(.ghost) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #83c7f5 0%, #4090d1 42%, #1c5f9e 78%, #15508a 100%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-bottom-color: rgba(8, 40, 72, 0.55);
  text-shadow: 0 1px 2px rgba(8, 35, 66, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -3px 7px rgba(8, 40, 72, 0.4),
    inset 1px 0 1px rgba(255, 255, 255, 0.18),
    inset -1px 0 1px rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(23, 88, 143, 0.42),
    0 2px 5px rgba(8, 40, 72, 0.3);
  transition: transform 0.18s ease, filter 0.25s ease, box-shadow 0.25s ease;
}

/* 顶部玻璃高光帽 */
.btn-primary::before,
.btn.primary::before,
.xj-portal .btn:not(.secondary):not(.ghost)::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 1px;
  right: 1px;
  top: 1px;
  height: calc(50% - 1px);
  border-radius: calc(var(--radius, 8px) - 1px) calc(var(--radius, 8px) - 1px) 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.08) 100%);
  pointer-events: none;
}

/* 扫过的镜面光带（布灵布灵） */
.btn-primary::after,
.btn.primary::after,
.xj-portal .btn:not(.secondary):not(.ghost)::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -25%;
  bottom: -25%;
  left: -80%;
  width: 42%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 32%,
    rgba(255, 255, 255, 0.78) 50%,
    rgba(255, 255, 255, 0.12) 68%,
    transparent 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  animation: xj-crystal-shine 4.6s ease-in-out infinite;
  animation-delay: 1.4s;
}

@keyframes xj-crystal-shine {
  0%, 62% { left: -80%; }
  100% { left: 150%; }
}

/* 悬停：提亮 + 蓝色辉光 */
.btn-primary:hover,
.btn.primary:hover,
.xj-portal .btn:not(.secondary):not(.ghost):hover {
  background: linear-gradient(180deg, #94d1ff 0%, #4e9edc 42%, #2269ac 78%, #175995 100%);
  filter: brightness(1.04) saturate(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -3px 7px rgba(8, 40, 72, 0.35),
    0 10px 26px rgba(35, 122, 198, 0.6),
    0 2px 6px rgba(8, 40, 72, 0.3);
}

/* 按下：凹陷感 */
.btn-primary:active,
.btn.primary:active,
.xj-portal .btn:not(.secondary):not(.ghost):active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    inset 0 2px 6px rgba(8, 40, 72, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 3px 8px rgba(23, 88, 143, 0.35);
}

/* 聚焦描边 */
.btn-primary:focus-visible,
.btn.primary:focus-visible,
.xj-portal .btn:not(.secondary):not(.ghost):focus-visible {
  outline: 2px solid #7fc1f2;
  outline-offset: 2px;
}

/* 深色背景上的水晶按钮：略提亮 */
.coverflow .btn-primary {
  background: linear-gradient(180deg, #8fcff9 0%, #3d91d6 45%, #1c64a8 80%, #164f89 100%);
}

/* 禁用态保持 */
.btn-primary:disabled,
.btn.primary:disabled,
.xj-portal .btn:disabled {
  filter: grayscale(0.4) brightness(0.9);
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- 快捷键悬浮入口 ---------- */
.xj-kb-pill {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #eaf3fc;
  cursor: pointer;
  background: rgba(14, 30, 49, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  transition: background 0.2s ease, transform 0.2s ease;
}
.xj-kb-pill:hover {
  background: rgba(29, 93, 155, 0.82);
  transform: translateY(-1px);
}
.xj-kb-pill kbd {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  color: #103253;
  background: linear-gradient(180deg, #ffffff, #d9e8f7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid #a9c2dc;
  border-radius: 5px;
}

/* ---------- 快捷键帮助面板 ---------- */
.xj-kb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 15, 26, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.xj-kb-overlay.show {
  display: flex;
  animation: xj-kb-fade 0.18s ease;
}
@keyframes xj-kb-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.xj-kb-card {
  width: min(640px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 16px;
  padding: 22px 26px 24px;
  color: #103253;
  background: linear-gradient(180deg, #f8fbff 0%, #e9f2fb 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  animation: xj-kb-pop 0.22s cubic-bezier(0.22, 0.9, 0.3, 1.2);
}
@keyframes xj-kb-pop {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.xj-kb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.xj-kb-head h3 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.xj-kb-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(16, 50, 83, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #103253;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.xj-kb-close:hover { background: #fff; }
.xj-kb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}
.xj-kb-grid h4 {
  grid-column: 1 / -1;
  margin: 14px 0 2px;
  padding-bottom: 5px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #1d5d9b;
  border-bottom: 1px solid rgba(29, 93, 155, 0.2);
}
.xj-kb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(16, 50, 83, 0.12);
  font-size: 13px;
}
.xj-kb-row span { color: #33506e; }
.xj-kb-keys {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.xj-kb kbd,
.xj-kb-card kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #16406e;
  background: linear-gradient(180deg, #ffffff 0%, #d7e6f6 100%);
  border: 1px solid #b9cde2;
  border-bottom-width: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.xj-kb-foot {
  margin-top: 14px;
  font-size: 12px;
  color: #6b8199;
  text-align: center;
}
@media (max-width: 560px) {
  .xj-kb-grid { grid-template-columns: 1fr; gap: 0; }
  .xj-kb-card { padding: 18px 18px 20px; }
}

/* ---------- 全局底部栏（ACU banner） ---------- */
/* 吸底布局：官网 / 课程 / 报名端 */
body.xj-shell,
body.xj-portal {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.xj-shell > .xj-footer,
body.xj-portal > .xj-footer {
  /* 顶部 30px 透明→深蓝的柔和衔接，之后整条保持深色，不再出现白边 */
  background: linear-gradient(180deg,
    rgba(13, 35, 71, 0) 0px,
    rgba(13, 35, 71, 0.55) 12px,
    rgba(13, 35, 71, 0.92) 24px,
    #0d2347 34px,
    #081a36 100%);
  border-top: 0;
}
/* 统一轻量页脚横幅：品牌与导航合为一行 */
.xj-footer-hero {
  position: relative;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  padding: 22px 0 18px;
  /* 过渡交给 .xj-footer 的渐变，这里不再叠 mask，避免顶部泛白 */
  padding-top: 22px;
}
.xj-footer-hero::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 46px;
  background:
    radial-gradient(120px 34px at 12% 100%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(180px 40px at 38% 100%, rgba(255, 255, 255, 0.05), transparent 70%),
    radial-gradient(140px 32px at 64% 100%, rgba(255, 255, 255, 0.06), transparent 70%),
    radial-gradient(200px 44px at 88% 100%, rgba(255, 255, 255, 0.05), transparent 70%);
  pointer-events: none;
}
.xj-footer-hero .xj-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 44px;
  flex-wrap: wrap;
}
.xj-footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.xj-footer-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 46px;
}
.xj-footer-brand-text { display: flex; flex-direction: column; justify-content: space-between; height: 46px; line-height: 1.2; min-width: 0; }
.xj-footer-brand-text strong { font-size: 15.5px; color: #fff; letter-spacing: 0.01em; white-space: nowrap; }
.xj-footer-brand-text span { font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.xj-footer-brand small {
  display: block;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.48);
}
.xj-footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.xj-footer-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 4px 2px;
}
.xj-footer-nav a::after {
  content: "";
  position: absolute; left: 50%; bottom: 0; width: 0; height: 2px;
  background: #ffc61a;
  transform: translateX(-50%);
  transition: width 0.22s ease;
}
.xj-footer-nav a:hover { color: #fff; }
.xj-footer-nav a:hover::after { width: 100%; }
.xj-footer-copy {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0 34px;
  border-top: 0;
  text-align: center;
  white-space: nowrap;
}
.xj-footer-copy small { color: rgba(255, 255, 255, 0.42); font-size: 12px; }
/* 后台左侧深蓝侧栏：底部羽化从深蓝过渡 */
body[data-page="admin"] .xj-footer {
  background:
    linear-gradient(180deg, #0a2a4a 0%, #0c2142 52px, #081a36 100%) 0 0 / 220px 100% no-repeat,
    linear-gradient(180deg, var(--paper) 0%, #0c2142 52px, #081a36 100%);
}
@media (max-width: 900px) {
  body[data-page="admin"] .xj-footer {
    background: linear-gradient(180deg, var(--paper) 0%, #0c2142 52px, #081a36 100%);
  }
}
/* 管理后台 grid 布局：页脚占主内容列 */
.xj-footer-admin { grid-column: 2; }
@media (max-width: 768px) {
  .xj-footer-admin { grid-column: 1; }
}
@media (max-width: 640px) {
  .xj-footer-hero .xj-footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 6px 18px 4px;
  }
  .xj-footer-brand { flex-direction: column; gap: 8px; }
  .xj-footer-nav { justify-content: center; gap: 18px; }
  .xj-footer-copy { flex: 1 1 100%; order: 3; padding: 6px 18px 0; white-space: normal; }
}

/* ============ 作品集 ============ */
.works-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.works-upload-hint {
  color: var(--muted);
  font-size: 13px;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.work-tile {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(29, 93, 155, 0.08);
}
.work-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #eef4fa;
}
.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.work-kind-badge {
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(10, 42, 74, 0.78);
  backdrop-filter: blur(4px);
}
.work-kind-badge.image { background: rgba(29, 93, 155, 0.72); }
.work-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  padding-left: 3px;
  background: rgba(29, 93, 155, 0.72);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.work-play.sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
  padding-left: 2px;
  background: rgba(29, 93, 155, 0.7);
}
.work-title {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 13px;
  background: transparent;
}
.work-title:hover { border-color: var(--line); }
.work-title:focus {
  outline: none;
  border-color: var(--coral);
  background: #fff;
}
.work-cat {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  background: #fff;
}
.work-desc {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 12px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 42px;
  background: #fff;
  color: inherit;
}
.work-award {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  background: #fff;
}
.work-desc:focus,
.work-award:focus {
  outline: none;
  border-color: var(--coral);
}
.work-meta {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}
.work-del {
  position: absolute;
  right: 12px;
  bottom: 10px;
  border: 0;
  background: none;
  color: #b04a4a;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}
.work-del:hover { text-decoration: underline; }

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(5, 18, 32, 0.82);
  backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }
.lightbox-body {
  max-width: 92vw;
  max-height: 90vh;
  text-align: center;
}
.lightbox-body img,
.lightbox-body video {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}
.lightbox-close {
  position: absolute;
  right: 22px;
  top: 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }

/* 报名弹窗：作品选择 */
.reg-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.reg-work-item {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.reg-work-item:hover { border-color: rgba(29, 93, 155, 0.5); }
.reg-work-item.selected {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(29, 93, 155, 0.18);
}
.reg-work-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.reg-work-item .work-play {
  width: 30px;
  height: 30px;
  font-size: 12px;
  padding-left: 2px;
}
.reg-work-name {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reg-work-cat {
  font-size: 11px;
  color: var(--muted);
}
.reg-work-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reg-no-works {
  margin-top: 10px;
  padding: 18px 20px;
  border: 1px dashed rgba(176, 74, 74, 0.55);
  border-radius: 12px;
  background: rgba(176, 74, 74, 0.06);
  color: #8a3f3f;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.reg-no-works[hidden] { display: none; }
.reg-no-works p { margin: 0; font-size: 13px; flex: 1 1 260px; line-height: 1.6; }

/* 报名弹窗：学生信息摘要 */
.reg-student-summary {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream, #f7faff);
}
.rss-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.rss-head strong { font-size: 15px; }
.rss-head span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.rss-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #dbe9f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--coral);
}
.rss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 18px;
}
.rss-grid label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 1px;
}
.rss-grid p { margin: 0; font-size: 13px; }

/* 客户欢迎页 */
.welcome-card {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px);
  border-radius: 18px;
  background: linear-gradient(160deg, #f4f9ff, #ffffff 55%);
  border: 1px solid #dce9f7;
  box-shadow: 0 12px 40px rgba(29, 93, 155, 0.1);
}
.welcome-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.welcome-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(29, 93, 155, 0.18);
  flex: none;
}
.welcome-hero h2 { margin: 0 0 8px; font-size: 24px; color: #0a2a4a; }
.welcome-hero p { margin: 0; color: #4a6178; font-size: 14.5px; }
.welcome-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.welcome-step {
  padding: 20px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e3eef9;
}
.welcome-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #1d5d9b, #3a86c8);
  box-shadow: 0 4px 12px rgba(29, 93, 155, 0.35);
}
.welcome-step h3 { margin: 0 0 8px; font-size: 16px; color: #0a2a4a; }
.welcome-step p { margin: 0; font-size: 13.5px; line-height: 1.7; color: #56697c; }
.welcome-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .welcome-steps { grid-template-columns: 1fr; }
  .welcome-hero { flex-direction: column; text-align: center; }
}

/* 后台赛事表单：科目勾选 */
.subject-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8e2ec);
  border-radius: 8px;
  background: #f8fbff;
}
.subject-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.subject-checks input { width: 16px; height: 16px; accent-color: #1d5d9b; }

/* 报名条件提示 */
.event-type-badge {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(47,127,111,.35);
  background: linear-gradient(135deg, rgba(47,127,111,.14), rgba(47,127,111,.08));
  color: var(--teal);
}
.event-type-badge b { font-weight: 700; }
.eligibility-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid #bcd6f0;
  background: linear-gradient(135deg, #eef6ff, #e3f0fc);
  color: #1d5d9b;
}
.eligibility-banner.invalid {
  border-color: #f0b9b9;
  background: linear-gradient(135deg, #fff3f3, #fde8e8);
  color: #b03030;
}
.eligibility-banner b { font-weight: 700; }
.eligibility-banner ul { margin: 6px 0 0; padding-left: 18px; }

/* 赛事卡：条件标签 */
.elig-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.elig-tag {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  background: #eaf3fc;
  color: #1d5d9b;
  border: 1px solid #cfe2f5;
}

/* 后台详情：分区标题 */
.detail-section {
  margin-top: 14px;
  padding: 8px 12px !important;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, #1d5d9b, #2f7fc2);
  letter-spacing: 0.5px;
}
.detail-section:first-child { margin-top: 0; }

/* 我的报名：媒体尺寸 */
.list-card-media {
  width: 160px;
  flex-shrink: 0;
}
.list-card-media img,
.list-card-media video {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  background: #0c1f33;
}
@media (max-width: 640px) {
  .list-card-media { width: 100%; }
  .ev-cover { aspect-ratio: 4 / 3; }
  .list-card-media img,
  .list-card-media video {
    width: 100%;
    height: 180px;
  }
  .lightbox { padding: 16px; }
}

/* ================= 导航栏夜间模式 / 语言切换按钮（圆角胶囊） ================= */
.xj-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 42px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(238, 246, 255, 0.4));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 4px 14px rgba(21, 74, 126, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #1f5c97;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.xj-icon-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(224, 238, 252, 0.62));
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(21, 74, 126, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}
.xj-icon-btn:active { transform: translateY(0); }
#xjLangBtn { width: auto; padding: 0 14px; }

/* ================= 夜间模式 ================= */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6eef8;
  --muted: #9db1c6;
  --paper: #0b1521;
  --cream: #142436;
  --line: #25394f;
  --teal: #5aa0d8;
  --coral: #4a98de;
  --gold: #dabb82;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}
:root[data-theme="dark"] body {
  background: var(--paper);
  color: var(--ink);
}
:root[data-theme="dark"] .header {
  background: linear-gradient(180deg, rgba(12, 22, 35, 0.92), rgba(12, 22, 35, 0.78));
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 24px rgba(0,0,0,0.35);
}
:root[data-theme="dark"] .nav-links a,
:root[data-theme="dark"] .brand-name,
:root[data-theme="dark"] .brand-name span {
  color: var(--ink);
}
:root[data-theme="dark"] .brand-name strong { color: #f2f7fc; }
:root[data-theme="dark"] .mobile-menu { border-top-color: var(--line); }
:root[data-theme="dark"] .xj-icon-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.16);
  color: #dcecff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
:root[data-theme="dark"] .xj-icon-btn:hover {
  background: linear-gradient(135deg, rgba(94, 156, 217, 0.4), rgba(55, 104, 160, 0.2));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
:root[data-theme="dark"] .menu-toggle,
:root[data-theme="dark"] .btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  border-color: rgba(255,255,255,0.2);
}
:root[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,0.12); }

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] .section-head h2,
:root[data-theme="dark"] .cf-title { color: var(--ink); }

:root[data-theme="dark"] .section-alt { background: #0f1c2b; }

:root[data-theme="dark"] .service-card,
:root[data-theme="dark"] .event-card,
:root[data-theme="dark"] .course-group,
:root[data-theme="dark"] .course-item,
:root[data-theme="dark"] .course-row,
:root[data-theme="dark"] .course-note,
:root[data-theme="dark"] .contact-card,
:root[data-theme="dark"] .qr-card,
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .intro-points span,
:root[data-theme="dark"] .course-loading,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .item,
:root[data-theme="dark"] .student-card,
:root[data-theme="dark"] .student-detail,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .welcome-card,
:root[data-theme="dark"] .welcome-step,
:root[data-theme="dark"] .side-card,
:root[data-theme="dark"] .article,
:root[data-theme="dark"] .related-card,
:root[data-theme="dark"] .reg-work-item,
:root[data-theme="dark"] .detail-section,
:root[data-theme="dark"] .xj-kb-card,
:root[data-theme="dark"] .subject-checks,
:root[data-theme="dark"] .eligibility-banner,
:root[data-theme="dark"] .work-item,
:root[data-theme="dark"] .material-box,
:root[data-theme="dark"] .suit-box,
:root[data-theme="dark"] .list-card,
:root[data-theme="dark"] .course-hero {
  background: #142436;
  border-color: #25394f;
  color: var(--ink);
}
:root[data-theme="dark"] .course-item p,
:root[data-theme="dark"] .service-card p,
:root[data-theme="dark"] .event-card p,
:root[data-theme="dark"] .course-row p,
:root[data-theme="dark"] .qr-card p,
:root[data-theme="dark"] .contact-item p,
:root[data-theme="dark"] .stat span,
:root[data-theme="dark"] .welcome-step p,
:root[data-theme="dark"] .welcome-hero p,
:root[data-theme="dark"] .field label,
:root[data-theme="dark"] .meta,
:root[data-theme="dark"] .field-hint { color: var(--muted); }
:root[data-theme="dark"] .course-item strong,
:root[data-theme="dark"] .service-card h3,
:root[data-theme="dark"] .event-card h3,
:root[data-theme="dark"] .course-row h3,
:root[data-theme="dark"] .contact-card h3,
:root[data-theme="dark"] .qr-card strong,
:root[data-theme="dark"] .welcome-hero h2,
:root[data-theme="dark"] .welcome-step h3,
:root[data-theme="dark"] .auth-card h1,
:root[data-theme="dark"] .card h3 { color: #eef5fc; }
:root[data-theme="dark"] .ci-icon,
:root[data-theme="dark"] .service-icon,
:root[data-theme="dark"] .course-row .num {
  background: #1d3148;
  color: #8cc1ec;
}
:root[data-theme="dark"] .tag-list span,
:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .elig-tag,
:root[data-theme="dark"] .mode-online,
:root[data-theme="dark"] .hero-badges span {
  background: #1d3148;
  color: #a9cdea;
  border-color: #2f4a68;
}
:root[data-theme="dark"] .kicker,
:root[data-theme="dark"] .section-head p { color: var(--muted); }

/* 截止日期三色：红=已截止 / 紫=永久有效 / 绿=未到截止 */
.due-past { color: #d94f3d; font-weight: 700; }
.due-forever { color: #7a5cd6; font-weight: 600; }
.due-open { color: #2e9e5b; font-weight: 600; }
:root[data-theme="dark"] .due-past { color: #ff8371; }
:root[data-theme="dark"] .due-forever { color: #b39bff; }
:root[data-theme="dark"] .due-open { color: #7fdba3; }

/* 赛事/考级封面 */
.ev-cover { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #eef2f7; }
.ev-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 46px;
  background: linear-gradient(135deg, #dbeafe 0%, #eaf7f0 52%, #fdf2dc 100%); }
.ev-cover-flag { position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(217, 79, 61, 0.94); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(140, 30, 20, 0.35); }
/* portal 报名中心赛事卡片：封面贴顶 */
#eventsList .card, #examList .card { padding: 0; overflow: hidden; cursor: pointer; }
#eventsList .card .card-body, #examList .card .card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
#eventsList .card h3, #examList .card h3 { margin: 0 0 10px; }
/* 官网赛事页卡片 */
.ev-card { overflow: hidden; }
.ev-card-body { padding: 20px 22px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: #12202f !important;
  color: var(--ink);
  border-color: #2a3e56;
}
:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus {
  outline: 2px solid rgba(74,152,222,.28);
  border-color: var(--coral);
}
:root[data-theme="dark"] input[type="file"]::file-selector-button {
  background: #1d3148;
  color: #cfe4f8;
  border-color: #2f4a68;
}
:root[data-theme="dark"] input[type="file"] {
  background: #12202f !important;
  color: var(--ink);
}
:root[data-theme="dark"] input[type="file"]::-webkit-file-upload-button {
  background: #1d3148;
  color: #cfe4f8;
  border: 1px solid #2f4a68;
  border-radius: 8px;
  padding: 6px 12px;
  margin-right: 10px;
}
:root[data-theme="dark"] ::placeholder { color: #70879e; }

:root[data-theme="dark"] .topbar {
  background: rgba(12, 22, 35, 0.96);
  border-bottom-color: var(--line);
}
:root[data-theme="dark"] .topbar-actions a,
:root[data-theme="dark"] .topbar-actions button {
  background: #142436;
  color: var(--ink);
  border-color: #25394f;
}
:root[data-theme="dark"] .tabs button {
  background: #142436;
  color: var(--muted);
  border-color: #25394f;
}
:root[data-theme="dark"] .tabs button.active {
  background: linear-gradient(180deg, #2d6ea9, #1c5588);
  color: #fff;
  border-color: #2d6ea9;
}
:root[data-theme="dark"] .notice {
  background: #2a2417;
  border-color: #5a4720;
  color: #e8d5a8;
}
:root[data-theme="dark"] .empty { color: var(--muted); }
:root[data-theme="dark"] .modal-backdrop { background: rgba(4, 10, 18, 0.68); }
:root[data-theme="dark"] .reg-section { color: #8cc1ec; }

:root[data-theme="dark"] .lightbox { background: rgba(3, 8, 14, 0.9); }
:root[data-theme="dark"] .xj-kb-overlay { background: rgba(3, 8, 14, 0.72); }
:root[data-theme="dark"] .xj-kb-card {
  background: linear-gradient(180deg, #142436 0%, #101d2c 100%);
  color: #e6eef8;
}
:root[data-theme="dark"] .xj-kb-card h3,
:root[data-theme="dark"] .xj-kb-grid h4 { color: #e6eef8; }
:root[data-theme="dark"] .xj-kb-row span,
:root[data-theme="dark"] .xj-kb-foot { color: #9db1c6; }
:root[data-theme="dark"] .xj-kb-card kbd,
:root[data-theme="dark"] .xj-kb-card .xj-kb kbd {
  color: #cfe4f8;
  background: linear-gradient(180deg, #23374e, #1a2b3e);
}
:root[data-theme="dark"] .xj-kb-close {
  background: rgba(255,255,255,.12);
  color: #e6eef8;
}
:root[data-theme="dark"] .xj-kb-pill {
  background: rgba(20, 36, 54, 0.82);
  color: #d6e6f7;
}

:root[data-theme="dark"] .crumb { color: var(--muted); }
:root[data-theme="dark"] .crumb a { color: #8cc1ec; }
:root[data-theme="dark"] .hero-badges { color: var(--muted); }
:root[data-theme="dark"] .lead { color: var(--muted); }
:root[data-theme="dark"] .side-note { color: var(--muted); }
:root[data-theme="dark"] .not-found { color: var(--muted); }

:root[data-theme="dark"] .works-toolbar,
:root[data-theme="dark"] .works-upload-hint,
:root[data-theme="dark"] .reg-work-upload {
  background: #12202f;
  border-color: #25394f;
  color: var(--muted);
}

/* ---------- 夜间模式补漏（门户 / 官网） ---------- */
:root[data-theme="dark"] .intro-mark,
:root[data-theme="dark"] .notif,
:root[data-theme="dark"] .work-tile {
  background: #142436;
  border-color: #25394f;
  color: var(--ink);
}
:root[data-theme="dark"] .notif h4,
:root[data-theme="dark"] .notif strong { color: #eef5fc; }
:root[data-theme="dark"] .notif.unread { border-color: rgba(90, 160, 216, 0.5); }
:root[data-theme="dark"] .meta span,
:root[data-theme="dark"] .logistics {
  background: #1d3148;
  color: #a9cdea;
}
:root[data-theme="dark"] .work-thumb { background: #0f1d2c; }
:root[data-theme="dark"] .work-title { color: var(--ink); }
:root[data-theme="dark"] .work-title:focus { background: #12202f; }
:root[data-theme="dark"] .work-meta { color: var(--muted); }
:root[data-theme="dark"] .work-del { color: #f0a09a; }
:root[data-theme="dark"] .code-row button {
  background: #1d3148;
  color: #cfe4f8;
  border-color: #2f4a68;
}
:root[data-theme="dark"] .captcha-track {
  background: #12202f;
  border-color: #2a3e56;
}
:root[data-theme="dark"] .captcha-fill { background: rgba(74, 152, 222, 0.35); }
:root[data-theme="dark"] .captcha-target { background: #4a98de; }
:root[data-theme="dark"] .captcha-handle {
  background: #1d3148;
  color: #cfe4f8;
  border-color: #2f4a68;
}
:root[data-theme="dark"] .status.pending { color: #e3c27e; background: rgba(214, 174, 90, 0.14); }
:root[data-theme="dark"] .status.approved { color: #6fd3b8; background: rgba(64, 180, 150, 0.14); }
:root[data-theme="dark"] .status.shipped,
:root[data-theme="dark"] .status.completed { color: #9cc4f5; background: rgba(74, 152, 222, 0.16); }
:root[data-theme="dark"] .status.rejected { color: #f0a09a; background: rgba(220, 100, 90, 0.16); }
:root[data-theme="dark"] .reg-no-works {
  background: rgba(160, 70, 70, 0.14);
  border-color: rgba(220, 130, 130, 0.4);
  color: #f0b8b0;
}
:root[data-theme="dark"] .rss-avatar {
  background: #1d3148;
  color: #8cc1ec;
}
:root[data-theme="dark"] .rss-grid label { color: var(--muted); }
:root[data-theme="dark"] .eligibility-banner.invalid {
  background: rgba(160, 70, 70, 0.16);
  border-color: rgba(220, 130, 130, 0.42);
  color: #f3d2cc;
}
:root[data-theme="dark"] .eligibility-banner {
  background: rgba(74, 152, 222, 0.1);
  border-color: rgba(90, 160, 216, 0.38);
  color: #cfe4f8;
}
:root[data-theme="dark"] .student-avatar {
  background: linear-gradient(135deg, #1d3148, #2f4a68);
  color: #cfe4f8;
}

/* ================= 卡通糖果配色按钮（学生档案 / 报名板块） ================= */
.student-actions .btn,
.works-toolbar .btn,
#eventsList .card .btn,
#registerForm button[type="submit"],
#addStudentBtn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 2px rgba(60, 30, 10, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -2px 5px rgba(0, 0, 0, 0.14),
    0 4px 10px rgba(30, 60, 90, 0.16);
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.student-actions .btn:hover,
.works-toolbar .btn:hover,
#eventsList .card .btn:hover,
#registerForm button[type="submit"]:hover,
#addStudentBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07) saturate(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -2px 5px rgba(0, 0, 0, 0.12),
    0 8px 16px rgba(30, 60, 90, 0.24);
}
.student-actions .btn { min-height: 34px; padding: 0 14px; font-size: 13px; }

/* 作品集：糖果蓝 */
.student-actions [data-works-student] {
  background: linear-gradient(180deg, #8fd8ff 0%, #4db8f0 55%, #2f9be0 100%);
  color: #fff;
}
/* 编辑：糖果橙 */
.student-actions [data-edit-student] {
  background: linear-gradient(180deg, #ffd27a 0%, #ffb347 55%, #f7973a 100%);
  color: #fff;
}
/* 删除：一律红色 */
.student-actions [data-delete-student],
.btn[data-delete-article],
.btn[data-delete-event],
.work-del {
  background: linear-gradient(180deg, #ff9b9b 0%, #f5635f 55%, #e0403f 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 2px rgba(120, 20, 18, 0.35);
}
/* 作品卡片右下角的删除按钮：小红胶囊 */
.work-del {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 6px rgba(120, 20, 18, 0.25);
  font-size: 12px;
  line-height: 1;
}
.work-del:hover {
  text-decoration: none;
  filter: brightness(1.08);
  transform: translateY(-1px);
}
/* 新建学生档案：糖果粉 */
#addStudentBtn {
  background: linear-gradient(180deg, #ffb3d1 0%, #fb7fb4 55%, #f26aa3 100%);
  color: #fff;
}
/* 报名卡片按钮：糖果绿 */
#eventsList .card .btn {
  background: linear-gradient(180deg, #a3e88a 0%, #69cf4e 55%, #4cb83a 100%);
  color: #fff;
  min-height: 32px; padding: 0 14px; font-size: 13px; margin-top: 2px;
}
#examList .card .btn { min-height: 32px; padding: 0 14px; font-size: 13px; margin-top: 2px; }
/* 提交报名：糖果橙 */
#registerForm button[type="submit"] {
  background: linear-gradient(180deg, #ffc96b 0%, #ff9f43 55%, #f7841f 100%);
  color: #fff;
}
/* 上传图片作品：糖果蓝 */
.works-toolbar label:first-child {
  background: linear-gradient(180deg, #8fd8ff 0%, #4db8f0 55%, #2f9be0 100%);
  color: #fff;
}
/* 上传视频作品：糖果紫 */
.works-toolbar label:nth-child(2) {
  background: linear-gradient(180deg, #c9a8ff 0%, #9d72f2 55%, #8655e0 100%);
  color: #fff;
}

/* 暗色态：压深底、减亮描边，保留糖果感 */
:root[data-theme="dark"] .student-actions .btn,
:root[data-theme="dark"] .works-toolbar .btn,
:root[data-theme="dark"] #eventsList .card .btn,
:root[data-theme="dark"] #registerForm button[type="submit"],
:root[data-theme="dark"] #addStudentBtn {
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -2px 5px rgba(0, 0, 0, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.35);
}
:root[data-theme="dark"] .student-actions [data-delete-student],
:root[data-theme="dark"] .btn[data-delete-article],
:root[data-theme="dark"] .btn[data-delete-event],
:root[data-theme="dark"] .work-del {
  background: linear-gradient(180deg, #d96a68 0%, #c04947 55%, #a83837 100%);
  color: #fff;
}

/* 品牌名：仙堇，草书题字 */
.brand-name strong,
.brand strong,
.brand span {
  font-family: "STXingkai", "华文行楷", "Kaiti SC", "KaiTi", "STKaiti", "cursive";
  font-weight: 600;
  letter-spacing: 1px;
}

/* 导航品牌：草书英文 PNG，白底用 multiply 融入浅色导航，夜间反色+screen 融入深色导航 */
.brand-cursive {
  height: 32px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  mix-blend-mode: multiply;
  flex: 0 0 auto;
  filter: none;
}
.brand img.brand-cursive {
  width: auto;
  height: 32px;
  flex: 0 0 auto;
}
html[data-theme="dark"] .brand-cursive {
  filter: invert(1) brightness(1.08);
  mix-blend-mode: screen;
}

/* 日间模式：素描纸纹理大背景（美术用纸质感，颗粒+纤维双层） */
:root:not([data-theme="dark"]) body {
  background-color: #fbf6ec !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.07' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0 0.33 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.38 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* 官网/课程页：登录后导航（昵称 + 黄色扁铃铛 + 报名中心 + 退出） */
.xj-userbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.xj-nav-nick {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink, #0c2347);
  font-weight: 600;
  font-size: 14px;
}
.xj-nav-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #ffc61a;
  color: #3a2c00;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.xj-nav-bell:hover { background: #ffd34d; }
.xj-nav-bell:active { transform: scale(.94); }
.xj-nav-logout {
  background: #eef3f8;
  color: #5b6b7c;
  border: 1px solid #d3dde6;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}
.xj-nav-logout:hover { color: #c0392b; border-color: #e5b3ac; }
:root[data-theme="dark"] .xj-nav-nick { color: #e6eef8; }
:root[data-theme="dark"] .xj-nav-logout { background: #223449; color: #b8cbdd; border-color: #2e4359; }

/* 全局通知弹窗（从小铃铛下方展开 · 毛玻璃质感） */
.xj-bell-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: transparent;
}
.xj-bell-modal {
  width: min(460px, 92vw);
  background: rgba(250, 251, 254, 0.82);
  border: 1px solid rgba(120, 130, 150, 0.24);
  border-radius: 14px;
  box-shadow: 0 20px 52px rgba(18, 28, 58, 0.22), 0 4px 14px rgba(18, 28, 58, 0.10);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  overflow: visible;
  animation: xjBellIn .2s cubic-bezier(.2, .9, .28, 1.1);
  transform-origin: top right;
}
.xj-bell-arrow {
  position: absolute; top: -10px;
  width: 0; height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 11px solid rgba(250, 251, 254, 0.95);
  transform: none;
  border-radius: 0;
  pointer-events: none;
}
@keyframes xjBellIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.xj-bell-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(120, 130, 150, 0.18);
  font-size: 14px;
}
.xj-bell-x {
  width: 26px; height: 26px;
  border: 1px solid rgba(120, 130, 150, 0.25); border-radius: 7px;
  background: rgba(255, 255, 255, 0.6); color: #5b6b7c;
  font-size: 12px; line-height: 1; cursor: pointer;
}
.xj-bell-x:hover { background: #fde8e5; color: #c0392b; border-color: #f2c1bb; }
.xj-bell-body { max-height: 56vh; overflow-y: auto; padding: 8px 10px 12px; }
.xj-bell-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 6px 4px; font-size: 12px; font-weight: 600; color: #5b6b7c;
}
.xj-bell-row button {
  border: 1px solid #cfe0ef; border-radius: 999px;
  background: #eef5fc; color: #1d5d9b;
  font-size: 12px; padding: 4px 12px; cursor: pointer;
}
.xj-bell-row button:hover { background: #dcebf8; }
.xj-bell-sec {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: #5b6b7c;
  padding: 12px 6px 6px;
}
.xj-bell-sec::after { content: ""; flex: 1; height: 1px; background: rgba(120, 130, 150, 0.16); }
.xj-bell-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 12px; margin: 3px 0;
  border: 1px solid rgba(120, 130, 150, 0.12); border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.xj-bell-item:hover { background: rgba(255, 255, 255, 0.9); }
.xj-bell-item.xj-unread { background: rgba(255, 253, 240, 0.92); border-color: #f0e3b8; }
.xj-bell-item.xj-read { opacity: .72; }
.xj-bell-ic {
  position: relative; flex: 0 0 30px; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
}
.xj-bell-dot {
  position: absolute; top: -2px; right: -2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #e5484d; border: 2px solid #fff;
  box-sizing: content-box;
}
.xj-bell-item h4 { margin: 0 0 3px; font-size: 13px; line-height: 1.4; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.xj-bell-pin {
  font-size: 10px; font-weight: 600; color: #d4a017;
  background: rgba(212, 160, 23, 0.12); border: 1px solid rgba(212, 160, 23, 0.35);
  border-radius: 999px; padding: 1px 7px; line-height: 1.4;
}
.xj-bell-item p { margin: 0; color: #5b6b7c; font-size: 12px; line-height: 1.55; word-break: break-word; }
.xj-bell-item small { color: #8a97a6; font-size: 11px; }
.xj-bell-main { min-width: 0; flex: 1 1 auto; }
.xj-bell-note {
  margin: 7px 0 0; border-radius: 8px; overflow: hidden;
  border: 1px dashed rgba(120, 130, 150, 0.28);
}
.xj-note-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 9px; font-size: 11.5px; color: #5b6b7c;
  background: rgba(120, 130, 150, 0.08); cursor: pointer; user-select: none;
}
.xj-note-toggle { color: #2f6fb2; font-size: 11px; }
.xj-note-body {
  padding: 7px 9px; font-size: 11.5px; color: #5b6b7c;
  line-height: 1.6; border-top: 1px dashed rgba(120, 130, 150, 0.22);
  white-space: pre-wrap; word-break: break-word;
}
.xj-bell-acts { display: flex; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.xj-bell-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 11.5px; padding: 4px 12px;
  cursor: pointer; text-decoration: none; border: 1px solid;
  transition: background .16s ease, color .16s ease;
}
.xj-bell-btn.xj-view { background: #fff; color: #2f6fb2; border-color: #9fc3e4; }
.xj-bell-btn.xj-view:hover { background: #eaf3fb; }
.xj-bell-btn.xj-dl { background: #fff; color: #16a34a; border-color: #a7d8b8; }
.xj-bell-btn.xj-dl:hover { background: #eafaf0; }
.xj-bell-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.xj-bell-chip {
  border: 1px solid #d3dde6; border-radius: 999px;
  background: #fff; color: #5b6b7c; font-size: 11px;
  padding: 3px 10px; cursor: pointer;
  transition: all .15s ease;
}
.xj-bell-chip em { font-style: normal; color: #8a97a6; margin-left: 2px; font-size: 10.5px; }
.xj-bell-chip.on { background: #2f6fb2; color: #fff; border-color: #2f6fb2; }
.xj-bell-chip.on em { color: rgba(255, 255, 255, 0.85); }
.xj-bell-read {
  flex: 0 0 auto; align-self: center;
  border: 1px solid #d3dde6; border-radius: 999px;
  background: #fff; color: #5b6b7c;
  font-size: 11px; padding: 4px 10px; cursor: pointer;
  height: fit-content;
}
.xj-bell-read:hover { color: #1d5d9b; border-color: #9fc3e4; }
.xj-bell-empty { padding: 40px 10px; text-align: center; color: #8a97a6; font-size: 13px; }
.xj-bell-loading { padding: 36px 10px; text-align: center; color: #8a97a6; font-size: 13px; }
:root[data-theme="dark"] .xj-bell-modal { background: rgba(21, 27, 38, 0.85); border-color: rgba(255, 255, 255, 0.12); }
:root[data-theme="dark"] .xj-bell-arrow { border-bottom-color: rgba(21, 27, 38, 0.95); }
:root[data-theme="dark"] .xj-bell-head { border-color: rgba(255, 255, 255, 0.10); }
:root[data-theme="dark"] .xj-bell-x { background: rgba(255, 255, 255, 0.08); color: #b8cbdd; border-color: rgba(255, 255, 255, 0.16); }
:root[data-theme="dark"] .xj-bell-item { background: rgba(255, 255, 255, 0.055); border-color: rgba(255, 255, 255, 0.08); }
:root[data-theme="dark"] .xj-bell-item.xj-unread { background: rgba(255, 255, 255, 0.11); border-color: #4a3d14; }
:root[data-theme="dark"] .xj-bell-item p, :root[data-theme="dark"] .xj-bell-sec, :root[data-theme="dark"] .xj-bell-row { color: #aebdd0; }
:root[data-theme="dark"] .xj-bell-row button { background: #1d2c40; color: #9cc3ea; border-color: #2e4359; }
:root[data-theme="dark"] .xj-bell-chip { background: #1d2c40; color: #aebdd0; border-color: #2e4359; }
:root[data-theme="dark"] .xj-bell-chip.on { background: #2f6fb2; color: #fff; border-color: #2f6fb2; }
:root[data-theme="dark"] .xj-bell-dot { border-color: #151b26; }
:root[data-theme="dark"] .xj-bell-read, :root[data-theme="dark"] .xj-bell-btn.xj-view { background: #1e2733; color: #9cc3ea; border-color: #2e4359; }
:root[data-theme="dark"] .xj-bell-btn.xj-dl { background: #1e2733; color: #7fd0a2; border-color: #2e4359; }
:root[data-theme="dark"] .xj-note-head { background: rgba(255, 255, 255, 0.06); color: #aebdd0; }
:root[data-theme="dark"] .xj-note-body { color: #aebdd0; }


/* 小屏导航收紧：高度降低、按钮缩小、品牌图允许收缩不遮挡 */
@media (max-width: 560px) {
  .header .nav { height: 50px !important; gap: 6px; padding-left: 12px; padding-right: 12px; }
  .brand { min-width: 0; overflow: hidden; gap: 6px; }
  .brand img { width: 30px; height: 30px; flex: 0 0 30px; }
  .brand img.brand-cursive { height: 19px; width: auto; max-width: 104px; flex: 0 1 auto; min-width: 0; }
  .nav-actions { gap: 5px; flex: 0 0 auto; }
  .nav-actions .btn,
  .nav-actions .menu-toggle {
    min-height: 30px; height: 30px; padding: 0 9px; font-size: 12px; border-radius: 9px;
  }
  .nav-actions .xj-icon-btn { width: 30px; height: 30px; min-height: 30px; font-size: 11px; border-radius: 9px; }
  .nav-actions .btn svg, .nav-actions .menu-toggle svg { width: 14px; height: 14px; }
}

/* 汉堡键：纯 CSS 三横线，不依赖图标库 */
.menu-toggle { width: 34px; height: 34px; min-width: 34px; display: inline-grid; place-items: center; padding: 0; }
.menu-toggle { position: relative; }
.menu-toggle .mt-bars { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: block; width: 18px; height: 13px; }
.menu-toggle .mt-bars span { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: #102a43; transition: transform .22s ease, opacity .18s ease; }
.menu-toggle .mt-bars span:nth-child(1) { top: 0; }
.menu-toggle .mt-bars span:nth-child(2) { top: 5.5px; }
.menu-toggle .mt-bars span:nth-child(3) { bottom: 0; }
.menu-toggle[aria-expanded="true"] .mt-bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .mt-bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .mt-bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* 英文长文案：小屏按钮不再撑开 */
@media (max-width: 560px) {
  .brand { overflow: hidden; }
  .brand img.brand-cursive { height: 18px; max-width: 84px; object-fit: contain; }
  .nav-actions .menu-toggle { width: 32px !important; height: 30px; min-width: 32px; }
  .nav-actions .btn { max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; font-size: 11px; }
}
@media (max-width: 360px) {
  .brand img.brand-cursive { display: none; }
}

:root[data-theme="dark"] .menu-toggle .mt-bars span { background: #e6eef8; }
.menu-toggle .mt-bars span { pointer-events: none; }

/* 手机/窄屏不显示快捷键浮标与面板 */
@media (max-width: 820px) {
  .xj-kb-pill, .xj-kb-overlay { display: none !important; }
}
