/* 全局变量定义 */
:root {
  --primary-blue: #2563eb;
  --deep-blue: #1e40af;
  --light-blue: #dbeafe;
  --accent-purple: #7c3aed;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-white: #ffffff;
  --bg-gray: #f8fafc;
  --border-color: #e5e7eb;
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'Fira Code', monospace;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --border-radius: 8px;
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
}

/* 通用样式 */
a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--deep-blue);
  text-decoration: underline;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  background-color: var(--deep-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
}

.btn-outline:hover {
  background-color: var(--primary-blue);
  color: white;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--primary-blue);
  border-radius: 2px;
}

/* 导航栏样式 */
header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

/* 桌面导航样式 */
.desktop-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.desktop-nav a {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  text-decoration: none;
  transition: var(--transition);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--primary-blue);
}

.desktop-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-blue);
}

/* 移动端菜单样式 */
.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-150%);
  transition: var(--transition);
  z-index: 999;
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-menu ul {
  list-style: none;
  padding: 2rem 0;
}

.mobile-menu li {
  text-align: center;
  margin-bottom: 1rem;
}

.mobile-menu a {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.75rem 0;
  display: block;
  text-decoration: none;
  transition: var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--primary-blue);
}

.mobile-menu a.active {
  background-color: var(--light-blue);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
}

.logo span {
  color: var(--accent-purple);
}

/* 汉堡菜单样式 - 修复显示问题 */
.menu-toggle {
  cursor: pointer;
  color: var(--text-dark);
  font-size: 1.5rem;
  padding: 0.5rem;
  z-index: 1001;
  /* 在移动设备上默认显示 */
}





.search-form {
  display: none;
  align-items: center;
  background-color: var(--bg-gray);
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.search-form.active {
  display: flex;
}

.search-form input {
  background: transparent;
  border: none;
  outline: none;
  padding: 0.5rem;
  width: 200px;
}

.search-form button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-light);
}

.hamburger {
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-dark);
  padding: 0.5rem;
  z-index: 1001;
  /* 在移动设备上默认显示 */
}

/* 导航链接样式 - 全局统一 */
.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  text-decoration: none;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-blue);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-blue);
}

/* 导航操作按钮样式 - 全局统一 */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* 英雄区域样式 */
.hero {
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
  color: white;
  padding: 10rem 0 6rem;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* 新闻卡片样式 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.news-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card-content {
  padding: 1.5rem;
}

.news-card-category {
  display: inline-block;
  background-color: var(--light-blue);
  color: var(--primary-blue);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.news-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.news-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* 特性介绍样式 */
.features {
  background-color: var(--bg-gray);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* 数据统计样式 */
.stats {
  background-color: var(--primary-blue);
  color: white;
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.stat-item p {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* 页脚样式 */
footer {
  background-color: var(--text-dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-blue);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-blue);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* 阅读进度条样式 */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--primary-blue);
  z-index: 2000;
  width: 0%;
  transition: width 0.1s ease;
}

/* 面包屑导航样式 */
.breadcrumb {
  background-color: var(--bg-gray);
  padding: 1rem 0;
  margin-top: 70px; /* 与固定导航栏高度匹配 */
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--text-dark);
  margin: 0 0.5rem;
}

/* 文章页面样式 */
.article-content {
  padding: 3rem 0;
}

.article-wrapper {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
}

/* 文章主体样式 */
.article-main {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.article-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* 页面标题样式 - 适用于服务条款和隐私政策 */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
}

/* 条款内容通用样式 */
.terms-content,
.privacy-content {
  max-width: 900px;
  margin: 0 auto;
}

.terms-intro,
.privacy-intro {
  background-color: var(--bg-gray);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-blue);
}

/* 服务条款强调框样式 */
.terms-emphasis-box {
  background-color: var(--light-blue);
  border: 2px solid var(--primary-blue);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.terms-emphasis-box h3 {
  color: var(--deep-blue);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
}

.terms-emphasis-box ul {
  list-style: disc;
  padding-left: 2rem;
}

.terms-emphasis-box li {
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-dark);
}

/* 条款和隐私政策章节样式 */
.terms-section,
.privacy-section {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.terms-section:last-child,
.privacy-section:last-child {
  border-bottom: none;
}

.terms-section h2,
.privacy-section h2 {
  font-size: 1.75rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-blue);
  display: inline-block;
}

.terms-section h3,
.privacy-section h3 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin: 1.5rem 0 1rem;
}

.terms-section p,
.privacy-section p {
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.7;
}

.terms-section ul,
.privacy-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.terms-section li,
.privacy-section li {
  margin-bottom: 0.5rem;
  list-style-type: disc;
}

/* 联系信息列表样式 */
.contact-info {
  padding-left: 0 !important;
}

.contact-info li {
  list-style-type: none !important;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

.contact-info li i {
  color: var(--primary-blue);
  font-size: 1.125rem;
  position: absolute;
  left: 0;
  top: 0.25rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
  }
  
  .terms-emphasis-box {
    padding: 1.5rem;
  }
  
  .terms-content,
  .privacy-content {
    padding: 0 1rem;
  }
}

.article-meta span {
  display: flex;
  align-items: center;
}

.article-cover {
  margin-bottom: 2rem;
}

.article-cover img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.article-body {
  padding: 2rem;
}

.article-body p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.article-body h2 {
  font-size: 2rem;
  margin: 2.5rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-dark);
}

.article-body h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text-dark);
}

.article-body h4 {
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-dark);
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body ul {
  list-style-type: disc;
}

.article-body ol {
  list-style-type: decimal;
}

.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.article-body strong {
  font-weight: 600;
  color: var(--text-dark);
}

.article-body .code-example {
  background-color: var(--bg-gray);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  overflow-x: auto;
}

.article-body .code-example pre {
  margin: 0;
}

.article-body .code-example code {
  font-family: var(--font-code);
  font-size: 0.875rem;
  color: var(--text-dark);
  line-height: 1.5;
}

.article-tags {
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.article-tags a {
  display: inline-block;
  background-color: var(--light-blue);
  color: var(--primary-blue);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.article-tags a:hover {
  background-color: var(--primary-blue);
  color: white;
}

/* 社交分享样式 */
.social-share {
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--bg-gray);
  border-radius: 50%;
  color: var(--text-dark);
  transition: var(--transition);
}

.share-btn:hover {
  background-color: var(--primary-blue);
  color: white;
  transform: translateY(-3px);
}

/* 作者信息样式 */
.author-info {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background-color: var(--bg-gray);
  border-radius: var(--border-radius);
  margin: 2rem 0;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-details h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.author-details p {
  margin-bottom: 0;
  color: var(--text-light);
}

/* 相关文章样式 */
.related-articles {
  margin: 3rem 0;
}

.related-articles h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.related-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.related-thumbnail {
  height: 180px;
  overflow: hidden;
}

.related-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-thumbnail img {
  transform: scale(1.05);
}

.related-card a {
  text-decoration: none;
  color: var(--text-dark);
  display: block;
}

.related-card h4 {
  padding: 1.25rem 1.5rem;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
}

.related-card p {
  padding: 0 1.5rem 1.5rem;
  margin: 0;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* 侧边栏样式 */
.article-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-section {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-section h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-blue);
}

.sidebar-categories ul {
  list-style: none;
  padding: 0;
}

.sidebar-categories li {
  margin-bottom: 0.75rem;
}

.sidebar-categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
}

.sidebar-categories a:hover {
  color: var(--primary-blue);
  padding-left: 0.5rem;
}

.sidebar-categories .count {
  background-color: var(--bg-gray);
  color: var(--text-light);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
}

.sidebar-popular-posts ul {
  list-style: none;
  padding: 0;
}

.sidebar-popular-posts li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sidebar-popular-posts .post-thumbnail {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.sidebar-popular-posts .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-popular-posts .post-info h4 {
  font-size: 0.875rem;
  margin: 0 0 0.25rem;
  line-height: 1.4;
}

.sidebar-popular-posts .post-info .post-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.sidebar-popular-posts a {
  text-decoration: none;
  color: var(--text-dark);
}

.sidebar-popular-posts a:hover {
  color: var(--primary-blue);
}

.sidebar-tags a {
  display: inline-block;
  background-color: var(--bg-gray);
  color: var(--text-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  transition: var(--transition);
}

.sidebar-tags a:hover {
  background-color: var(--primary-blue);
  color: white;
}

.sidebar-newsletter form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-newsletter input[type="email"] {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition);
}

.sidebar-newsletter input[type="email"]:focus {
  border-color: var(--primary-blue);
}

/* 回到顶部按钮样式 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--deep-blue);
  transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.75rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  /* 在移动设备上显示汉堡菜单，隐藏桌面导航 */
  .menu-toggle,
  .hamburger {
    display: block;
  }
  
  .desktop-nav {
    display: none;
  }
  
  /* 调整移动端菜单位置和样式 */
  .mobile-menu,
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: var(--transition);
    transform: translateY(-150%);
  }
  
  /* 确保两种菜单结构都能正常激活显示 */
  .mobile-menu.active,
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  /* 修复nav-links的默认隐藏 */
  .nav-links {
    padding: 0;
    margin: 0;
  }
  
  /* 确保导航链接在移动端显示正确 */
  .nav-links,
  .nav-links ul {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .nav-links li {
    margin: 0;
    width: 100%;
  }
  
  /* 修复汉堡按钮激活状态样式 */
  .hamburger.active {
    color: var(--primary-blue);
    /* 添加旋转动画效果 */
    transform: rotate(90deg);
  }
  
  /* 修复菜单按钮激活状态样式 */
  .menu-toggle.active {
    color: var(--primary-blue);
  
    z-index: 1000;
    transition: all 0.3s ease;
  }
  
  /* 确保移动端菜单激活状态正确显示 */
  .mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  /* 移动导航链接样式优化 */
  .mobile-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--bg-gray);
    transition: var(--transition);
  }
  
  .mobile-menu a:hover,
  .mobile-menu a.active {
    color: var(--primary-blue);
    background-color: var(--bg-gray);
  }
  
  /* 确保链接在移动端可以正确点击 */
  .mobile-menu a,
  .nav-links a {
    pointer-events: auto;
    position: relative;
    z-index: 1002;
  }
  
  /* 相关文章在移动端的样式优化 */
  .related-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .related-card {
    margin-bottom: 0;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .news-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }


@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero {
    padding: 8rem 0 4rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .btn {
    padding: 0.75rem 1.25rem;
  }
}

/* Enhanced Mobile Responsiveness for All Pages */
@media (max-width: 768px) {
  /* Article Page Responsive Layout */
  .article-wrapper {
    grid-template-columns: 1fr;
  }
  
  .article-sidebar {
    order: 1;
  }
  
  .article-main {
    order: 2;
  }
  
  .article-header h1 {
    font-size: 2rem;
  }
  
  .article-content {
    padding: 2rem 0;
  }
  
  /* Breadcrumb Adjustments */
  .breadcrumb {
    margin-top: 60px;
    font-size: 0.8rem;
  }
  
  /* Sidebar Responsive */
  .article-sidebar > * {
    margin-bottom: 1.5rem;
  }
  
  /* Content Spacing */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Image Responsiveness */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Back to Top Button Adjustment */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 769px) {
  /* 确保在桌面端正确显示菜单 */
  .mobile-menu {
    display: none;
  }
  
  /* 在桌面端隐藏汉堡菜单按钮 */
  .menu-toggle,
  .hamburger {
    display: none;
  }
  
  /* 确保桌面导航链接正确显示 */
  .nav-links {
    display: flex;
    transform: none;
    position: static;
    background: none;
    box-shadow: none;
    width: auto;
    top: auto;
    left: auto;
    right: auto;
  }
  
  .nav-links ul {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }
  
  .nav-links li {
    width: auto;
    margin: 0;
  }
}

@media (max-width: 480px) {
  /* Further Optimization for Small Screens */
  .article-header {
    padding: 1.5rem 1rem;
  }
  
  .article-header h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  /* Navigation Enhancements */
  .nav-links {
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
  }
  
  /* 修复移动端导航菜单链接点击区域 */
  .nav-links li {
    margin: 0;
  }
  
  .nav-links a {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bg-gray);
  }
  
  /* 确保链接在移动端可以正确点击和跳转 */
  a {
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
  
  /* 确保移动端链接文字不被截断 */
  .related-card h4,
  .sidebar-popular-posts h4 {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Ensure proper spacing in content */
  p, li {
    line-height: 1.6;
  }
  
  /* Form Elements Responsiveness */
  input, textarea, select {
    width: 100%;
    padding: 0.75rem;
  }
  
  /* Code blocks handling */
  pre {
    overflow-x: auto;
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  /* Table handling */
  table {
    display: block;
    overflow-x: auto;
  }
  
  /* Card adjustments for .html */
  .path-card {
    padding: 1.5rem 1rem;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  /* Ensure tutorial cards are properly spaced on mobile */
  .path-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  /* Path step adjustments */
  .path-step {
    margin-bottom: 0.75rem;
  }
  
  /* Typography adjustments for path cards */
  .path-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  /* Ensure proper spacing for cards in tutorial path */
  .path-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Progress Bar Visibility */
  .reading-progress {
    height: 2px;
  }
  
  /* Footer Responsiveness */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .social-links {
    justify-content: center;
  }
}}