/* ===== 公告列表页 ===== */
.ann-page {
  padding: 100px 20px 60px;
  max-width: 800px;
  margin: 0 auto;
}
.ann-page-title {
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-color-a);
  text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;
  margin-bottom: 24px;
}
.tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: 0.5px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.4);
  color: var(--text-color-b);
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--button-background);
  color: white;
}
.tab-btn:hover:not(.active) {
  background: rgba(255,255,255,0.7);
}
.ann-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ann-card {
  display: block;
  text-decoration: none;
  background: var(--shell);
  border: 0.5px solid white;
  border-radius: 16px;
  padding: 18px 22px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0px 8px 12px var(--shadow-color);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.ann-card:hover {
  transform: translateY(-3px);
  box-shadow: 0px 14px 24px rgba(0,0,0,0.14);
}
.ann-card.pinned::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--status-err), #ff6b81);
}
.ann-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ann-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(237,63,81,0.1);
  color: var(--status-err);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}
.ann-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color-a);
  line-height: 1.3;
}
.ann-card-meta {
  font-size: 0.8rem;
  color: var(--text-color-b);
  margin-top: 6px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.ann-card-summary {
  font-size: 0.9rem;
  color: var(--text-color-b);
  margin-top: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 公告详情页 ===== */
.ann-detail {
  padding: 100px 20px 60px;
  max-width: 720px;
  margin: 0 auto;
}
.ann-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-color-b);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.ann-detail-back:hover {
  color: var(--text-color-a);
}
.ann-detail-card {
  background: var(--shell);
  border: 0.5px solid white;
  border-radius: 20px;
  padding: 28px 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0px 20px 30px var(--shadow-color);
}
.ann-detail-header {
  margin-bottom: 20px;
}
.ann-detail-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-color-a);
  line-height: 1.3;
  margin-bottom: 10px;
}
.ann-detail-meta {
  font-size: 0.85rem;
  color: var(--text-color-b);
  display: flex;
  gap: 14px;
  align-items: center;
}
.ann-detail-body {
  color: var(--text-color-a);
  line-height: 1.8;
  font-size: 1rem;
}
.ann-detail-body p {
  margin-bottom: 14px;
}
.ann-detail-body li {
  margin-bottom: 6px;
}
/* ===== Markdown 渲染样式 ===== */
.ann-detail-body h1,
.ann-detail-body h2,
.ann-detail-body h3 {
  color: var(--text-color-a);
  margin: 24px 0 12px;
  font-weight: 600;
}
.ann-detail-body h1 { font-size: 2rem; }
.ann-detail-body h2 { font-size: 1.6rem; }
.ann-detail-body h3 { font-size: 1.2rem; }

.ann-detail-body ul,
.ann-detail-body ol {
  margin: 0 0 14px 20px;
  padding: 0;
}

.ann-detail-body blockquote {
  margin: 14px 0;
  padding: 12px 18px;
  border-left: 4px solid var(--button-background);
  background: rgba(0,0,0,0.03);
  border-radius: 0 8px 8px 0;
  color: var(--text-color-b);
}

.ann-detail-body code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
}

.ann-detail-body pre {
  background: rgba(0,0,0,0.06);
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 14px 0;
}
.ann-detail-body pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}

.ann-detail-body a {
  color: var(--button-background);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ann-detail-body a:hover {
  filter: brightness(1.3);
}

.ann-detail-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 10px 0;
}

.ann-detail-body del {
  color: var(--text-color-b);
}

/* ===== 首页弹窗 ===== */
.ann-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.ann-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.ann-modal {
  width: min(520px, 92vw);
  max-height: 80vh;
  background: var(--background-color);
  border: 0.5px solid white;
  border-radius: 20px;
  box-shadow: 0px 25px 15px 10px var(--shadow-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.ann-modal-overlay.active .ann-modal {
  transform: translateY(0) scale(1);
}
.ann-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ann-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-color-a);
}
.ann-modal-title .pin-icon {
  width: 18px;
  height: 18px;
  color: var(--status-err);
  flex-shrink: 0;
}
.ann-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  color: var(--text-color-b);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.ann-modal-close:hover {
  background: rgba(237,63,81,0.12);
  color: var(--status-err);
}
.ann-modal-close:active {
  transform: scale(0.92);
}
.ann-modal-body {
  padding: 16px 22px 20px;
  overflow-y: auto;
  color: var(--text-color-a);
  line-height: 1.7;
  font-size: 0.95rem;
}
.ann-modal-body h4 {
  color: var(--text-color-a);
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.ann-modal-body p {
  margin-bottom: 10px;
}
/* ===== Markdown 渲染样式 ===== */
.ann-modal-body h1,
.ann-modal-body h2,
.ann-modal-body h3 {
  color: var(--text-color-a);
  margin: 24px 0 12px;
  font-weight: 600;
}
.ann-modal-body h1 { font-size: 1.5rem; }
.ann-modal-body h2 { font-size: 1.3rem; }
.ann-modal-body h3 { font-size: 1.15rem; }

.ann-modal-body p {
  margin-bottom: 14px;
  line-height: 1.8;
}

.ann-modal-body ul,
.ann-modal-body ol {
  margin: 0 0 14px 24px;
  padding: 0;
}
.ann-modal-body li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.ann-modal-body blockquote {
  margin: 14px 0;
  padding: 12px 18px;
  border-left: 4px solid var(--button-background);
  background: rgba(0,0,0,0.03);
  border-radius: 0 8px 8px 0;
  color: var(--text-color-b);
}

.ann-modal-body code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
}

.ann-modal-body pre {
  background: rgba(0,0,0,0.06);
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 14px 0;
}
.ann-modal-body pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.ann-modal-body a {
  color: var(--button-background);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ann-modal-body a:hover {
  filter: brightness(1.3);
}

.ann-modal-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 10px 0;
}

.ann-modal-body del {
  color: var(--text-color-b);
}
.ann-modal-footer {
  padding: 14px 22px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.ann-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  transition: transform 0.1s, filter 0.2s;
}
.ann-btn:active {
  transform: scale(0.96);
}
.ann-btn-primary {
  background: var(--button-background);
  color: white;
  box-shadow: var(--button-shadow);
}
.ann-btn-primary:hover {
  filter: brightness(1.15);
}
.ann-btn-ghost {
  background: transparent;
  color: var(--text-color-b);
  border: 0.5px solid rgba(0,0,0,0.15);
}
.ann-btn-ghost:hover {
  background: rgba(0,0,0,0.04);
}

/* ===== 移动端适配 ===== */
@media (max-width: 640px) {
  .ann-page { padding-top: 80px; }
  .ann-page-title { font-size: 1.6rem; }
  .ann-card { padding: 14px 16px; border-radius: 14px; }
  .ann-card-title { font-size: 1rem; }
  .ann-detail { padding-top: 80px; }
  .ann-detail-card { padding: 20px 18px; border-radius: 16px; }
  .ann-detail-title { font-size: 1.3rem; }
  .ann-modal { border-radius: 16px; }
  .ann-modal-header { padding: 14px 16px 8px; }
  .ann-modal-body { padding: 12px 16px 16px; font-size: 0.9rem; }
  .ann-modal-footer { padding: 10px 16px 14px; flex-direction: column; }
  .ann-btn { width: 100%; text-align: center; }
}
