/* 全局样式 - 历史文化国风主题 无图片版 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
  --primary: #8B4513;
  --secondary: #D2B48C;
  --light: #F5F5DC;
  --dark: #2C1E11;
  --accent: #CD853F;
  --text: #333;
  --bg: #fff;
}

.dark-mode {
  --primary: #D2B48C;
  --secondary: #8B4513;
  --light: #2C1E11;
  --dark: #F5F5DC;
  --accent: #CD853F;
  --text: #eee;
  --bg: #1a1a1a;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: all 0.4s ease;
  line-height: 1.7;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--primary);
  padding: 1rem 0;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--light);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--light);
  text-decoration: none;
  font-size: 1.1rem;
  transition: 0.3s;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* 主题切换按钮 */
.theme-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--light);
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
}

.slider {
  position: absolute;
  top: 0; left:0; right:0; bottom:0;
  background: var(--secondary);
  border-radius: 24px;
  cursor: pointer;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width:18px;
  left:3px; bottom:3px;
  background: white;
  border-radius:50%;
  transition:0.4s;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* 页面主体 */
.container {
  max-width: 1200px;
  margin: 120px auto 60px;
  padding: 0 2rem;
}

/* 卡片样式 无图片版 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--light);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: 0.3s;
  border-left: 5px solid var(--accent);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.card-content {
  padding: 0;
}

.card h3 {
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

/* 动画 */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  from { opacity:0; transform: translateY(20px); }
  to { opacity:1; transform: translateY(0); }
}

/* 横幅 渐变纯色无图 */
.banner {
  height: 400px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.banner h1 {
  font-size: 3rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 响应式适配（手机端） */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
  }
  .nav-menu {
    gap: 1rem;
  }
  .nav-link {
    font-size: 1rem;
  }
  .banner h1 {
    font-size: 2rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}