/* 自定义颜色 */
:root {
  --primary: #165DFF;
  --primary-light: #E8F3FF;
  --accent: #FF7D00;
  --accent-light: #FFF0E0;
  --dark: #1D2129;
  --gray-800: #4E5969;
  --gray-600: #86909C;
  --gray-400: #C9CDD4;
  --gray-200: #F2F3F5;
}

/* 基础样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--dark);
  background-color: #FAFAFA;
  overflow-x: hidden;
  line-height: 1.6;
}

/* 容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 导航栏样式 */
.navbar {
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem 1.5rem;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--gray-800);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* 卡片样式 */
.card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: white;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.card-image {
  transition: transform 0.5s ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

/* 按钮样式 */
.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0E4BCA;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 93, 255, 0.3);
}

.btn-accent {
  background-color: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-accent:hover {
  background-color: #E06C00;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 125, 0, 0.3);
}

/* 标题样式 */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 2px;
}

/* 动画效果 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 图片查看器 */
.image-viewer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.image-viewer.active {
  display: flex;
}

.viewer-image {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  transition: transform 0.3s ease;
  background: none;
  border: none;
}

.close-btn:hover {
  transform: rotate(90deg);
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.tag-primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.tag-accent {
  background-color: var(--accent-light);
  color: var(--accent);
}

/* 时间线样式 */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary);
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 5px;
  width: 2px;
  height: calc(100% + 1rem);
  background-color: var(--gray-200);
}

.timeline-item:last-child::after {
  display: none;
}

/* 文章卡片样式 */
.article-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: white;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.article-date {
  display: inline-flex;
  align-items: center;
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.article-date i {
  margin-right: 0.5rem;
}

.article-author {
  display: inline-flex;
  align-items: center;
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.article-author i {
  margin-right: 0.5rem;
}

.article-excerpt {
  color: var(--gray-800);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* 页脚样式 */
footer {
  background-color: var(--dark);
  color: white;
  padding: 3rem 1.5rem;
}

footer a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: white;
}

footer .text-primary {
  color: var(--primary);
}

footer .text-primary:hover {
  text-decoration: underline;
}

/* 加载和错误状态 */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-size: 1.2rem;
  color: var(--primary);
}

#error-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ff4d4f;
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
  z-index: 9999;
  display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .navbar-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

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

  .section-title {
    font-size: 1.75rem;
  }
  
  .timeline-item::before,
  .timeline-item::after {
    display: none;
  }
  
  .timeline-item {
    padding-left: 0;
  }
}

/* 网格布局 */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-12 {
  gap: 3rem;
}

.items-center {
  align-items: center;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-grow {
  flex-grow: 1;
}

.self-start {
  align-self: flex-start;
}

.h-full {
  height: 100%;
}

.w-full {
  width: 100%;
}

.w-6 {
  width: 1.5rem;
}

.w-10 {
  width: 2.5rem;
}

.w-12 {
  width: 3rem;
}

.h-6 {
  height: 1.5rem;
}

.h-10 {
  height: 2.5rem;
}

.h-12 {
  height: 3rem;
}

.h-48 {
  height: 12rem;
}

.h-64 {
  height: 16rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-10 {
  margin-bottom: 2.5rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.mr-3 {
  margin-right: 0.75rem;
}

.mr-4 {
  margin-right: 1rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.pt-32 {
  padding-top: 8rem;
}

.pb-20 {
  padding-bottom: 5rem;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.875rem;
}

.text-base {
  font-size: 1rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent);
}

.text-dark {
  color: var(--dark);
}

.text-gray-400 {
  color: var(--gray-400);
}

.text-gray-600 {
  color: var(--gray-600);
}

.text-gray-800 {
  color: var(--gray-800);
}

.text-white {
  color: white;
}

.bg-white {
  background-color: white;
}

.bg-primary {
  background-color: var(--primary);
}

.bg-primary-light {
  background-color: var(--primary-light);
}

.bg-accent {
  background-color: var(--accent);
}

.bg-accent-light {
  background-color: var(--accent-light);
}

.bg-dark {
  background-color: var(--dark);
}

.bg-gray-200 {
  background-color: var(--gray-200);
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-full {
  border-radius: 9999px;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.overflow-hidden {
  overflow: hidden;
}

.object-cover {
  object-fit: cover;
}

.object-contain {
  object-fit: contain;
}

.hover\:opacity-90:hover {
  opacity: 0.9;
}

.transition-all {
  transition: all 0.3s ease;
}

.transition-opacity {
  transition: opacity 0.3s ease;
}

.transition-colors {
  transition: color 0.3s ease;
}

.hidden {
  display: none;
}

.visible {
  visibility: visible;
}

.cursor-pointer {
  cursor: pointer;
}

.focus\:outline-none:focus {
  outline: none;
}

.z-50 {
  z-index: 50;
}

.z-999 {
  z-index: 999;
}

.z-1000 {
  z-index: 1000;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.top-0 {
  top: 0;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.-bottom-6 {
  bottom: -1.5rem;
}

.-left-6 {
  left: -1.5rem;
}

.-top-6 {
  top: -1.5rem;
}

.-right-6 {
  right: -1.5rem;
}

/* 响应式断点 */
@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .sm\:flex-row {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:flex {
    display: flex;
  }
  
  .md\:hidden {
    display: none;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}