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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

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

a:hover {
  color: #9a0007;
}

/* 导航栏 */
.site-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: bold;
  color: #d32f2f;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
  background: #f0f0f0;
  color: #d32f2f;
}

/* 移动端导航 */
@media (max-width: 768px) {
  .site-nav {
    padding: 0.5rem 1rem;
  }

  .nav-brand a {
    font-size: 1.2rem;
  }

  .nav-links {
    gap: 0.5rem;
    font-size: 0.85rem;
    flex: 1 1 0;
    min-width: 0;
    justify-content: space-between;
  }

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

  .nav-links a {
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    padding: 0.3rem 0;
  }
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

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

/* 首页样式 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 3rem 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
}

.hero-title {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }
}

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

.site-intro h2 {
  color: #d32f2f;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.site-intro p {
  color: #555;
  line-height: 1.8;
}

.hot-section,
.topic-section,
.latest-section,
.all-link {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hot-section h2,
.topic-section h2,
.latest-section h2 {
  color: #333;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  border-left: 4px solid #d32f2f;
  padding-left: 1rem;
}

.section-link {
  margin-top: 1.5rem;
  text-align: right;
}

.section-link a {
  font-weight: 500;
}

.btn-primary {
  display: inline-block;
  background: #d32f2f;
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #9a0007;
  color: #fff;
}

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

.video-card {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.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: #d32f2f;
}

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

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

/* 视频列表 */
.video-list {
  list-style: none;
}

.video-item {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: background 0.3s ease;
}

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

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

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

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

/* 列表页样式 */
.page-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
  border-bottom: 3px solid #d32f2f;
  padding-bottom: 0.5rem;
}

.page-intro {
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.list-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 资源大全网格 */
.video-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  list-style: none;
}

.video-card-compact {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

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

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

.video-card-compact h3 a:hover {
  color: #d32f2f;
}

.badge {
  display: inline-block;
  background: #d32f2f;
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

/* 排行榜样式 */
.video-ranking {
  list-style: none;
}

.ranking-item {
  display: flex;
  align-items: flex-start;
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: background 0.3s ease;
}

.ranking-item:hover {
  background: #f0f0f0;
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #d32f2f;
  color: #fff;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-right: 1.5rem;
}

.ranking-item:nth-child(1) .rank-number {
  background: #ffd700;
  color: #333;
}

.ranking-item:nth-child(2) .rank-number {
  background: #c0c0c0;
  color: #333;
}

.ranking-item:nth-child(3) .rank-number {
  background: #cd7f32;
  color: #fff;
}

.ranking-content {
  flex: 1;
}

.ranking-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.ranking-content h3 a {
  color: #333;
}

.ranking-content h3 a:hover {
  color: #d32f2f;
}

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

.topic-title {
  font-size: 1.3rem;
  color: #d32f2f;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.video-list-topic {
  list-style: none;
}

.video-item-topic {
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.video-item-topic h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.video-item-topic h4 a {
  color: #333;
}

.video-item-topic h4 a:hover {
  color: #d32f2f;
}

/* 时间轴样式 */
.video-timeline {
  list-style: none;
  position: relative;
  padding-left: 100px;
}

.video-timeline::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-date {
  position: absolute;
  left: -100px;
  width: 80px;
  text-align: right;
  font-weight: bold;
  color: #d32f2f;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -46px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: #d32f2f;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #d32f2f;
}

.timeline-content {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.timeline-content h3 a {
  color: #333;
}

.timeline-content h3 a:hover {
  color: #d32f2f;
}

@media (max-width: 768px) {
  .video-timeline {
    padding-left: 50px;
  }

  .video-timeline::before {
    left: 20px;
  }

  .timeline-date {
    left: -50px;
    width: 40px;
    font-size: 0.85rem;
  }

  .timeline-item::before {
    left: 14px;
  }
}

/* 详情页样式 */
.detail-page {
  min-height: 60vh;
}

.video-detail {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.detail-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 2rem;
  border-bottom: 3px solid #d32f2f;
  padding-bottom: 0.5rem;
}

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

.video-detail section h2 {
  font-size: 1.3rem;
  color: #d32f2f;
  margin-bottom: 1rem;
}

.info-list {
  list-style: none;
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 6px;
}

.info-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.info-list strong {
  color: #333;
  margin-right: 0.5rem;
}

.one-line p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.8;
  background: #f0f8ff;
  padding: 1rem;
  border-left: 4px solid #4a90e2;
  border-radius: 4px;
}

.summary p {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  text-align: justify;
}

.review p {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  background: #fff8e1;
  padding: 1rem;
  border-left: 4px solid #ffa726;
  border-radius: 4px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  list-style: none;
}

.related-item {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

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

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

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

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

/* 响应式优化 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

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

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

  .detail-title {
    font-size: 1.5rem;
  }

  .video-detail {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .list-content {
    padding: 1rem;
  }
}
