* {
  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;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

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

header {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #2c5282;
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  flex-wrap: nowrap;
}

nav a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
}

nav a:hover {
  color: #2c5282;
}

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

h1 {
  font-size: 32px;
  color: #1a202c;
  margin-bottom: 20px;
  line-height: 1.3;
}

h2 {
  font-size: 24px;
  color: #2d3748;
  margin: 30px 0 20px;
}

h3 {
  font-size: 20px;
  color: #2d3748;
  margin: 20px 0 15px;
}

section {
  background: #fff;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.intro-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 40px;
}

.intro-section h1 {
  color: #fff;
}

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

.video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card-content {
  padding: 20px;
}

.video-title {
  font-size: 18px;
  font-weight: bold;
  color: #1a202c;
  margin-bottom: 10px;
  text-decoration: none;
  display: block;
}

.video-title:hover {
  color: #2c5282;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #666;
}

.video-meta span {
  background: #e2e8f0;
  padding: 3px 10px;
  border-radius: 4px;
}

.video-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
}

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

.tag {
  background: #edf2f7;
  color: #4a5568;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.detail-info {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.detail-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px;
}

.detail-info dt {
  font-weight: bold;
  color: #2d3748;
}

.detail-info dd {
  color: #4a5568;
}

.review-box {
  background: #fff5e6;
  border-left: 4px solid #f59e0b;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
}

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

.related-item {
  background: #f7fafc;
  padding: 15px;
  border-radius: 6px;
  border-left: 3px solid #667eea;
}

.related-item h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.related-item h4 a {
  color: #1a202c;
  text-decoration: none;
}

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

.related-item p {
  font-size: 13px;
  color: #666;
}

footer {
  background-color: #2d3748;
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
}

.top-section {
  counter-reset: rank-counter;
}

.video-card.ranked {
  position: relative;
}

.video-card.ranked::before {
  counter-increment: rank-counter;
  content: counter(rank-counter);
  position: absolute;
  top: 10px;
  left: 10px;
  background: #667eea;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  z-index: 10;
}

.grouped-section .group {
  margin-bottom: 40px;
}

.group h3 {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
    padding: 12px 15px;
  }

  .logo {
    font-size: 20px;
  }

  nav ul {
    gap: 0;
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

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

  nav a {
    font-size: 13px;
    padding: 8px 5px;
    display: block;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  section {
    padding: 20px 15px;
  }

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

  .detail-info dl {
    grid-template-columns: 80px 1fr;
    gap: 10px;
  }
}

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

  .logo {
    font-size: 18px;
  }
}