/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: #d32f2f;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #b71c1c;
  text-decoration: underline;
}

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

/* 头部导航 */
header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo a {
  font-size: 24px;
  font-weight: bold;
  color: #d32f2f;
  text-decoration: none;
}

.logo a:hover {
  color: #b71c1c;
}

nav ul {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 0;
}

nav li {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

nav a {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  transition: color 0.3s ease, background 0.3s ease;
}

nav a:hover,
nav .active a {
  color: #d32f2f;
  background: #fff5f5;
}

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

footer p {
  font-size: 14px;
}

footer a {
  color: #fff;
  text-decoration: underline;
}

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

.hero h1 {
  font-size: 32px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.hero .lead {
  font-size: 18px;
  margin-bottom: 20px;
  line-height: 1.8;
  opacity: 0.95;
}

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

/* 首页板块 */
section {
  margin: 40px 0;
}

section h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #333;
  border-left: 4px solid #d32f2f;
  padding-left: 12px;
}

.section-desc {
  margin-bottom: 20px;
  color: #666;
  font-size: 14px;
}

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

.video-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 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: #333;
}

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

.video-card .oneline,
.video-card .desc,
.video-card .summary {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* 视频列表（榜单样式） */
.video-list {
  margin-top: 20px;
}

.video-item {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.video-item:hover {
  transform: translateX(4px);
}

.video-item .rank {
  font-size: 24px;
  font-weight: bold;
  color: #d32f2f;
  margin-right: 15px;
  min-width: 40px;
  text-align: center;
}

.video-item .info h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.video-item .tags {
  font-size: 13px;
  color: #999;
}

/* 列表页 */
.page-header {
  background: #fff;
  padding: 40px 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.page-header h1 {
  font-size: 30px;
  margin-bottom: 15px;
  color: #333;
}

.page-header .page-desc {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
}

/* 分组样式 */
.list-group,
.topic-group {
  margin-bottom: 40px;
}

.group-title,
.topic-title {
  font-size: 22px;
  margin-bottom: 15px;
  color: #d32f2f;
  border-bottom: 2px solid #d32f2f;
  padding-bottom: 8px;
}

.video-cards,
.topic-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 15px;
}

/* 排行榜样式 */
.rank-item {
  display: flex;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(6px);
}

.rank-num {
  font-size: 36px;
  font-weight: bold;
  color: #d32f2f;
  margin-right: 20px;
  min-width: 60px;
  text-align: center;
  line-height: 1;
}

.rank-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.rank-content .meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
}

.rank-content .review {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}

/* 最新整理卡片 */
.latest-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: transform 0.3s ease;
}

.latest-card:hover {
  transform: translateY(-4px);
}

.update-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #ff5722;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
}

.latest-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.latest-card .meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}

.latest-card .oneline {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.6;
}

.latest-card .tags-line {
  font-size: 12px;
  color: #999;
}

/* 详情页 */
.detail .container {
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  margin-top: 30px;
  margin-bottom: 30px;
}

.detail h1 {
  font-size: 32px;
  margin-bottom: 30px;
  color: #333;
  border-bottom: 3px solid #d32f2f;
  padding-bottom: 15px;
}

.detail section {
  margin-bottom: 35px;
}

.detail h2 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #d32f2f;
}

.basic-info .info-list {
  list-style: none;
  padding: 0;
}

.basic-info .info-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 15px;
  line-height: 1.8;
}

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

.basic-info .info-list strong {
  color: #333;
  margin-right: 8px;
}

.highlight .oneline {
  font-size: 18px;
  color: #d32f2f;
  font-weight: 500;
  line-height: 1.8;
  padding: 15px;
  background: #fff5f5;
  border-left: 4px solid #d32f2f;
  border-radius: 4px;
}

.summary p,
.review p {
  font-size: 16px;
  line-height: 2;
  color: #555;
  text-align: justify;
}

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

.related-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.related-card:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.related-card .meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
}

.related-card .desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: nowrap;
    height: auto;
    padding: 10px 15px;
  }

  .logo a {
    font-size: 18px;
  }

  nav ul {
    flex-wrap: nowrap;
    gap: 0;
  }

  nav a {
    font-size: 12px;
    padding: 6px 4px;
  }

  .hero {
    padding: 40px 15px;
  }

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

  .hero .lead {
    font-size: 16px;
  }

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

  section h2 {
    font-size: 22px;
  }

  .video-grid,
  .video-cards,
  .topic-cards,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .detail .container {
    padding: 20px 15px;
  }

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

  .rank-item {
    flex-direction: row;
    align-items: flex-start;
  }

  .rank-num {
    font-size: 28px;
    min-width: 50px;
  }
}

@media (max-width: 480px) {
  .logo a {
    font-size: 16px;
  }

  nav a {
    font-size: 11px;
    padding: 6px 2px;
  }

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

  .container {
    padding: 15px;
  }
}

/* UI变体样式（基于UI_INDEX） */
.ui-style-0, .ui-style-1, .ui-style-2, .ui-style-3 {
  /* 默认样式 */
}

.ui-style-4, .ui-style-5 {
  --primary-color: #1976d2;
}

.ui-style-4 .hero, .ui-style-5 .hero {
  background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
}

.ui-style-6, .ui-style-7 {
  --primary-color: #388e3c;
}

.ui-style-6 .hero, .ui-style-7 .hero {
  background: linear-gradient(135deg, #66bb6a 0%, #2e7d32 100%);
}

.ui-style-8, .ui-style-9 {
  --primary-color: #f57c00;
}

.ui-style-8 .hero, .ui-style-9 .hero {
  background: linear-gradient(135deg, #ff9800 0%, #e65100 100%);
}

.ui-style-10, .ui-style-11 {
  --primary-color: #512da8;
}

.ui-style-10 .hero, .ui-style-11 .hero {
  background: linear-gradient(135deg, #7e57c2 0%, #4527a0 100%);
}

.ui-style-12, .ui-style-13 {
  --primary-color: #c2185b;
}

.ui-style-12 .hero, .ui-style-13 .hero {
  background: linear-gradient(135deg, #ec407a 0%, #ad1457 100%);
}

.ui-style-14, .ui-style-15 {
  --primary-color: #00796b;
}

.ui-style-14 .hero, .ui-style-15 .hero {
  background: linear-gradient(135deg, #26a69a 0%, #004d40 100%);
}
