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

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

.ui-style-8 {
  --primary-color: #2c5282;
  --secondary-color: #4a90d9;
  --accent-color: #e67e22;
  --text-color: #2d3748;
  --bg-color: #f7fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --hover-color: #edf2f7;
}

body.ui-style-8 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  color: var(--text-color);
}

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

header {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  flex-wrap: wrap;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 24px;
}

nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

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

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

nav ul li a:hover {
  background: var(--hover-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

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

.page-header {
  background: var(--card-bg);
  padding: 40px 32px;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--primary-color);
  line-height: 1.3;
}

.page-header p {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
}

.section {
  background: var(--card-bg);
  padding: 32px;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--primary-color);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--secondary-color);
}

.section h3 {
  font-size: 20px;
  margin-bottom: 16px;
  margin-top: 24px;
  color: var(--text-color);
}

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

.video-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: var(--secondary-color);
}

.video-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  margin-top: 0;
  color: var(--primary-color);
}

.video-card h3 a {
  color: inherit;
  text-decoration: none;
}

.video-card h3 a:hover {
  color: var(--secondary-color);
}

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

.video-meta span {
  padding: 4px 8px;
  background: var(--hover-color);
  border-radius: 4px;
}

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

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

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

.video-list-item:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.video-list-item h3 {
  font-size: 20px;
  margin-bottom: 12px;
  margin-top: 0;
}

.video-list-item h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.video-list-item h3 a:hover {
  color: var(--secondary-color);
}

.video-info {
  background: var(--hover-color);
  padding: 20px;
  border-radius: 8px;
  margin: 24px 0;
}

.info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.info-label {
  font-weight: 600;
  min-width: 80px;
  color: #666;
}

.info-value {
  flex: 1;
  color: var(--text-color);
}

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

.tag {
  padding: 6px 12px;
  background: var(--secondary-color);
  color: white;
  border-radius: 16px;
  font-size: 14px;
}

.intro-section {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.intro-section p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 12px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.quick-links a {
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 15px;
}

.quick-links a:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

footer {
  background: rgba(255, 255, 255, 0.95);
  padding: 32px 0;
  margin-top: 48px;
  text-align: center;
  color: #666;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  margin-right: 12px;
  flex-shrink: 0;
}

.rank-number.top3 {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #333;
  font-size: 16px;
}

.group-header {
  background: var(--primary-color);
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  margin: 24px 0 16px 0;
  font-size: 18px;
  font-weight: 600;
}

.date-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-color);
  color: white;
  border-radius: 4px;
  font-size: 13px;
  margin-left: 12px;
}

@media (max-width: 768px) {
  .header-content {
    padding: 12px 0;
  }

  .logo {
    font-size: 20px;
    margin-right: 0;
    margin-bottom: 12px;
    width: 100%;
  }

  nav {
    width: 100%;
  }

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

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

  nav ul li a {
    padding: 6px 4px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-header {
    padding: 24px 20px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .section {
    padding: 20px;
  }

  .section h2 {
    font-size: 20px;
  }

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

  .intro-section {
    padding: 24px 20px;
  }

  .quick-links {
    gap: 8px;
  }

  .quick-links a {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    text-align: center;
    font-size: 14px;
    padding: 8px 12px;
  }

  .info-row {
    flex-direction: column;
    gap: 4px;
  }

  .info-label {
    font-size: 14px;
  }
}

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

  .page-header h1 {
    font-size: 20px;
  }

  .video-card {
    padding: 16px;
  }
}
