body {
  font-family: 'Noto Sans TC', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #FFFFFF;
  background-image: 
    linear-gradient(90deg, transparent 96%, #F2F3F4 96%, #F2F3F4 100%),
    linear-gradient(0deg, transparent 96%, #F2F3F4 96%, #F2F3F4 100%);
  background-size: 20px 20px;
  color: #2C3E50;
}

header {
  background: linear-gradient(135deg, #2B3E50, #34495E);
  text-align: center;
  padding: 40px 20px;
  color: #FFFFFF;
}

/* 桌面端样式，确保在移动端媒体查询之外生效 */
@media (min-width: 769px) {
  header {
    text-align: center !important;
  }
  
  header h1, header p {
    text-align: center !important;
    padding-right: 0 !important;
  }
  
  header h1 {
    font-size: 2.1em; /* 桌面端主标题 */
  }
  
  header p {
    font-size: 1.4em; /* 主标题2.1em的2/3 */
  }
}

nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 10px;
  background-color: #F2F3F4;
  box-shadow: 0 2px 4px rgba(43, 62, 80, 0.1);
  flex-wrap: wrap;
  border-bottom: 1px solid #D6DBDF;
}

nav a {
  color: #2C3E50;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

nav a:hover {
  background-color: #34495E !important;
  color: #FFFFFF;
}

nav a.active {
  background-color: #2B3E50 !important;
  color: #FFFFFF;
}

.nav-separator {
  display: none; /* 默认隐藏分割符，只在移动端显示 */
}

/* 移动端导航按钮 */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: #2B3E50;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1000;
  border: none;
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 头部的移动端菜单按钮（只在移动端显示） */
header .mobile-nav-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 10px;
  background-color: rgba(43, 62, 80, 0.9);
  border-radius: 6px;
}

/* 隐藏桌面端导航按钮中的文字 */
.desktop-nav-toggle .menu-text {
  display: inline;
}

/* 桌面端显示/隐藏控制 */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* 桌面端导航菜单样式 */
nav .desktop-nav-menu {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* 桌面端分类菜单样式 */
nav .desktop-category-menu {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

/* 桌面端分组样式 */
.desktop-category-group {
  position: relative;
  display: inline-block;
}

.desktop-group-title {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #E8E8E8;
  border-radius: 5px;
  color: #2C3E50;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  gap: 8px;
}

.desktop-group-title:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.desktop-group-title .group-toggle {
  transition: transform 0.3s ease;
}

.desktop-group-items {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: white;
  border: 1px solid #E8E8E8;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

/* 鼠标悬停时显示下拉菜单 */
.desktop-category-group:hover .desktop-group-items {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 鼠标悬停时改变箭头方向 */
.desktop-category-group:hover .desktop-group-title .group-toggle {
  transform: rotate(180deg);
}

.desktop-sub-link {
  display: block;
  padding: 10px 15px;
  color: #2C3E50;
  text-decoration: none;
  font-size: 0.9em;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.desktop-sub-link:hover {
  background-color: #f8f9fa;
  color: #007bff;
}

.desktop-sub-link:last-child {
  border-bottom: none;
}

/* 桌面端一级菜单链接样式 */
.nav-link.desktop-top-level {
  color: #2C3E50;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-block;
}

.nav-link.desktop-top-level:hover {
  background-color: #34495E !important;
  color: #FFFFFF;
}

.nav-link.desktop-top-level.active {
  background-color: #2B3E50 !important;
  color: #FFFFFF;
}

/* 移动端分类菜单在桌面端隐藏 */
.mobile-category-menu {
  display: none;
}

/* 桌面端分类菜单在移动端隐藏 */
.desktop-category-menu {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.mobile-nav-toggle:hover {
  background-color: #34495E;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/*.mobile-nav-toggle.active {
  background-color: #E74C3C;
}*/

.mobile-nav-toggle.active .menu-icon {
  transform: rotate(90deg);
}

.mobile-nav-toggle .menu-icon {
  font-size: 1.1em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.nav-content {
  display: flex;
  justify-content: center;
  gap: 15px;    
  flex-wrap: wrap;
  position: relative;
}

/* 移动端导航头部在PC端隐藏 */
.mobile-nav-header {
  display: none;
}

/* 移动端导航遮罩 */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

.nav-scroll-hint {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.7em;
  z-index: 10;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}

/* 语言切换选项 */
.lang-switch {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 6px 10px;
  border-radius: 18px;
  backdrop-filter: blur(15px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.6);
}

.language-option {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  padding: 2px 4px;
  border-radius: 12px;
}

.language-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.language-option:hover::before {
  opacity: 1;
}

.language-option:hover {
  color: #fff;
}

.language-option:active {
  opacity: 0.8;
}

.language-option .lang-label {
  font-weight: 600;
  font-size: 12px;
}

.lang-separator {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  font-size: 12px;
  margin: 0 2px;
}

.language-option.active .lang-desc {
  color: #2B3E50;
  opacity: 0.8;
}

.check-icon {
  margin-left: auto;
  color: #B9770E;
  animation: checkIn 0.3s ease;
}

@keyframes checkIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 语言切换弹窗 */
.language-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.language-modal.show {
  opacity: 1;
}

.language-modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 420px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(0.8) translateY(40px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-modal.show .language-modal-content {
  transform: scale(1) translateY(0);
}

.language-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e1e5e9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.language-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #2C3E50;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: #566573;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-modal:hover {
  background: #F2F3F4;
  color: #2C3E50;
}

.language-options {
  padding: 8px 0 16px;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  text-decoration: none;
  color: #2C3E50;
  transition: all 0.3s ease;
  position: relative;
  border-left: 4px solid transparent;
}

.language-option:hover {
  background: linear-gradient(135deg, #F2F3F4, #D6DBDF);
  transform: translateX(4px);
  border-left-color: #B9770E;
}

.language-option.active {
  background: linear-gradient(135deg, #D6DBDF, #F2F3F4);
  color: #2B3E50;
  border-left-color: #7B241C;
  box-shadow: inset 0 1px 3px rgba(123, 36, 28, 0.1);
}

.language-option.active:hover {
  background: linear-gradient(135deg, #D6DBDF, #F2F3F4);
  transform: translateX(2px);
}

.language-option .lang-label {
  font-weight: 600;
  font-size: 16px;
  flex: 1;
}

.language-option .lang-desc {
  font-size: 13px;
  color: #566573;
  margin-left: 12px;
  font-style: italic;
}

.language-option.active .lang-desc {
  color: #2B3E50;
  opacity: 0.8;
}

.check-icon {
  margin-left: auto;
  color: #B9770E;
  animation: checkIn 0.3s ease;
}

@keyframes checkIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 移动端优化 */
@media (max-width: 768px) {
  .lang-switch {
    right: 15px;
    top: 15px;
  }
  
  .lang-toggle {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 20px;
  }
  
  .language-dropdown {
    min-width: 200px;
    margin-top: 6px;
  }
  
  .language-option {
    padding: 14px 16px;
  }
  
  .language-option .lang-label {
    font-size: 15px;
  }
  
  .language-option .lang-desc {
    font-size: 12px;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .lang-switch {
    right: 10px;
    top: 10px;
  }
  
  .lang-toggle {
    padding: 6px 10px;
    font-size: 12px;
    gap: 4px;
  }
  
  .language-dropdown {
    min-width: 180px;
    margin-top: 5px;
  }
  
  .language-option {
    padding: 12px 14px;
  }
  
  .language-option .lang-label {
    font-size: 14px;
  }
  
  .language-option .lang-desc {
    font-size: 11px;
  }
}
@media (max-width: 768px) {
  .lang-switch {
    right: 15px;
    top: 15px;
    padding: 4px 6px;
    gap: 2px;
  }
  
  .language-option {
    padding: 1px 2px;
    font-size: 10px;
  }
  
  .language-option .lang-label {
    font-size: 10px;
  }
  
  .lang-separator {
    font-size: 10px;
    margin: 0 1px;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .lang-switch {
    right: 8px;
    top: 8px;
    padding: 3px 4px;
    gap: 1px;
    border-radius: 12px;
  }
  
  .language-option {
    padding: 1px 2px;
    font-size: 9px;
    border-radius: 8px;
  }
  
  .language-option .lang-label {
    font-size: 9px;
  }
  
  .lang-separator {
    font-size: 9px;
    margin: 0;
  }
}

main {
  max-width: 800px;
  margin: 30px auto;
  background-color: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  border: 1px solid #D6DBDF;
  position: relative;
}

main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7B241C 0%, #B9770E 50%, #7B241C 100%);
  border-radius: 10px 10px 0 0;
}

h2 {
  color: #2B3E50;
  border-bottom: 2px solid #2B3E50;
  padding-bottom: 5px;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: #B9770E;
}

.articles-list {
  padding: 0;
  list-style-type: none;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.articles-list li {
  margin: 15px 0;
  padding-left: 15px;
  position: relative;
}

.articles-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #2B3E50;
}

.article-title {
  color: #2C3E50;
  text-decoration: none;
  display: block;
}

.article-title:hover {
  color: #34495E;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #566573;
  background-color: #2B3E50;
  color: #FFFFFF;
}

/* 社交媒体链接样式 */
.social-media-links a {
  display: inline-block;
  margin: 0 10px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-media-links a:hover {
  transform: translateY(-2px);
  color: #FF6B35 !important;
}

.social-media-links a:hover .bi {
  color: #FF6B35;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .social-media-links div {
    gap: 15px !important;
  }
  
  .social-media-links a {
    font-size: 20px !important;
    margin: 5px !important;
  }
}

/* 轮播图片样式 */
.portraits-carousel {
  margin-bottom: 20px;
  overflow: hidden;
  width: 100%;
  max-width: 630px; /* 5张图片 * 90px */
  margin-left: auto;
  margin-right: auto;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 90px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: calc(200%); /* 双倍宽度以容纳重复的图片 */
  animation: carousel-scroll 20s linear infinite;
}

.portrait-item {
  flex: 0 0 90px; /* 固定宽度 */
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10%;
  border: 3px solid #7B241C;
  box-shadow: 0 2px 5px rgba(123, 36, 28, 0.3);
  transition: transform 0.3s;
  filter: sepia(10%) contrast(1.1);
}

.portrait-item img:hover {
  transform: scale(1.1);
  border-color: #B9770E;
}

/* 为链接添加历史风格的悬停效果 */
.articles-list a:hover::before {
  content: '❯';
  position: absolute;
  left: -15px;
  color: #B9770E;
  font-weight: bold;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-5px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 为文章列表项添加微妙的分隔线 */
.articles-list li {
  margin: 15px 0;
  padding-left: 15px;
  position: relative;
  padding-bottom: 15px;
  border-bottom: 1px solid #F2F3F4;
}

.articles-list li:last-child {
  border-bottom: none;
}

/* 轮播动画 */
@keyframes carousel-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* 移动到一半位置实现无缝循环 */
  }
}

/* 暂停动画当鼠标悬停时 */
.portraits-carousel:hover .carousel-track {
  animation-play-state: paused;
}

.no-articles {
  text-align: center;
  color: #566573;
  font-style: italic;
  padding: 40px 0;
}

.loading {
  text-align: center;
  padding: 40px 0;
  color: #566573;
  position: relative;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #2B3E50;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.category-description {
  margin-bottom: 30px;
  padding: 15px;
  background-color: #D6DBDF;
  border-left: 4px solid #7B241C;
  border-radius: 5px;
}

.article-meta {
  font-size: 14px;
  color: #566573;
  margin-top: 5px;
}

.article-summary {
  color: #2C3E50;
  line-height: 1.6;
  margin-top: 8px;
  font-size: 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #D6DBDF;
}

.pagination a, .pagination span {
  padding: 8px 15px;
  border: 1px solid #5D6D7E;
  border-radius: 5px;
  text-decoration: none;
  color: #2C3E50;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background-color: #D6DBDF;
  color: #2B3E50;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(43, 62, 80, 0.2);
}

.pagination .current {
  background-color: #2B3E50;
  color: #FFFFFF;
  border-color: #2B3E50;
}

.stats {
  margin-bottom: 20px;
  font-size: 14px;
  color: #566573;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #2B3E50;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(43, 62, 80, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  background-color: #34495E;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(43, 62, 80, 0.4);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    -webkit-tap-highlight-color: rgba(43, 62, 80, 0.2);
  }

  /* 桌面端/移动端显示控制 */
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: block !important;
  }

  /* 优化触摸目标大小 */
  a, button {
    min-height: 40px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .article-title {
    min-height: auto;
    display: block;
    padding: 8px 0;
  }

  header {
    padding: 20px 15px;
    position: relative;
    text-align: left; /* 移动端标题靠左 */
  }
  
  /* 头部移动端菜单按钮样式 - 当不在mobile-header-controls容器中时才应用 */
  header .mobile-nav-toggle:not(.mobile-header-controls .mobile-nav-toggle) {
    display: flex !important;
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    z-index: 1001;
  }
  
  header .mobile-nav-toggle .menu-icon {
    font-size: 18px;
    color: white;
  }
  
  header .mobile-nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
  }

  header h1 {
    font-size: 1.5em;
    margin: 0 0 8px 0;
    padding-right: 100px; /* 调整为与新布局匹配 */
    text-align: left; /* 确保标题靠左 */
  }
  header p {
    font-size: 1.0em; /* 主标题1.5em的2/3 */
    margin: 0 0 15px 0;
    text-align: left; /* 确保副标题靠左 */
    padding-right: 100px; /* 调整为与新布局匹配 */
  }

  nav {
    padding: 8px 15px;
    gap: 0;
    position: relative;
    background-color: #F2F3F4;
    display: block;
    overflow: visible;
  }

  /* 隐藏导航区域的移动端按钮 */
  .desktop-nav-toggle {
    display: flex;
  }

  /* 在移动端显示导航头部 */
  .mobile-nav-header {
    display: flex !important;
  }

  /* 移动端导航内容 */
  .nav-content {
    position: fixed;
    top: 0;
    left: -100%;
    width: 240px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: flex-start;
    align-items: stretch;
    overflow-y: auto;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-content.mobile-nav-open {
    left: 0;
  }

  /* 移动端导航头部 */
  .mobile-nav-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #2B3E50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1002;
  }

  .mobile-nav-title {
    font-size: 0.95em;
    font-weight: 600;
  }

  .mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    padding: 3px;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  .mobile-nav-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
  }

  /* 移动端语言切换样式 */
  .mobile-lang-switch {
    padding: 20px 15px;
    border-bottom: 1px solid #E8E8E8;
    background-color: #f8f9fa;
  }
  
  .mobile-lang-title {
    font-size: 0.85em;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .mobile-lang-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
  }
  
  .mobile-lang-btn {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #2C3E50;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 44px;
  }
  
  .mobile-lang-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
  }
  
  .mobile-lang-btn.current {
    background-color: #2B3E50;
    border-color: #2B3E50;
    color: white;
    font-weight: 600;
  }

  /* 移动端二级分类菜单样式 */
  .mobile-category-menu {
    flex: 1;
    overflow-y: auto;
  }
  
  .mobile-category-group {
    border-bottom: 1px solid #E8E8E8;
  }
  
  .mobile-group-title {
    padding: 15px;
    background-color: #f8f9fa;
    font-size: 0.9em;
    font-weight: 600;
    color: #2C3E50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #E8E8E8;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
  }
  
  .mobile-group-title:hover {
    background-color: #e9ecef;
  }
  
  .group-toggle {
    font-size: 0.8em;
    transition: transform 0.3s ease;
  }
  
  .mobile-group-items {
    background-color: white;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }
  
  .mobile-group-items.collapsed {
    max-height: 0;
  }
  
  .mobile-group-items.expanded {
    max-height: 500px; /* 足够大的值来容纳所有子项 */
  }
  
  .mobile-category-link {
    display: block;
    padding: 12px 20px;
    color: #2C3E50;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  /* 一级菜单（无分组）样式 */
  .mobile-category-link.mobile-top-level {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 1px solid #E8E8E8;
    padding: 15px 20px;
  }
  
  .mobile-category-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: #2B3E50;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: top;
  }
  
  .mobile-category-link:hover {
    background-color: #F8F9FA;
    color: #2B3E50;
    padding-left: 25px;
  }
  
  .mobile-category-link.mobile-top-level:hover {
    background-color: #e9ecef;
    padding-left: 25px;
  }
  
  .mobile-category-link:hover::before {
    transform: scaleY(1);
  }
  
  .mobile-category-link:last-child {
    border-bottom: none;
  }

  .nav-content .desktop-nav-menu a {
    white-space: normal;
    padding: 10px 15px;
    font-size: 0.9em;
    font-weight: 500;
    border-radius: 0;
    margin: 0;
    border: none;
    background: none;
    border-bottom: 1px solid #E8E8E8;
    color: #2C3E50;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    line-height: 1.3;
  }

  .nav-content .desktop-nav-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: #2B3E50;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: top;
  }

  .nav-content .desktop-nav-menu a:hover {
    background-color: #F8F9FA;
    color: #2B3E50;
    padding-left: 20px;
  }

  .nav-content .desktop-nav-menu a:hover::before {
    transform: scaleY(1);
  }

  .nav-content .desktop-nav-menu a.active {
    background-color: #2B3E50;
    color: white;
    padding-left: 20px;
  }

  .nav-content a.active::before {
    background-color: #E74C3C;
    transform: scaleY(1);
  }

  .nav-separator {
    display: none; /* 在移动端侧边栏中隐藏分割符 */
  }

  .nav-scroll-hint {
    display: none !important; /* 在移动端隐藏滚动提示 */
  }

  main {
    max-width: none;
    margin: 15px;
    padding: 20px 15px;
    border-radius: 8px;
  }

  h2 {
    font-size: 1.3em;
    margin-bottom: 15px;
  }

  .articles-list li {
    margin: 12px 0;
    padding-left: 12px;
    line-height: 1.5;
  }

  .article-title {
    font-size: 0.95em;
    line-height: 1.4;
  }

  .category-description {
    margin-bottom: 20px;
    padding: 12px;
    font-size: 0.9em;
    line-height: 1.5;
  }

  .article-meta {
    font-size: 0.8em;
  }

  .article-summary {
    font-size: 0.85em;
    line-height: 1.5;
  }

  .pagination {
    gap: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
  }

  .pagination a, .pagination span {
    padding: 6px 10px;
    font-size: 0.9em;
    min-width: 35px;
    text-align: center;
  }

  .stats {
    font-size: 0.85em;
    margin-bottom: 15px;
  }

  footer {
    padding: 15px;
    font-size: 0.8em;
  }

  .portraits-carousel {
    max-width: 360px; /* 移动端显示4张图片 */
    margin-bottom: 15px;
  }

  .portrait-item img {
    width: 60px;
    height: 60px;
    border: 2px solid #ffffff;
  }

  .portrait-item {
    flex: 0 0 72px; /* 调整移动端间距 */
  }

  .no-articles {
    padding: 30px 15px;
    font-size: 0.9em;
  }

  .loading {
    padding: 30px 15px;
    font-size: 0.9em;
  }
}

/* Ultra small screens (phones in portrait) */
@media (max-width: 480px) {
  header {
    padding: 15px 10px;
  }

  header h1 {
    font-size: 1.3em;
  }
  header p {
    font-size: 0.87em; /* 主标题1.3em的2/3，四舍五入 */
  }

  nav {
    padding: 6px 12px;
  }

  .nav-content {
    width: 200px;
  }

  .nav-content a {
    padding: 2px 12px;
    font-size: 0.85em;
    line-height: 1.2;
  }

  .mobile-nav-header {
    padding: 5px 12px;
  }

  .mobile-nav-title {
    font-size: 0.9em;
  }

  main {
    margin: 10px;
    padding: 15px 12px;
  }

  h2 {
    font-size: 1.2em;
  }

  .articles-list li {
    margin: 10px 0;
    padding-left: 10px;
  }

  .article-title {
    font-size: 0.9em;
  }

  .category-description {
    padding: 10px;
    margin-bottom: 15px;
  }

  .pagination a, .pagination span {
    padding: 5px 8px;
    font-size: 0.85em;
    min-width: 30px;
  }

  .portrait-item img {
    width: 50px;
    height: 50px;
  }
  
  .portrait-item {
    flex: 0 0 60px; /* 超小屏幕更紧凑 */
  }
  
  .portraits-carousel {
    max-width: 300px; /* 超小屏幕显示3-4张图片 */
  }
  
  footer {
    padding: 12px;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 15px;
    right: 15px;
    font-size: 18px;
  }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  header {
    padding: 15px 20px;
  }

  header h1 {
    margin-bottom: 5px;
  }

  header p {
    margin-bottom: 10px;
  }
}

.breadcrumb {
  font-size: 14px;
  color: #566573;
  background-color: #F2F3F4;
  padding: 10px 15px;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  justify-content: flex-start;
  border: 1px solid #D6DBDF;
}

.breadcrumb a {
  color: #B9770E;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #7B241C;
}

.breadcrumb-separator {
  margin: 0 8px;
  color: #AAB7B8;
}

.breadcrumb-current {
  color: #2C3E50;
  font-weight: bold;
}

