/* 全局样式 */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--secondary-color);
}

/* 导航栏 */
nav {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

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

nav a {
  display: block;
  padding: 15px 10px;
  text-align: center;
  color: white;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.3s;
}

nav a:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

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

/* 首页英雄区 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 40px;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero .intro {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.95;
}

/* 区块标题 */
section h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 15px;
}

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

.video-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.video-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.video-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

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

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

.video-card .meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.video-card .summary {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

.video-card .review {
  font-size: 0.9rem;
  color: #777;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-style: italic;
}

/* 排行榜卡片 */
.video-card.ranked {
  position: relative;
  padding-left: 70px;
}

.video-card.ranked .rank {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

/* 分组卡片 */
.video-card.grouped .tag {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* 日期卡片 */
.video-card.dated .date {
  display: inline-block;
  background: #f0f0f0;
  color: #666;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 10px;
  font-weight: 500;
}

/* 链接区 */
.links-section {
  margin: 40px 0;
}

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

.link-card {
  display: block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.link-card:hover {
  color: white;
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* 列表页 */
.list-page {
  margin-top: 20px;
}

.list-page h1 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.list-page .intro {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

/* 详情页 */
.detail-page {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-top: 20px;
}

.detail-page h1 {
  font-size: 2.2rem;
  margin-bottom: 30px;
  color: var(--text-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 15px;
}

.detail-page section {
  margin-bottom: 30px;
}

.detail-page section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.detail-page .info p {
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.8;
}

.detail-page .info strong {
  color: var(--text-color);
  min-width: 80px;
  display: inline-block;
}

.detail-page .highlight {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.detail-page .highlight p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-color);
  font-weight: 500;
}

.detail-page .summary p,
.detail-page .review p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #444;
  text-align: justify;
}

/* 相关推荐 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.related-item {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
  transition: all 0.3s;
}

.related-item:hover {
  background: #f0f0f0;
  transform: translateX(5px);
}

.related-item h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.related-item h4 a {
  color: var(--text-color);
}

.related-item h4 a:hover {
  color: var(--primary-color);
}

.related-item p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
}

/* 响应式 */
@media (max-width: 768px) {
  nav a {
    padding: 12px 5px;
    font-size: 14px;
  }

  main {
    padding: 15px;
  }

  .hero {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .intro {
    font-size: 1rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

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

  .detail-page {
    padding: 20px;
  }

  .detail-page h1 {
    font-size: 1.8rem;
  }

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

/* UI风格变体 */
.ui-style-0 { --primary-color: #667eea; --secondary-color: #764ba2; }
.ui-style-1 { --primary-color: #f093fb; --secondary-color: #f5576c; }
.ui-style-2 { --primary-color: #4facfe; --secondary-color: #00f2fe; }
.ui-style-3 { --primary-color: #43e97b; --secondary-color: #38f9d7; }
.ui-style-4 { --primary-color: #fa709a; --secondary-color: #fee140; }
.ui-style-5 { --primary-color: #30cfd0; --secondary-color: #330867; }
.ui-style-6 { --primary-color: #a8edea; --secondary-color: #fed6e3; }
.ui-style-7 { --primary-color: #ff9a9e; --secondary-color: #fecfef; }
.ui-style-8 { --primary-color: #ffecd2; --secondary-color: #fcb69f; }
.ui-style-9 { --primary-color: #ff6e7f; --secondary-color: #bfe9ff; }
.ui-style-10 { --primary-color: #e0c3fc; --secondary-color: #8ec5fc; }
.ui-style-11 { --primary-color: #f9d423; --secondary-color: #ff4e50; }
.ui-style-12 { --primary-color: #0ba360; --secondary-color: #3cba92; }
.ui-style-13 { --primary-color: #667eea; --secondary-color: #f857a6; }
.ui-style-14 { --primary-color: #5f72bd; --secondary-color: #9921e8; }
.ui-style-15 { --primary-color: #ffafbd; --secondary-color: #ffc3a0; }
