/* 全局变量与基础样式 */
:root {
  --primary-color: #4a6fa5;
  --secondary-color: #166088;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --border-color: #e1e8ed;
  --success-color: #28a745;
  --error-color: #dc3545;
  --scrollbar-width: 0px; /* 新增变量 */
}

/* 防止汉堡菜单打开时页面跳动 */
body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* 确保导航菜单在移动端有足够的z-index */
@media (max-width: 768px) {
  .nav-links {
    z-index: 1000;
  }
  
  .hamburger {
    z-index: 1001;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light-bg);
  background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

a {
  text-decoration: none;
}

li {
  list-style-type: none;
}

/* 导航栏 */
.main-nav {
  background: linear-gradient(135deg, #166088 0%, #4a6fa5 100%);
  color: white;
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 101;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover {
  color: white;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: white;
}

.nav-links a.active::after {
  width: 100%;
}

/* 搜索区域 */
.search-section {
  padding: 1.5rem 0;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 50px;
  z-index: 100;
}

.search-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  gap: 1rem;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1.5rem 0.75rem 3rem;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 1rem;
  transition: all 0.3s;
  background: var(--light-bg);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(74, 111, 165, 0.25);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
}

.search-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.search-btn:hover {
  background: var(--secondary-color);
}

#reset-search {
  background-color: #dc3545;
}

#reset-search:hover {
  background-color: #c82333;
}

.search-status {
  text-align: center;
  margin-top: 0.5rem;
  color: var(--success-color);
  font-size: 0.9rem;
  min-height: 1.5rem;
}

.error {
  color: var(--error-color) !important;
}

/* 主内容区域 */
.main-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem auto;
  align-items: flex-start;
}

/* 内容区域 */
.content {
  flex: 1;
  min-width: 300px;
  order: 3;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  position: relative;
  padding-bottom: 0.5rem;
  text-align: center;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-color);
}

.content > .timeline-description {
  text-align: center;
}

/* 更新日志特定样式 */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  border-radius: 10px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-content {
  padding: 20px 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(74, 111, 165, 0.2);
}

.timeline-date {
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.timeline-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-color);
  position: relative;
  padding-bottom: 10px;
}

.timeline-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
}

.timeline-item:nth-child(odd) .timeline-title::after {
  right: 0;
  left: auto;
}

.timeline-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.timeline-features {
  margin: 15px 0;
}

.timeline-feature {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

.timeline-feature-icon {
  color: var(--primary-color);
  margin-right: 10px;
  flex-shrink: 0;
  margin-top: 3px;
}

.timeline-feature-text {
  color: #555;
}

.timeline-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #e6f2f8;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--secondary-color);
  margin-right: 8px;
  margin-bottom: 8px;
}

.timeline-tag.new {
  background: #e6f8e6;
  color: #28a745;
}

.timeline-tag.improvement {
  background: #fff3cd;
  color: #856404;
}

.timeline-tag.fix {
  background: #f8e6e6;
  color: #dc3545;
}

/* 页脚 */
.site-footer {
  background: linear-gradient(135deg, #166088 0%, #4a6fa5 100%);
  color: white;
  padding: 1.5rem 0;
  margin-top: 3rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.copyright {
  flex: 1;
}

.icp-info a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.3s ease;
}

.icp-info a:hover {
  color: white;
  text-decoration: underline;
}

.links a {
  color: rgba(255,255,255,0.85);
  margin-left: 1.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.links a:hover {
  color: white;
  text-decoration: underline;
}

/* SVG图标 */
.svg-icon {
  vertical-align: middle;
  margin-right: 0.3rem;
  display: inline-block;
  width: 1em;
  height: 1em;
}

.search-box .svg-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* 汉堡菜单 */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 102;
  transition: transform 0.3s ease;
}

.hamburger:hover {
  transform: translateY(-50%) scale(1.1);
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.no-scroll {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0);
}

/* 汉堡菜单动画状态 */
.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* 汉堡菜单响应式 */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 60px;
  }
  
  .hamburger {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 75%;
    height: 100vh;
    background: linear-gradient(135deg, #166088 0%, #4a6fa5 100%);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 20px 20px;
    transition: left 0.4s cubic-bezier(0.65, 0.05, 0.36, 1);
    z-index: 101;
    margin: 0;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links li {
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
  }
  
  .nav-links a {
    display: block;
    padding: 0.8rem 0;
    width: 100%;
  }
}

/* 修改双数（偶数）内容的对号布局 */
.timeline-item:nth-child(even) .timeline-feature {
    justify-content: flex-start;
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-feature-icon {
    margin-right: 10px;
    margin-left: 0;
}

.timeline-item:nth-child(even) .timeline-feature-text {
    text-align: left;
}

/* 增强移动端适配 */
@media (max-width: 768px) {
  /* 时间线布局优化 */
  .timeline::after {
    left: 20px; /* 将时间线移动到左侧 */
  }
  
  .timeline-item {
    width: 100%;
    padding: 10px 20px 10px 60px; /* 调整内边距 */
    left: 0 !important; /* 强制所有项靠左 */
    text-align: left;
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    text-align: left;
  }
  
  .timeline-item:nth-child(odd) .timeline-title::after {
    left: 0;
    right: auto;
  }
  
  /* 搜索区域优化 */
  .search-container {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .search-input {
    font-size: 16px; /* 防止iOS缩放 */
    padding: 0.9rem 1.5rem 0.9rem 3rem; /* 增大触摸区域 */
  }
  
  .search-btn, #reset-search {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
  }
  
  /* 内容区域优化 */
  .main-content {
    margin: 1rem auto;
    gap: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .timeline-content {
    padding: 15px 20px;
  }
  
  .timeline-title {
    font-size: 1.2rem;
  }
  
  /* 导航栏优化 */
  .nav-container {
    padding: 0.5rem 60px 0.5rem 1rem; /* 为汉堡按钮留出空间 */
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  /* 页脚优化 */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .links a {
    margin: 0 0.75rem;
  }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .timeline-item {
    padding-left: 50px;
    padding-right: 15px;
  }
  
  .timeline::after {
    left: 15px;
  }
  
  .timeline-content {
    padding: 12px 15px;
  }
  
  .timeline-date {
    font-size: 1rem;
  }
  
  .timeline-title {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  /* 增大触摸目标 */
  .nav-links a {
    padding: 1rem 0;
  }
  
  .timeline-feature {
    margin-bottom: 12px;
  }
}

/* 搜索栏折叠动画 */
.search-section {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.search-section.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* 导航栏调整以容纳搜索栏折叠 */
.main-nav {
  transition: top 0.3s ease;
}