/* =====================================================
   公告系统样式（v5.36 正式版）
   对齐官网 CSS 变量体系（--color-* / --shadow-* / 断点）
   首页横幅 + 列表页 + 板块悬浮标题共用
   ===================================================== */

/* ---------- 公告板块悬浮标题（hero 下方横幅区顶部，点击跳转公告列表页）---------- */
/* 公告横幅插入 hero 与 rules 之间后，收紧下方管理规范区顶部内边距（原 --section-padding-y 96px 视觉偏空；
   规则区为 sticky 全屏滚动（标题随卡片居中悬浮），静态间隙收 0 后横幅紧贴 sticky 起点，滚动即占满视口） */
#rules.uni-section {
  padding-block-start: 0;
}
.ann-section-head {
  position: relative;
  z-index: 21;
  max-width: var(--container-max, 1200px);
  margin: 14px auto 4px;
  padding: 0 16px;
  text-align: center;
}
.ann-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(20, 24, 32, .72);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  color: #e8eaf0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.ann-section-title i.fa-bullhorn { color: #4ade80; }
.ann-section-title .ann-more {
  font-weight: 400;
  font-size: 12px;
  color: #8b93a3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ann-section-title:hover,
.ann-section-title:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(74,222,128,.55);
  color: #4ade80;
}
.ann-section-title:hover .ann-more { color: #4ade80; }

/* ---------- 首页顶部横幅（hero 下方，rules 上方）---------- */
.ann-banner-stack {
  position: relative;
  z-index: 20;
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 10px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ann-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 14px;
  cursor: pointer;
  transition: transform var(--transition-fast, .15s ease), box-shadow var(--transition-fast, .15s ease);
  animation: annSlideIn .4s ease;
  backdrop-filter: blur(8px);
}
.ann-banner:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,.3));
}

/* 级别配色（对齐官网语义色：蓝=信息 / 黄=提醒 / 红=重要） */
.ann-banner.ann-info {
  background: rgba(96,165,250,.08);
  border-color: rgba(96,165,250,.3);
  color: #dbeafe;
}
.ann-banner.ann-warning {
  background: rgba(251,191,36,.08);
  border-color: rgba(251,191,36,.35);
  color: #fef3c7;
}
.ann-banner.ann-important {
  background: rgba(248,113,113,.09);
  border-color: rgba(248,113,113,.4);
  color: #fee2e2;
  animation: annSlideIn .4s ease, annGlow 2.5s ease-in-out infinite;
}
@keyframes annGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(248,113,113,0); }
  50% { box-shadow: 0 0 18px rgba(248,113,113,.25); }
}
@keyframes annSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ann-banner .ann-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  letter-spacing: .5px;
}
.ann-banner .ann-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.ann-banner .ann-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  opacity: .5;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: opacity var(--transition-fast, .15s ease);
}
.ann-banner .ann-close:hover { opacity: 1; }

/* 移动端：紧凑 */
@media (max-width: 768px) {
  .ann-banner-stack { padding: 8px 10px 0; gap: 6px; }
  .ann-banner { padding: 10px 12px; font-size: 13px; }
  .ann-banner .ann-tag { display: none; } /* 小屏隐藏标签，标题自带级别色 */
}

/* ============================================
   v5.72 浅色主题适配(tokens 变量驱动)
   横幅/药丸在亮底上改白玻璃+深字, 级别色加深保对比
   ============================================ */
[data-theme="light"] .ann-section-title {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(28, 33, 39, 0.10);
  box-shadow: 0 6px 18px rgba(28, 33, 39, 0.08);
  color: var(--color-text-primary, #1c2127);
}
[data-theme="light"] .ann-section-title .ann-more { color: #8a94a2; }
[data-theme="light"] .ann-section-title:hover,
[data-theme="light"] .ann-section-title:focus-visible { color: #1F7A31; }
[data-theme="light"] .ann-section-title:hover .ann-more { color: #1F7A31; }

[data-theme="light"] .ann-banner.ann-info {
  background: rgba(96,165,250,.12);
  border-color: rgba(59,130,246,.45);
  color: #1e3a5f;
}
[data-theme="light"] .ann-banner.ann-warning {
  background: rgba(251,191,36,.14);
  border-color: rgba(217,119,6,.5);
  color: #713f12;
}
[data-theme="light"] .ann-banner.ann-important {
  background: rgba(248,113,113,.12);
  border-color: rgba(220,38,38,.5);
  color: #7f1d1d;
}
[data-theme="light"] .ann-banner .ann-tag { background: rgba(28,33,39,.08); }
