/* CSS变量定义 */
:root {
  --primary-color: #20a53a;
  --background-color: #f0f0f0;
  --text-color: #333;
  --container-width: 60%;
  --border-radius: 10px;
  --line-height: 2.3;
  --white: #ffffff;
  --gray-light: #f8f9fa;
  --gray-medium: #6c757d;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

/* 导航栏样式 */
.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: var(--gray-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: var(--transition);
}

/* 主要内容区域 */
main {
  min-height: calc(100vh - 120px);
}

/* 英雄区域 */
.hero-section {
  text-align: center;
  padding: 4rem 5% 2rem;
  background: linear-gradient(135deg, var(--gray-light) 0%, var(--white) 100%);
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--gray-medium);
  max-width: 600px;
  margin: 0 auto;
}

/* 容器样式 */
.container {
  width: var(--container-width);
  margin: 2rem auto;
  background-color: var(--background-color);
  padding: 2% 5%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* 章节样式 */
section {
  margin-bottom: 3rem;
}

section:last-child {
  margin-bottom: 0;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  font-weight: 600;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-weight: 500;
}

p {
  margin-bottom: 1rem;
  line-height: var(--line-height);
}

/* 特色网格 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}

/* 列表样式 */
.feature-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  padding: 0.8rem 0;
  padding-left: 2rem;
  position: relative;
  line-height: var(--line-height);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.feature-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.1rem;
}

.feature-list li:last-child {
  border-bottom: none;
}

/* 导航卡片 */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.nav-card {
  display: block;
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.nav-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.nav-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}

.nav-card p {
  margin-bottom: 0;
  color: var(--gray-medium);
}

/* 链接样式 */
a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: var(--transition);
}

a:hover {
  color: #1a8c32;
  text-decoration: none;
}

/* 页脚样式 */
.footer {
  background-color: var(--text-color);
  color: var(--white);
  text-align: center;
  padding: 2rem 5%;
  margin-top: 3rem;
}

.footer-content p {
  margin-bottom: 0.5rem;
}

.footer-content p:last-child {
  margin-bottom: 0;
}

.icp-info a {
  color: var(--gray-light);
  text-decoration: none;
}

.icp-info a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* 实用工具类 */
.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 2rem;
}

.hidden {
  display: none;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-medium);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-color);
}