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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f7fa;
}

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

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

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

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

nav ul li a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  display: block;
  border-radius: 5px;
  transition: all 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav ul li a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

main {
  padding: 2rem 0;
  min-height: calc(100vh - 300px);
}

h1 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  border-left: 5px solid #667eea;
  padding-left: 1rem;
}

h2 {
  color: #34495e;
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
}

.intro-section {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
  line-height: 1.8;
}

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

.video-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: all 0.3s;
  cursor: pointer;
}

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

.video-card-content {
  padding: 1.2rem;
}

.video-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.video-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.tag {
  background: #e8f4f8;
  color: #3498db;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
}

.list-section {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

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

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

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

.rank-number {
  display: inline-block;
  width: 35px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 1rem;
  font-size: 1.1rem;
}

.date-badge {
  display: inline-block;
  background: #e74c3c;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 5px;
  font-size: 0.85rem;
  margin-right: 1rem;
}

.detail-header {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 0.3rem;
}

.meta-value {
  font-weight: 600;
  color: #2c3e50;
}

.detail-section {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
  line-height: 1.8;
}

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

.related-card {
  padding: 1.2rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  transition: all 0.3s;
}

.related-card:hover {
  background: #e8f4f8;
  border-left-color: #3498db;
}

.related-title {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

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

.group-section {
  margin-bottom: 3rem;
}

.group-title {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px 8px 0 0;
  font-size: 1.3rem;
  font-weight: bold;
}

.group-content {
  background: white;
  padding: 1.5rem;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.entrance-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.entrance-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.entrance-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.entrance-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.entrance-desc {
  font-size: 0.95rem;
  opacity: 0.9;
}

footer {
  background: #2c3e50;
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.3s;
}

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

@media (max-width: 768px) {
  nav ul {
    flex-wrap: nowrap;
    overflow-x: hidden;
  }

  nav ul li a {
    font-size: 0.85rem;
    padding: 0.5rem 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

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

  .header-content {
    flex-direction: column;
    align-items: stretch;
  }

  nav ul {
    width: 100%;
  }

  .entrance-cards {
    grid-template-columns: 1fr;
  }
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 99;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.back-to-top.show {
  display: flex;
}
