/* 全局样式 */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 导航栏 - 移动端单行强制约束 */
nav {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 18px 12px;
  color: #34495e;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
  background: #ecf0f1;
  color: #e74c3c;
  border-bottom-color: #e74c3c;
}

/* 移动端导航单行约束 */
@media (max-width: 768px) {
  nav a {
    padding: 14px 6px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  nav a {
    padding: 12px 4px;
    font-size: 12px;
  }
}

/* 首页 Hero 区域 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 40px;
  border-radius: 12px;
  margin-bottom: 40px;
  text-align: center;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0.95;
}

/* 区块标题 */
section h2 {
  font-size: 26px;
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #3498db;
  color: #2c3e50;
}

/* 视频卡片网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.video-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

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

.video-card h3,
.video-card h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #2c3e50;
}

.video-card h3 a,
.video-card h4 a {
  color: #2c3e50;
  transition: color 0.3s;
}

.video-card h3 a:hover,
.video-card h4 a:hover {
  color: #3498db;
}

.video-meta {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.video-desc {
  font-size: 14px;
  color: #5a6c7d;
  line-height: 1.6;
  margin-bottom: 10px;
}

.video-tags {
  font-size: 12px;
  color: #95a5a6;
}

/* 排行榜卡片样式 */
.ranking-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.rank-num {
  font-size: 32px;
  font-weight: bold;
  color: #e74c3c;
  min-width: 50px;
  text-align: center;
}

.ranking-card:nth-child(1) .rank-num { color: #f39c12; }
.ranking-card:nth-child(2) .rank-num { color: #95a5a6; }
.ranking-card:nth-child(3) .rank-num { color: #cd7f32; }

.card-content {
  flex: 1;
}

/* 最新整理卡片 */
.latest-card {
  position: relative;
  padding-left: 100px;
}

.update-date {
  position: absolute;
  left: 20px;
  top: 20px;
  font-size: 12px;
  color: #fff;
  background: #3498db;
  padding: 4px 8px;
  border-radius: 4px;
}

/* 专题分组 */
.topic-group {
  margin-bottom: 40px;
}

.group-title {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid #9b59b6;
}

/* 更多链接 */
.more-link {
  text-align: center;
  margin: 30px 0;
}

.more-link a {
  color: #3498db;
  font-size: 16px;
  transition: color 0.3s;
}

.more-link a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* 列表页 */
.list-page h1 {
  font-size: 32px;
  margin-bottom: 16px;
  color: #2c3e50;
}

.page-intro {
  font-size: 15px;
  color: #7f8c8d;
  line-height: 1.8;
  margin-bottom: 30px;
  padding: 16px;
  background: #ecf0f1;
  border-radius: 6px;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-list .video-card {
  width: 100%;
}

/* 详情页 */
.detail-page article {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
}

.detail-page h1 {
  font-size: 36px;
  margin-bottom: 24px;
  color: #2c3e50;
}

.basic-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.basic-info p {
  margin: 8px 0;
  font-size: 15px;
}

.basic-info strong {
  color: #2c3e50;
  margin-right: 8px;
}

.one-line,
.summary,
.review {
  margin-bottom: 30px;
}

.one-line h2,
.summary h2,
.review h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: #34495e;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 8px;
}

.one-line p,
.summary p,
.review p {
  font-size: 16px;
  line-height: 1.8;
  color: #5a6c7d;
}

/* 相关推荐 */
.related {
  margin-top: 40px;
}

.related h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.related-card {
  background: white;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}

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

.related-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.related-card h4 a {
  color: #2c3e50;
}

.related-card h4 a:hover {
  color: #3498db;
}

.related-card p {
  font-size: 13px;
  color: #7f8c8d;
  line-height: 1.5;
}

/* 页脚 */
footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
}

footer p {
  margin: 0;
  font-size: 14px;
}

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

  .hero {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero-desc {
    font-size: 14px;
  }

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

  .detail-page article {
    padding: 24px;
  }

  .detail-page h1 {
    font-size: 28px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    flex-direction: column;
  }

  .latest-card {
    padding-left: 20px;
    padding-top: 50px;
  }

  .update-date {
    left: 20px;
    top: 10px;
  }
}

/* UI风格变体 (16种) */
.ui-style-0 { --primary-color: #3498db; --accent-color: #e74c3c; }
.ui-style-1 { --primary-color: #2ecc71; --accent-color: #f39c12; }
.ui-style-2 { --primary-color: #9b59b6; --accent-color: #1abc9c; }
.ui-style-3 { --primary-color: #e67e22; --accent-color: #2980b9; }
.ui-style-4 { --primary-color: #16a085; --accent-color: #c0392b; }
.ui-style-5 { --primary-color: #27ae60; --accent-color: #8e44ad; }
.ui-style-6 { --primary-color: #2c3e50; --accent-color: #e74c3c; }
.ui-style-7 { --primary-color: #f39c12; --accent-color: #2980b9; }
.ui-style-8 { --primary-color: #d35400; --accent-color: #16a085; }
.ui-style-9 { --primary-color: #c0392b; --accent-color: #27ae60; }
.ui-style-10 { --primary-color: #8e44ad; --accent-color: #f39c12; }
.ui-style-11 { --primary-color: #2980b9; --accent-color: #e67e22; }
.ui-style-12 { --primary-color: #1abc9c; --accent-color: #c0392b; }
.ui-style-13 { --primary-color: #34495e; --accent-color: #2ecc71; }
.ui-style-14 { --primary-color: #7f8c8d; --accent-color: #9b59b6; }
.ui-style-15 { --primary-color: #95a5a6; --accent-color: #d35400; }
