/* 全局样式 */
* {
  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;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

/* 头部样式 */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.logo a {
  color: inherit;
  text-decoration: none;
}

.logo a:hover {
  color: #0066cc;
  text-decoration: none;
}

/* 导航样式 - 移动端单行不换行 */
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

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

.site-nav a {
  display: block;
  padding: 0.6rem 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  font-weight: 500;
}

.site-nav a:hover {
  background: #f0f0f0;
  text-decoration: none;
}

.site-nav a.active {
  background: #0066cc;
  color: #fff;
}

/* 主内容区 */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* 首页样式 */
.hero-section {
  background: #fff;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero-section h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #222;
  line-height: 1.3;
}

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

/* 页面区块 */
section {
  background: #fff;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #222;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0066cc;
}

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

.video-card {
  padding: 1.5rem;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #0066cc;
}

.video-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.video-card h3 a {
  color: #333;
}

.video-card h3 a:hover {
  color: #0066cc;
  text-decoration: none;
}

.video-card .meta {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 0.5rem;
}

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

/* 卡片头部标签 */
.card-header,
.topic-tag,
.date-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #0066cc;
  color: #fff;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

/* 排行卡片 */
.rank-card {
  position: relative;
  padding-left: 4rem;
}

.rank-num {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  font-weight: bold;
  color: #ddd;
}

.rank-card:nth-child(1) .rank-num {
  color: #ffd700;
}

.rank-card:nth-child(2) .rank-num {
  color: #c0c0c0;
}

.rank-card:nth-child(3) .rank-num {
  color: #cd7f32;
}

/* 列表样式 */
.video-list {
  list-style: none;
}

.video-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.video-list .year {
  color: #999;
  font-size: 0.9rem;
}

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

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

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: #fff;
}

.link-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.link-card p {
  font-size: 0.95rem;
  opacity: 0.9;
}

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

.detail-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.detail-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: #222;
  line-height: 1.3;
}

.subtitle {
  font-size: 1.05rem;
  color: #777;
}

.detail-info h2,
.detail-oneline h2,
.detail-summary h2,
.detail-review h2,
.detail-related h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #333;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0066cc;
}

.detail-info,
.detail-oneline,
.detail-summary,
.detail-review,
.detail-related {
  margin-bottom: 2.5rem;
}

.info-list {
  list-style: none;
}

.info-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.6;
}

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

.highlight {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #0066cc;
  font-weight: 500;
  padding: 1rem;
  background: #f0f7ff;
  border-left: 4px solid #0066cc;
  border-radius: 4px;
}

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

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

.related-card {
  padding: 1.2rem;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #0066cc;
}

.related-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* 页面头部 */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  color: #222;
}

.page-desc {
  font-size: 1.05rem;
  color: #666;
  line-height: 1.7;
}

/* 页脚 */
.site-footer {
  background: #333;
  color: #fff;
  padding: 2rem 0;
  text-align: center;
  margin-top: auto;
}

.site-footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .site-nav a {
    font-size: 0.85rem;
    padding: 0.5rem 0.3rem;
  }

  .logo {
    font-size: 1.2rem;
  }

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

  .site-intro {
    font-size: 0.95rem;
  }

  section {
    padding: 1.5rem;
  }

  section h2 {
    font-size: 1.3rem;
  }

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

  .video-card {
    padding: 1.2rem;
  }

  .detail-page {
    padding: 1.5rem;
  }

  .detail-header h1 {
    font-size: 1.6rem;
  }

  .rank-card {
    padding-left: 3.5rem;
  }

  .rank-num {
    font-size: 1.5rem;
    left: 0.8rem;
  }
}

/* UI风格变体（16种） */
body.ui-style-0 { --primary: #0066cc; --bg: #f5f5f5; }
body.ui-style-1 { --primary: #00bcd4; --bg: #f0f4f8; }
body.ui-style-2 { --primary: #ff6b6b; --bg: #fff5f5; }
body.ui-style-3 { --primary: #1a1a1a; --bg: #2a2a2a; color: #e0e0e0; }
body.ui-style-4 { --primary: #6a4c93; --bg: #f9f7fb; }
body.ui-style-5 { --primary: #f39c12; --bg: #fffaf0; }
body.ui-style-6 { --primary: #3498db; --bg: #ffffff; }
body.ui-style-7 { --primary: #ff6347; --bg: #fff8f5; }
body.ui-style-8 { --primary: #27ae60; --bg: #f0fff4; }
body.ui-style-9 { --primary: #2c3e50; --bg: #ecf0f1; }
body.ui-style-10 { --primary: #f1c40f; --bg: #fffef0; }
body.ui-style-11 { --primary: #9b59b6; --bg: #f8f4fb; }
body.ui-style-12 { --primary: #34495e; --bg: #f5f5f5; }
body.ui-style-13 { --primary: #e74c3c; --bg: #fff; }
body.ui-style-14 { --primary: #1abc9c; --bg: #f0fffc; }
body.ui-style-15 { --primary: #ff00ff; --bg: #0a0a0a; color: #0ff; }

body.ui-style-3 .site-header,
body.ui-style-3 section,
body.ui-style-3 .video-card,
body.ui-style-3 .detail-page {
  background: #333;
  color: #e0e0e0;
}

body.ui-style-3 a {
  color: #4db8ff;
}

body.ui-style-15 .site-header,
body.ui-style-15 section,
body.ui-style-15 .video-card,
body.ui-style-15 .detail-page {
  background: #1a1a1a;
  color: #0ff;
  border-color: #ff00ff;
}

body.ui-style-15 a {
  color: #ff00ff;
}
