/* 学术化专业网站样式 */
body {
  font-family: 'Source Serif Pro', 'Crimson Text', 'Times New Roman', serif;
  line-height: 1.8;
  color: #2c3e50;
  margin: 0;
  padding: 0;
  background-color: #fafafa;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 顶部导航 - 学术化样式 */
.navbar {
  background-color: #ffffff;
  border-bottom: 2px solid #1a365d;
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.navbar h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: #1a365d;
  letter-spacing: 0.5px;
  font-family: 'Source Serif Pro', serif;
}

.navbar nav {
  display: flex;
  gap: 2rem;
}

.navbar nav a {
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  font-family: 'Inter', sans-serif;
}

.navbar nav a:hover {
  color: #1a365d;
  border-bottom-color: #1a365d;
  background-color: transparent;
}

.navbar nav a.active {
  color: #1a365d;
  border-bottom-color: #1a365d;
  font-weight: 600;
  background-color: transparent;
}

/* 导航控制区域 */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.search-box input {
  border: none;
  background: transparent;
  padding: 0.5rem 0.75rem;
  outline: none;
  width: 200px;
  font-size: 0.95rem;
}

.search-box button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  color: #666;
}

.search-box button:hover {
  background-color: #e9ecef;
  color: #2c3e50;
}

#themeToggle {
  border: none;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#themeToggle:hover {
  background-color: #2c3e50;
  color: white;
  transform: scale(1.05);
}

/* 主要内容区域 - 学术化样式 */
.main-content {
  padding: 3rem 0;
  min-height: 80vh;
  background-color: #ffffff;
  margin: 0 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  font-family: 'Source Serif Pro', serif;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #4a5568;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  font-style: italic;
}

/* 页脚 - 学术化样式 */
.footer {
  background-color: #1a365d;
  color: #e2e8f0;
  text-align: center;
  padding: 2.5rem 0;
  margin-top: 2rem;
  border-top: 3px solid #2d3748;
}

.footer p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

.footer a {
  color: #90cdf4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* 暗色模式 */
[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --card-bg: #2c2c2c;
  --border-color: #404040;
}

[data-theme="dark"] body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

[data-theme="dark"] .navbar {
  background-color: var(--card-bg);
  border-bottom-color: var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-controls {
    order: -1;
    width: 100%;
    justify-content: space-between;
  }
  
  .search-box input {
    width: 150px;
  }
  
  .navbar nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .page-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .search-box input {
    width: 120px;
  }
}
