/* 主样式文件 */

/* 全局样式 */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e67e22;
  --text-color: #333;
  --light-text: #f8f9fa;
  --background-color: #f8f9fa;
  --section-bg-light: #ffffff;
  --section-bg-dark: #f1f5f9;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
  transition: all 0.3s ease;
}

.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Hero 区域样式 */
.hero {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

/* 章节样式 */
.section {
  padding: 5rem 0;
}

.section:nth-child(odd) {
  background-color: var(--section-bg-light);
}

.section:nth-child(even) {
  background-color: var(--section-bg-dark);
}

.section-title {
  position: relative;
  margin-bottom: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 3px;
  background-color: var(--accent-color);
}

/* 卡片样式 */
.card {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.btn-custom {
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary-custom:hover {
  background-color: #1a2530;
  border-color: #1a2530;
}

.btn-secondary-custom {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

.btn-secondary-custom:hover {
  background-color: #217dbb;
  border-color: #217dbb;
}

/* 图表容器样式 */
.chart-container {
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
  margin-bottom: 2rem;
}

/* 页脚样式 */
footer {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 3rem 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    margin-bottom: 1.5rem;
  }
}

/* 微动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 1s ease-in-out;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.slide-up {
  animation: slideUp 0.8s ease-out forwards;
}

/* 导航项目的悬停效果 */
.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  margin: 0 0.2rem;
}

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

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* 数据可视化相关样式 */
.mermaid {
  margin: 2rem 0;
}