:root {
  --page-bg: #f6f8fb;
  --card-bg: #ffffff;
  --accent: #0b6ef6;
  --text: #203040;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: "Noto Sans", "Microsoft Yahei", Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
}
.language-selector {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 14px;
}

.language-selector a {
  color: #007bff;
  text-decoration: none;
  margin-left: 8px;
}

.language-selector a:hover {
  text-decoration: underline;
}


/* 顶部横幅 */
.site-hero {
  height: 260px;           /* 高度可调整 */
  position: relative;
  overflow: hidden;        /* 防止图片溢出 */
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* 保持图片比例，同时铺满整个容器 */
  display: block;
}

/* 卡片通用 */
.site-toc-card, .site-content-card {
  max-width: 960px;
  margin: 20px auto;
  background: var(--card-bg);
  padding: 20px 26px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(20,30,50,0.05);
  line-height: 1.75;
}

/* 目录列表 */
.site-toc {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-toc li {
  margin: 10px 0;
  font-size: 16px;
}
.site-toc a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.12s, transform 0.12s;
}
.site-toc a:hover {
  color: #074bb8;
  transform: translateX(6px);
}

/* 图片跳转区 */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.gallery a img {
  width: 100%;
  height: 180px;            /* ✅ 固定高度 */
  object-fit: cover; 
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.25s, box-shadow 0.25s;
}
.gallery a:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* 响应式 */
@media (max-width: 720px) {
  .site-hero { height: 180px; }
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}
