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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  color: #2c3e50;
  line-height: 1.6;
  min-height: 100vh;
}

/* 头部导航 */
header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

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

header nav ul li a {
  display: block;
  padding: 1.2rem 1rem;
  color: #ecf0f1;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

header nav ul li a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Logo 区域 */
.logo-section {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.logo-section h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo-section .tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0;
}

/* 主内容区 */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* 区块样式 */
section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

section h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid #667eea;
}

.site-intro p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: #555;
}

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

.video-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.video-card:hover {
  border-color: #667eea;
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.video-card h3 {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
}

.video-card h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.video-card h3 a:hover {
  color: #667eea;
}

.video-card .meta {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin: 0.5rem 0;
}

.video-card .oneline,
.video-card .desc,
.video-card .genre {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

/* 入口卡片 */
.entrance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.entrance-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.entrance-card:hover {
  transform: scale(1.05);
}

.entrance-card h3 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.entrance-card h3 a {
  color: white;
  text-decoration: none;
}

.entrance-card p {
  margin: 0;
  opacity: 0.95;
  font-size: 0.95rem;
}

/* 视频列表 */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.video-item {
  padding: 1.2rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.video-item:hover {
  background: #e9ecef;
  border-left-width: 6px;
}

.video-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.video-item h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.video-item h3 a:hover {
  color: #667eea;
}

.more-link {
  text-align: center;
  margin-top: 1.5rem;
}

.more-link a {
  color: #667eea;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
}

/* 列表页样式 */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.page-header .intro,
.topic-intro p {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto 1rem;
}

.topic-intro {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* 年份分组 */
.year-group {
  margin-bottom: 2.5rem;
}

.year-title {
  font-size: 1.6rem;
  color: #667eea;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

/* 排行榜样式 */
.top-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.top-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.top-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateX(5px);
}

.rank-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.top-content {
  flex: 1;
}

.top-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.top-content h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.top-content h3 a:hover {
  color: #667eea;
}

.top-content .tags {
  color: #667eea;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.top-content .recommend {
  color: #555;
  line-height: 1.7;
  margin: 0.8rem 0 0;
}

/* 专题列表 */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.topic-item {
  padding: 1.8rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.topic-item h3 {
  margin: 0 0 0.8rem;
  font-size: 1.4rem;
}

.topic-item h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.topic-item h3 a:hover {
  color: #667eea;
}

.topic-desc {
  color: #555;
  line-height: 1.8;
}

.topic-desc .why-selected {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-left: 4px solid #667eea;
  font-style: italic;
}

/* 最新列表 */
.latest-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.latest-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.latest-item:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.latest-date {
  flex-shrink: 0;
  width: 100px;
  padding: 0.5rem;
  background: #667eea;
  color: white;
  text-align: center;
  border-radius: 6px;
  font-weight: 500;
}

.latest-content {
  flex: 1;
}

.latest-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.latest-content h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.latest-content h3 a:hover {
  color: #667eea;
}

.latest-content .brief {
  color: #555;
  line-height: 1.6;
  margin: 0.5rem 0 0;
}

/* 详情页样式 */
.detail-page {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.video-detail header h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin: 0 0 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #667eea;
}

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

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

.basic-info dd {
  margin: 0;
  color: #555;
}

.one-line p {
  font-size: 1.15rem;
  color: #667eea;
  font-weight: 500;
  line-height: 1.8;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #667eea;
}

.summary p,
.review p {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.9;
  margin-bottom: 1rem;
}

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

.related-card {
  padding: 1.2rem;
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.related-card:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.related-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.related-card h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.related-card h3 a:hover {
  color: #667eea;
}

/* 底部 */
footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer nav {
  max-width: 1200px;
  margin: 0 auto 1rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

footer nav a {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer nav a:hover {
  color: #667eea;
}

footer p {
  text-align: center;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header nav ul li a {
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
  }

  .logo-section h1 {
    font-size: 1.8rem;
  }

  .logo-section .tagline {
    font-size: 1rem;
  }

  main {
    padding: 1rem;
  }

  section {
    padding: 1.5rem;
  }

  section h2 {
    font-size: 1.4rem;
  }

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

  .top-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

  .latest-date {
    width: 100%;
  }

  .detail-page {
    padding: 1.5rem;
  }

  .basic-info dl {
    grid-template-columns: 80px 1fr;
    gap: 0.6rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  header nav ul li a {
    padding: 0.8rem 0.3rem;
    font-size: 0.8rem;
  }

  .logo-section {
    padding: 2rem 1rem 1.5rem;
  }

  .logo-section h1 {
    font-size: 1.5rem;
  }

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

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

/* UI 风格变体（基于 UI_INDEX） */
.ui-style-0 { --accent: #667eea; }
.ui-style-1 { --accent: #f093fb; }
.ui-style-2 { --accent: #4facfe; }
.ui-style-3 { --accent: #43e97b; }
.ui-style-4 { --accent: #fa709a; }
.ui-style-5 { --accent: #30cfd0; }
.ui-style-6 { --accent: #a8edea; }
.ui-style-7 { --accent: #ff9a9e; }
.ui-style-8 { --accent: #fbc2eb; }
.ui-style-9 { --accent: #fdcbf1; }
.ui-style-10 { --accent: #e0c3fc; }
.ui-style-11 { --accent: #8ec5fc; }
.ui-style-12 { --accent: #ffecd2; }
.ui-style-13 { --accent: #d299c2; }
.ui-style-14 { --accent: #feada6; }
.ui-style-15 { --accent: #a1c4fd; }
