/* 通用样式 */
body {
  margin: 0;
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  background: #f8f9fa;
  color: #222;
}
.main-header {
  background: #15395c;
  color: #fff;
  padding: 0;
  min-height: 60px;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  padding-left: 8px;
}
.logo-badge {
  background: #b0323a;
  color: #fff;
  font-weight: bold;
  font-size: 24px;
  padding: 8px 32px 8px 22px;
  border-radius: 4px 0 0 0;
  box-shadow: 0 6px 0 #7a1d23;
  transform: skew(-18deg);
  margin-right: 28px;
  position: relative;
  z-index: 1;
  letter-spacing: 2px;
}
.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
}
.header-title-group {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
}
.header-title {
  font-size: 24px;
  font-weight: 400;
  color: #fff;
  margin-right: 12px;
  line-height: 1.2;
}
.header-date {
  font-size: 15px;
  color: #cfd8e3;
  margin-bottom: 2px;
}
.search-bar {
  background: #fff;
  padding: 28px 0 20px 0;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}
.search-form {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 16px;
}
.search-label {
  margin-right: 8px;
  color: #222;
  font-size: 16px;
  white-space: nowrap;
}
.search-select {
  height: 32px;
  font-size: 15px;
  border: 1px solid #bbb;
  border-radius: 2px;
  margin-right: 4px;
  padding: 0 8px;
  background: #fff;
  min-width: 90px;
}
.search-input {
  height: 32px;
  font-size: 15px;
  border: 1px solid #bbb;
  border-radius: 2px;
  margin-right: 4px;
  padding: 0 8px;
  width: 220px;
  background: #fff;
}
.search-btn {
  height: 34px;
  font-size: 15px;
  background: #15395c;
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 0 22px;
  margin-right: 18px;
  cursor: pointer;
}
.search-btn:disabled {
  background: #15395c;
  color: #fff;
  opacity: 0.7;
}
.search-tip {
  color: #15395c;
  font-size: 15px;
  margin-left: 10px;
  white-space: nowrap;
}
.category-list {
  max-width: 1200px;
  margin: 32px auto 24px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 32px 24px;
}
.category-index {
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
}
.index-list {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 8px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.index-list span {
  font-size: 15px;
  color: #15395c;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-block;
  vertical-align: middle;
}
.index-list span:hover {
  background: #cde0f7;
}
.category-block {
  margin-bottom: 36px;
  border-bottom: 1.5px dashed #d2dbe6;
  padding-bottom: 32px;
  position: relative;
}
.category-block:last-child {
  border-bottom: none;
}
.category-block h2 {
  color: #15395c;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 22px;
  letter-spacing: 1px;
  border-left: 6px solid #b0323a;
  background: #f7fafd;
  border-radius: 6px;
  padding: 8px 16px 8px 18px;
  margin-top: 0;
  box-shadow: 0 1px 4px rgba(176,50,58,0.04);
}
.category-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-block li {
  font-size: 16px;
  margin-bottom: 6px;
  cursor: pointer;
  color: #15395c;
  transition: text-decoration 0.2s;
}
.category-block li:hover {
  text-decoration: underline;
}
.main-footer {
  background: #222;
  color: #ccc;
  text-align: center;
  font-size: 14px;
  padding: 18px 8px 18px 8px;
  margin-top: 40px;
}

/* 内容页美化 */
.content-page {
  display: flex;
  max-width: 1200px;
  margin: 32px auto 24px auto;
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  min-height: 500px;
  padding: 18px 12px;
}
.side-nav {
  width: 280px;
  border-right: 2px solid #e0e0e0;
  background: #f7fafd;
  padding: 24px 0 24px 0;
  border-radius: 10px 0 0 10px;
  box-shadow: 2px 0 8px rgba(0,0,0,0.03);
  margin-right: 18px;
  min-width: 180px;
}
.side-title {
  color: #b0323a;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 22px;
  padding-top: 4px;
  padding-bottom: 0;
  letter-spacing: 2px;
}
.side-nav ul {
  list-style: none;
  padding: 0 0 0 0;
  margin: 0;
}
.side-nav li {
  font-size: 16px;
  margin-bottom: 6px;
  color: #15395c;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 6px;
  border-left: 4px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  position: relative;
  overflow: visible;
}
.side-nav li a {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
  padding: 0;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.side-nav li a:hover {
  background: #f3e9f0;
  color: #b0323a;
  box-shadow: 0 2px 8px rgba(176,50,58,0.08);
  text-decoration: none;
}
.side-nav li.active, .side-nav li.active a {
  color: #fff !important;
  background: linear-gradient(90deg, #b0323a 0%, #15395c 100%);
  border-left: 4px solid #b0323a;
  font-weight: bold;
  box-shadow: 0 2px 12px rgba(176,50,58,0.10);
}
.category-detail {
  flex: 1;
  background: #fff;
  border-radius: 0 10px 10px 0;
  margin-bottom: 32px;
  border-bottom: 1.5px dashed #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  padding: 32px 32px 32px 40px;
  min-width: 0;
}
.category-detail:last-child {
  margin-bottom: 0;
  border-bottom: none;
}
.category-detail h2 {
  color: #15395c;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 22px;
  letter-spacing: 1px;
  border-left: 6px solid #b0323a;
  background: #f7fafd;
  border-radius: 6px;
  padding: 8px 16px 8px 18px;
  margin-top: 0;
  box-shadow: 0 1px 4px rgba(176,50,58,0.04);
}
.category-detail-content {
  color: #222;
  font-size: 15px;
  line-height: 2;
  word-break: break-all;
  background: #f8f9fa;
  border-radius: 6px;
  padding: 18px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
@media (max-width: 900px) {
  .content-page {
    flex-direction: column;
    margin: 16px 4px 16px 4px;
    padding: 0;
  }
  .side-nav {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 10px 10px 0 0;
    margin-right: 0;
    min-width: 0;
    box-shadow: none;
  }
  .category-detail {
    border-radius: 0 0 10px 10px;
    box-shadow: none;
    padding: 16px 8px 16px 8px;
  }
}
@media (max-width: 600px) {
  .content-page {
    margin: 8px 0 8px 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .side-nav {
    padding: 10px 0 10px 0;
    border-radius: 0;
  }
  .side-title {
    font-size: 16px;
    margin-bottom: 20px;
    padding-top: 2px;
    padding-bottom: 0;
  }
  .side-nav li {
    font-size: 13px;
    padding: 6px 10px;
    margin-bottom: 2px;
  }
  .category-detail {
    padding: 8px 2px 12px 8px;
    border-radius: 0 0 10px 10px;
    margin-bottom: 18px;
  }
  .category-detail:last-child {
    margin-bottom: 0;
  }
  .category-detail h2 {
    font-size: 16px;
    margin-bottom: 10px;
    padding: 6px 8px 6px 10px;
    border-left-width: 4px;
  }
  .category-detail-content {
    font-size: 15px;
    padding: 10px 6px;
    border-radius: 4px;
  }
  .side-nav ul {
    display: block;
  }
  .side-nav li {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 15px;
    padding: 10px 18px;
    margin-bottom: 2px;
    border-radius: 6px;
  }
}

/* 响应式设计 */
@media (max-width: 1300px) {
  .header-inner, .category-list, .search-form, .index-list {
    max-width: 100%;
  }
}
@media (max-width: 900px) {
  .header-inner {
    padding-left: 0;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo-badge {
    font-size: 18px;
    padding: 6px 18px 6px 12px;
    height: 36px;
    margin-bottom: 6px;
  }
  .header-title {
    font-size: 16px;
  }
  .header-date {
    font-size: 12px;
  }
  .category-list, .content-page {
    margin: 16px 4px 16px 4px;
    padding: 16px 4px;
  }
  .side-nav {
    width: 120px;
    padding: 12px 0 12px 0;
  }
  .category-detail {
    padding: 16px 8px 16px 16px;
  }
  .search-form {
    font-size: 14px;
  }
  .search-input {
    width: 120px;
  }
  .search-btn {
    padding: 0 10px;
    margin-right: 6px;
  }
}
@media (max-width: 600px) {
  .main-header {
    padding: 0 0 2px 0;
    min-height: 38px;
  }
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 4px;
    height: auto;
  }
  .logo-badge {
    margin-left: 6px;
    font-size: 15px;
    padding: 3px 10px 3px 6px;
    height: 24px;
    margin-bottom: 0;
    margin-right: 8px;
    box-shadow: 0 2px 0 #7a1d23;
  }
  .mobile-header-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .mobile-header-title {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    line-height: 1.1;
  }
  .mobile-header-title small {
    display: block;
    font-size: 13px;
    color: #cfd8e3;
    font-weight: normal;
    margin-top: 1px;
  }
  .mobile-header-date {
    font-size: 12px;
    color: #cfd8e3;
    margin-top: 1px;
  }
  .header-title-group, .header-title, .header-date {
    display: none !important;
  }
  .search-bar {
    padding: 10px 0 8px 0;
    text-align: center;
  }
  .search-form {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2px;
  }
  .search-select, .search-input, .search-btn {
    min-width: 0;
    width: auto;
    max-width: 90px;
    font-size: 13px;
    margin-bottom: 0;
    padding: 0 4px;
  }
  .search-input {
    flex: 1 1 60px;
    min-width: 40px;
    max-width: 120px;
  }
  .search-btn {
    white-space: nowrap;
    padding: 0 8px;
    min-width: 60px;
    max-width: 90px;
  }
  .search-tip {
    display: none;
  }
  .category-index {
    padding: 6px 0 2px 0;
  }
  .index-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px 0;
    max-width: 100vw;
    padding: 0 2px;
  }
  .index-list span {
    font-size: 14px;
    padding: 2px 5px;
  }
  .category-list {
    padding: 4px 1px;
  }
  .category-block {
    margin-bottom: 12px;
    padding-bottom: 10px;
    padding-left: 8px;
  }
  .category-block-header h2 {
    font-size: 16px;
    margin-bottom: 2px;
  }
  .category-block-header h3 {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .category-block-list li {
    font-size: 14px;
    margin-bottom: 3px;
  }
  .category-block-notes {
    font-size: 13px;
    padding-left: 0;
    min-width: 0;
  }
  .note-title {
    font-size: 13px;
    margin-bottom: 2px;
  }
  .note-content {
    font-size: 13px;
    line-height: 1.6;
  }
  .content-page {
    flex-direction: column;
    min-height: unset;
  }
  .side-nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0 8px 0;
  }
  .side-nav ul {
    padding-left: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .side-nav li {
    margin-bottom: 0;
    font-size: 14px;
  }
  .category-detail {
    padding: 10px 4px 10px 8px;
  }
  .main-footer {
    font-size: 12px;
    padding: 10px 4px 6px 4px;
  }
  .search-label {
    margin-left: 6px;
  }
}

.category-block-body {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.category-block-list {
  flex: 1 1 60%;
}
.category-block-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-block-list li {
  font-size: 16px;
  margin-bottom: 8px;
}
.category-block-list a {
  color: #15395c;
  text-decoration: none;
  transition: text-decoration 0.2s;
}
.category-block-list a:hover {
  text-decoration: underline;
  color: #b0323a;
}
.category-block-notes {
  flex: 1 1 40%;
  font-size: 15px;
  color: #333;
  padding-left: 32px;
  border-left: 1px solid #e0e0e0;
  min-width: 220px;
}
.note-title {
  font-weight: bold;
  color: #15395c;
  margin-bottom: 6px;
}
.note-content {
  line-height: 1.8;
}
@media (max-width: 900px) {
  .category-block-body {
    flex-direction: column;
    gap: 12px;
  }
  .category-block-notes {
    padding-left: 0;
    border-left: none;
    min-width: 0;
  }
}

.mobile-header-title-group {
  display: none;
}
@media (max-width: 600px) {
  .mobile-header-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.category-detail-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.category-detail {
  width: 100%;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

/* 移动端分类列表默认隐藏 */
.mobile-category-list {
  display: none;
}

/* 600px及以下屏幕显示移动端分类列表，隐藏侧边栏 */
@media (max-width: 600px) {
  .mobile-category-list {
    display: block;
    margin: 18px 0 0 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  .mobile-category-list li {
    font-size: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid #f0f0f0;
    color: #15395c;
  }
  .mobile-category-list li:last-child {
    border-bottom: none;
  }
  .mobile-category-list li.active {
    background: #f7fafd;
    font-weight: bold;
    color: #b0323a;
  }
  /* 只在手机端隐藏.side-nav ul，不隐藏aside本身 */
  .side-nav ul {
    display: none !important;
  }
}

.pc-category-list {
  display: block;
}
@media (max-width: 600px) {
  .pc-category-list {
    display: none !important;
  }
}

/* 仅移动端分类列表a链接美化 */
.mobile-category-list a {
  display: block;
  color: #15395c;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.mobile-category-list li.active a {
  background: #f7fafd;
  font-weight: bold;
  color: #b0323a;
}
.mobile-category-list a:hover {
  background: #cde0f7;
  color: #b0323a;
} 