/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans CJK SC", sans-serif;
  background: #f8f9fa;
  color: #2c3e50;
  line-height: 1.8;
  font-size: 16px;
}

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

a:hover {
  color: #2980b9;
}

/* 头部导航 */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

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

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

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

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: block;
  padding: 0.5rem;
  transition: background 0.3s ease;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* 主内容区 */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  min-height: calc(100vh - 300px);
}

/* 首页样式 */
.hero {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.4;
}

.site-intro {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.site-intro h2 {
  color: #667eea;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  border-bottom: 3px solid #667eea;
  padding-bottom: 0.5rem;
}

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

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

.video-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  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.12);
}

.video-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #2c3e50;
}

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

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

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

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

/* 分组样式 */
section {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

/* 入口卡片 */
.entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.entry-card {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

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

.entry-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #d35400;
}

.entry-card h3 a {
  color: #d35400;
}

.entry-card p {
  color: #555;
  line-height: 1.6;
}

/* 视频列表 */
.video-list {
  margin-top: 1.5rem;
}

.video-item {
  padding: 1.5rem;
  border-bottom: 1px solid #ecf0f1;
  transition: background 0.3s ease;
}

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

.video-item:hover {
  background: #f8f9fa;
}

.video-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #2c3e50;
}

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

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

.video-item .meta,
.video-item .year {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.video-item .intro,
.video-item .summary {
  color: #555;
  line-height: 1.6;
}

/* 详情页样式 */
.video-detail h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #667eea;
}

.basic-info dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.basic-info dt {
  font-weight: 600;
  color: #7f8c8d;
}

.basic-info dd {
  color: #2c3e50;
}

.one-line,
.summary,
.review {
  margin-top: 2rem;
}

.one-line h2,
.summary h2,
.review h2,
.related h2 {
  color: #667eea;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ecf0f1;
}

.one-line p,
.summary p,
.review p {
  color: #555;
  line-height: 1.8;
  font-size: 1.05rem;
}

.related {
  margin-top: 3rem;
}

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

.related-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #ecf0f1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.related-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: #2c3e50;
}

.related-item h3 a {
  color: #2c3e50;
}

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

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

/* 列表页样式 */
.list-page {
  padding: 2.5rem;
}

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

.list-page .intro {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid #667eea;
}

.list-page .intro p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 0.8rem;
}

.list-page .intro p:last-child {
  margin-bottom: 0;
}

/* 年份分组 */
.year-group {
  margin-bottom: 3rem;
  padding: 0;
  background: none;
  box-shadow: none;
}

.year-group h2 {
  font-size: 1.6rem;
  color: #667eea;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  border-bottom: none;
}

/* 排行榜样式 */
.ranking-list {
  margin-top: 1.5rem;
}

.ranking-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.rank-number {
  font-size: 2rem;
  font-weight: 700;
  color: #667eea;
  min-width: 50px;
  text-align: center;
}

.rank-content {
  flex: 1;
}

.rank-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: #2c3e50;
}

.rank-content h3 a {
  color: #2c3e50;
}

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

.rank-content .meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.rank-content .recommendation {
  color: #555;
  line-height: 1.7;
}

/* 专题页样式 */
.topic-intro {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: none;
}

.topic-intro p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.topic-list {
  margin-top: 1.5rem;
}

.topic-item {
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #667eea;
  transition: transform 0.3s ease;
}

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

.topic-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: #2c3e50;
}

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

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

.topic-item .meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.topic-item .topic-desc {
  color: #555;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* 最新整理页样式 */
.latest-list {
  margin-top: 1.5rem;
}

.latest-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

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

.date-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 110px;
  text-align: center;
  align-self: flex-start;
}

.latest-content {
  flex: 1;
}

.latest-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #2c3e50;
}

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

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

.latest-content .meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.latest-content .brief {
  color: #555;
  line-height: 1.6;
}

/* 底部 */
footer {
  background: #2c3e50;
  color: white;
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

footer nav {
  margin-bottom: 1.5rem;
}

footer nav a {
  color: white;
  margin: 0 1rem;
  font-size: 0.95rem;
}

footer nav a:hover {
  color: #3498db;
}

footer p {
  color: #95a5a6;
  font-size: 0.9rem;
}

/* 占位页面 */
.placeholder {
  text-align: center;
  padding: 4rem 2rem;
  color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  .logo {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
  }

  nav ul {
    flex-wrap: nowrap;
  }

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

  nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  main {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .hero {
    padding: 2rem 1rem;
  }

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

  .site-intro,
  section {
    padding: 1.5rem;
  }

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

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

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

  .ranking-item {
    flex-direction: column;
    gap: 1rem;
  }

  .rank-number {
    font-size: 1.5rem;
    text-align: left;
  }

  .latest-item {
    flex-direction: column;
    gap: 1rem;
  }

  .date-badge {
    align-self: flex-start;
  }

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

  footer nav a {
    display: block;
    margin: 0.5rem 0;
  }
}

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

  nav a {
    font-size: 0.75rem;
    padding: 0.3rem 0.1rem;
  }

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

  section h2,
  .site-intro h2 {
    font-size: 1.4rem;
  }

  .video-detail h1,
  .list-page h1 {
    font-size: 1.6rem;
  }
}

/* UI 风格变体 */
body.ui-style-0 { --primary-color: #667eea; }
body.ui-style-1 { --primary-color: #f093fb; }
body.ui-style-2 { --primary-color: #4facfe; }
body.ui-style-3 { --primary-color: #43e97b; }
body.ui-style-4 { --primary-color: #fa709a; }
body.ui-style-5 { --primary-color: #30cfd0; }
body.ui-style-6 { --primary-color: #a8edea; }
body.ui-style-7 { --primary-color: #ff9a9e; }
body.ui-style-8 { --primary-color: #fbc2eb; }
body.ui-style-9 { --primary-color: #fdcbf1; }
body.ui-style-10 { --primary-color: #e0c3fc; }
body.ui-style-11 { --primary-color: #8ec5fc; }
body.ui-style-12 { --primary-color: #ffecd2; }
body.ui-style-13 { --primary-color: #fcb69f; }
body.ui-style-14 { --primary-color: #ff6e7f; }
body.ui-style-15 { --primary-color: #bfe9ff; }
