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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  color: #333;
  line-height: 1.8;
}

/* 导航栏 */
nav {
  background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 2rem;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
  padding: 1rem 0;
}

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

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

nav a {
  display: block;
  padding: 1rem 0.8rem;
  text-decoration: none;
  color: #34495e;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav a:hover {
  color: #3498db;
  background: rgba(52, 152, 219, 0.1);
  transform: translateY(-2px);
}

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

/* 首页头部 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.4;
}

/* 区块标题 */
h2 {
  color: #2c3e50;
  font-size: 1.6rem;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #3498db;
}

/* 介绍文字 */
.site-intro,
header .intro {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  line-height: 1.8;
}

.site-intro p,
header .intro {
  margin: 0;
  color: #555;
}

/* 视频列表 */
.video-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

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

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

.video-card h3 a:hover {
  color: #3498db;
}

.video-card .one-line {
  color: #666;
  font-size: 0.95rem;
  margin: 0.5rem 0;
  line-height: 1.6;
}

.video-card .meta {
  color: #999;
  font-size: 0.85rem;
  margin: 0.5rem 0 0 0;
}

/* 特殊标记 */
.index-num,
.rank-badge,
.update-date {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.index-num {
  background: #ecf0f1;
  color: #7f8c8d;
}

.rank-badge {
  background: #e74c3c;
  color: white;
}

.rank-badge.rank-1 {
  background: #f39c12;
}

.rank-badge.rank-2 {
  background: #95a5a6;
}

.rank-badge.rank-3 {
  background: #e67e22;
}

.rank-badge.rank-other {
  background: #bdc3c7;
}

.update-date {
  background: #3498db;
  color: white;
}

.review-snippet {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* 专题分组 */
.topic-group {
  margin-bottom: 3rem;
}

.topic-title {
  color: #3498db;
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid #3498db;
}

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

.entry-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.entry-card h3 {
  margin: 0 0 0.8rem 0;
  font-size: 1.3rem;
}

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

.entry-card h3 a:hover {
  color: #3498db;
}

.entry-card p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

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

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

.video-detail section {
  margin: 2rem 0;
}

.video-detail .basic-info ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.video-detail .basic-info li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #ecf0f1;
}

.video-detail .basic-info strong {
  color: #34495e;
  min-width: 80px;
  display: inline-block;
}

.video-detail .summary p,
.video-detail .review p {
  line-height: 1.8;
  color: #555;
  margin: 1rem 0;
}

/* 页脚 */
footer {
  background: #2c3e50;
  color: #ecf0f1;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* 更多链接 */
.more-link {
  text-align: center;
  margin-top: 2rem;
}

.more-link a {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.more-link a:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

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

  nav .logo {
    font-size: 1.2rem;
    padding: 0.8rem 0;
  }

  nav a {
    padding: 0.8rem 0.3rem;
    font-size: 0.85rem;
  }

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

  .hero {
    padding: 2rem 1.5rem;
  }

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

  h2 {
    font-size: 1.3rem;
  }

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

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

  .video-detail {
    padding: 1.5rem;
  }

  .video-detail h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  nav a {
    padding: 0.6rem 0.2rem;
    font-size: 0.75rem;
  }

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

  h2 {
    font-size: 1.2rem;
  }
}
