:root {
  --primary-color: #d32f2f;
  --secondary-color: #1976d2;
  --bg-color: #0a0a0a;
  --card-bg: #1a1a1a;
  --text-color: #e0e0e0;
  --text-secondary: #b0b0b0;
  --border-color: #333;
  --hover-color: #b71c1c;
}

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

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

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

header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border-bottom: 2px solid var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s;
}

.logo:hover {
  color: var(--hover-color);
  text-shadow: 0 0 10px rgba(211, 47, 47, 0.5);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 5px;
  align-items: center;
  flex-wrap: nowrap;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  transition: all 0.3s;
  display: block;
  white-space: nowrap;
  font-size: 15px;
}

nav ul li a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

main {
  min-height: calc(100vh - 200px);
  padding: 30px 0;
}

.page-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-intro {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
  border-left: 4px solid var(--primary-color);
  line-height: 1.8;
}

.section {
  margin-bottom: 50px;
}

.section-title {
  font-size: 26px;
  margin-bottom: 20px;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

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

.video-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(211, 47, 47, 0.3);
  border-color: var(--primary-color);
}

.video-info {
  padding: 20px;
}

.video-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.meta-tag {
  background: rgba(211, 47, 47, 0.2);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
}

.video-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.video-link {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s;
  font-weight: 500;
}

.video-link:hover {
  background: var(--hover-color);
  box-shadow: 0 4px 10px rgba(211, 47, 47, 0.4);
}

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

.video-item {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.video-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.2);
}

.detail-container {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 40px;
  border: 1px solid var(--border-color);
}

.detail-title {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-meta-label {
  font-weight: bold;
  color: var(--text-secondary);
}

.detail-meta-value {
  color: var(--text-color);
}

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

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

.detail-section p {
  line-height: 1.8;
  color: var(--text-secondary);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tag {
  background: rgba(25, 118, 210, 0.2);
  color: var(--secondary-color);
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 14px;
}

.related-videos {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
}

footer {
  background: #0f0f0f;
  color: var(--text-secondary);
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
  border-top: 2px solid var(--border-color);
}

.rank-number {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 10px;
}

.topic-badge {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 10px;
}

.date-tag {
  background: rgba(25, 118, 210, 0.2);
  color: var(--secondary-color);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 13px;
  display: inline-block;
}

@media (max-width: 768px) {
  nav ul {
    justify-content: space-between;
    width: 100%;
    gap: 0;
  }

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

  nav ul li a {
    padding: 8px 5px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .logo {
    font-size: 20px;
  }

  .page-title {
    font-size: 24px;
  }

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

  .detail-container {
    padding: 25px 20px;
  }

  .detail-title {
    font-size: 28px;
  }

  .detail-meta {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  nav ul li a {
    padding: 6px 3px;
    font-size: 12px;
  }

  .container {
    padding: 0 15px;
  }
}