/* 全局样式 - UI风格 6 - 布局变体 G */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --spacing: 1rem;
}

body {
  font-size: 16px;
  font-weight: 400;
  background: var(--bg-color);
  color: var(--text-color);
}

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

/* 导航样式 */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

nav a.active {
  background: #1a252f;
  font-weight: 600;
}

/* 页面头部 */
.site-header h1,
.page-header h1,
.detail-header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  line-height: 1.3;
}

.page-desc {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
}

/* 站点介绍 */
.site-intro {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 视频网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.video-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.video-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.video-card h3 a {
  color: var(--secondary-color);
  text-decoration: none;
}

.video-card h3 a:hover {
  color: var(--primary-color);
}

.video-card .meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.75rem;
}

.video-card .one-line {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

/* 列表样式 */
.video-list {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.list-item {
  display: flex;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}

.list-item:hover {
  background: #f9f9f9;
}

.list-item:last-child {
  border-bottom: none;
}

.item-index {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  width: 60px;
  flex-shrink: 0;
}

.item-content {
  flex: 1;
}

.item-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.item-content h3 a {
  color: var(--secondary-color);
  text-decoration: none;
}

.item-content h3 a:hover {
  color: var(--primary-color);
}

/* 详情页 */
.detail-page section {
  background: var(--card-bg);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-page h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.basic-info dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.75rem;
  line-height: 1.8;
}

.basic-info dt {
  font-weight: 600;
  color: #666;
}

.basic-info dd {
  color: #333;
}

/* 简单列表 */
.simple-list {
  list-style: none;
  padding: 0;
}

.simple-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.simple-list li:last-child {
  border-bottom: none;
}

.simple-list a {
  color: var(--secondary-color);
  text-decoration: none;
}

.simple-list a:hover {
  color: var(--primary-color);
}

/* 更多链接 */
.more-link {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.1rem;
}

.more-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.more-link a:hover {
  text-decoration: underline;
}

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 1rem 0.5rem;
  }

  .site-header h1,
  .page-header h1,
  .detail-header h1 {
    font-size: 1.5rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .list-item {
    flex-direction: column;
  }

  .item-index {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .detail-page section {
    padding: 1rem;
  }
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-4px);
}