body {
  font-family: Arial, sans-serif;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  margin: 10px 0;
  padding: 8px;
}

h3 {
  margin-top: 0;
}

p {
  margin-bottom: 5px;
}

#noticeContent,
#noticeContent * {
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box;
}

/* 移动端优化：附件链接更易点击 */
@media (max-width: 640px) {
  #attachmentList a {
    padding: 8px 0 !important;
    display: inline-block;
    font-size: 0.95rem;
  }
}

/* 让所有 img 块级化并居中 */
#noticeContent img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#noticeContent {
  padding: 0 50px 0;
}

/* 卡片悬停动画 */
.expert-card:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.center-container {
  width: 100%;
}

/* CSS */
.custom-container {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* 只在中等屏幕及以上（≥768px）限制宽度为 70% */
@media (min-width: 768px) {
  .custom-container {
    max-width: 70%;
    padding: 0 15px;
  }
}

.nav-link {
  @apply relative text-gray-700 hover:text-primary flex items-center gap-4 transition duration-200 text-lg;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #3b82f6; /* primary color */
  transition: width 0.3s ease-in-out;
  border-radius: 1px;
}

.nav-link:hover::after {
  width: 100%;
}

[data-dropdown-menu] {
  @apply transition-all duration-200;
}

/* 使用 Tailwind 的 `prose` 类美化 HTML 内容 */
.prose {
  @apply max-w-none;
}
.prose :where(p):not(:where([class~='not-prose'] *)) {
  @apply my-4;
}
.prose :where(ul, ol):not(:where([class~='not-prose'] *)) {
  @apply my-4 pl-6;
}
.prose :where(a):not(:where([class~='not-prose'] *)) {
  @apply text-blue-600 hover:text-blue-800 underline;
}

/* 附件图标大小适配 */
.bi {
  font-size: 1.1em;
}
.step-active {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border-width: 2px;
  border-color: #1d4ed8;
  background-color: #1d4ed8;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.step-completed {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border-width: 2px;
  border-color: #16a34a;
  background-color: #16a34a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

/* 隐藏原生 radio，但保持可访问性 */
.radio-hidden {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* 未选中状态：空心圆 */
.radio-hidden:not(:checked) {
  background-color: white;
}

/* 选中状态：内部加一个蓝点 */
.radio-hidden:checked {
  border-color: #2563eb;
  background-color: white;
}

.radio-hidden:checked::before {
  content: '';
  display: block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background-color: #2563eb;
}

/* 重点：当 radio 选中时，让整个 label 的文字变蓝加粗 */
input[type='radio']:checked + span,
input[type='radio']:checked ~ span {
  color: #1e40af;
  font-weight: 600;
}

/* 让 label 在选中时有高亮背景 */
input[type='radio']:checked {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* 通知内容全局样式 */
#noticeContent {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* 段落优化 */
#noticeContent p {
  margin: 1rem 0;
  text-align: justify;
}

/* 标题优化（防止过大） */
#noticeContent h1,
#noticeContent h2,
#noticeContent h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  font-weight: 600;
}

/* 列表优化 */
#noticeContent ul,
#noticeContent ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

/* 强调文本 */
#noticeContent strong {
  font-weight: 600;
}

/* 链接 */
#noticeContent a {
  color: #0d8abc;
  text-decoration: underline;
  transition: color 0.2s;
}
#noticeContent a:hover {
  color: #0a669e;
}

/* 图片自动适应 */
#noticeContent img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

/* 表格横向滚动 */
#noticeContent table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  margin: 1rem 0;
}
#noticeContent th,
#noticeContent td {
  padding: 0.75rem;
  border: 1px solid #ddd;
  text-align: left;
}

/* 移动端优化：增大字体、增加行高 */
@media (max-width: 640px) {
  #noticeContent {
    font-size: 1.1rem;
    line-height: 1.7;
  }
  #noticeContent p {
    margin: 1.2rem 0;
  }
  #noticeContent h1 {
    font-size: 1.8rem;
  }
  #noticeContent h2 {
    font-size: 1.5rem;
  }
  #noticeContent h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 640px) {
  /* 去除外层 padding */
  .mobile-notice-container {
    margin: 0 !important;
    padding: 0 !important;
  }

  #noticeDetail {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* 增大字体 */
  #noticeTitle {
    font-size: 1.75rem !important; /* 约 28px */
  }
  #noticeTime {
    font-size: 0.875rem !important; /* 14px → 16px */
  }
  #noticeContent {
    font-size: 1.125rem !important; /* 18px，清晰可读 */
    line-height: 1.7 !important;
  }
}

/* 手机端优化：通知列表 */
@media (max-width: 767px) {
  #noticeList {
    padding: 1rem; /* 减小左右边距 */
  }

  #noticeList li .flex-shrink-0 .btn-show-detail {
    display: none !important;
  }

  #noticeList #title {
    font-size: 1.5rem; /* 标题稍小 */
    margin-bottom: 1rem;
  }

  #noticeList ul {
    space-y: 12px; /* 列表项间距稍小 */
  }

  /* 每个列表项内部布局：改为纵向或紧凑横向 */
  #noticeList li {
    display: flex;
    flex-direction: column; /* 先整体纵向 */
    gap: 8px;
  }

  /* 主内容区（图片 + 文字） */
  #noticeList li > .flex.items-start.space-x-4 {
    flex-direction: row; /* 保持横向 */
    align-items: flex-start;
    space-x: 12px; /* 图片与文字间距减小 */
  }

  /* 图片缩小 */
  #noticeList li img {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0;
  }

  /* 文字区域：允许占满剩余宽度 */
  #noticeList li .flex.flex-col {
    flex: 1;
    min-width: 0; /* 允许文字换行 */
  }

  #noticeList li .flex.flex-col h3 {
    font-size: 1.125rem; /* 稍小标题 */
    margin-bottom: 4px;
  }

  #noticeList li .flex.flex-col p {
    font-size: 0.875rem;
    line-height: 1.4;
  }

  /* 右侧时间 + 按钮：移到文字下方或与文字同排 */
  #noticeList li > .flex.flex-col.items-end.ml-4 {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-left: 0 !important;
    margin-top: 4px;
  }

  #noticeList li > .flex.flex-col.items-end.ml-4 span {
    font-size: 0.75rem;
    color: #6b7280;
  }

  #noticeList li .btn-show-detail {
    padding: 6px !important;
    width: 28px !important;
    height: 28px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #noticeList li .btn-show-detail svg {
    width: 16px !important;
    height: 16px !important;
  }
}
