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

:root {
  --color-bg: #1a1a1a;
  --color-bg-light: #252525;
  --color-text: #ffffff;
  --color-text-secondary: #b0b0b0;
  --color-primary: #00C75A;
  --color-primary-dark: #00a048;
  --color-border: #333;
  --spacing-unit: 8px;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

body.ui-style-8 {
  --color-primary: #00C75A;
  --color-primary-dark: #00a048;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 2);
}

.site-header {
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo a {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

.logo a:hover {
  color: var(--color-primary-dark);
}

.main-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 4);
  align-items: center;
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 16px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.main-content {
  padding: calc(var(--spacing-unit) * 4) 0;
  min-height: calc(100vh - 200px);
}

.hero-section {
  background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg) 100%);
  padding: calc(var(--spacing-unit) * 8) 0;
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 6);
  border-radius: var(--border-radius);
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
  line-height: 1.3;
}

.hero-desc {
  font-size: 16px;
  color: var(--color-text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.section {
  margin-bottom: calc(var(--spacing-unit) * 8);
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 4);
  position: relative;
  padding-left: calc(var(--spacing-unit) * 2);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--color-primary);
  border-radius: 2px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 3);
}

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

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

.video-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--color-bg);
}

.video-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-card:hover .video-cover img {
  transform: scale(1.05);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 199, 90, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  opacity: 0;
  transition: var(--transition);
}

.video-card:hover .play-icon {
  opacity: 1;
}

.video-info {
  padding: calc(var(--spacing-unit) * 2);
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.video-one-line {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: calc(var(--spacing-unit));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  flex-wrap: wrap;
}

.meta-item {
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 2px 8px;
  background: var(--color-bg);
  border-radius: 4px;
}

.page-header {
  margin-bottom: calc(var(--spacing-unit) * 6);
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.page-desc {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.top-list__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 3);
}

.top-item {
  background: var(--color-bg-light);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.top-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(0, 199, 90, 0.15);
}

.top-item__link {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 3);
  padding: calc(var(--spacing-unit) * 2);
  text-decoration: none;
  color: inherit;
}

.top-rank {
  font-size: 24px;
  font-weight: 700;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border-radius: 50%;
  color: var(--color-text-secondary);
}

.top-rank--gold {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
}

.top-cover {
  width: 160px;
  height: 90px;
  border-radius: var(--border-radius);
  overflow: hidden;
  flex-shrink: 0;
}

.top-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-info {
  flex: 1;
  min-width: 0;
}

.top-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
}

.top-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: calc(var(--spacing-unit));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-meta {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
}

.top-meta span {
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 2px 8px;
  background: var(--color-bg);
  border-radius: 4px;
}

.detail-page {
  padding-bottom: calc(var(--spacing-unit) * 8);
}

.video-player-section {
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.video-player {
  max-width: 1000px;
  margin: 0 auto;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(0, 199, 90, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn:hover {
  background: var(--color-primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.player-play-icon {
  font-size: 32px;
  color: white;
  margin-left: 4px;
}

.detail-header {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.detail-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
}

.detail-info {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: calc(var(--spacing-unit) * 4);
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.info-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--color-primary);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
}

.info-item {
  display: flex;
  align-items: baseline;
  gap: calc(var(--spacing-unit));
}

.info-label {
  font-weight: 600;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

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

.detail-module {
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.module-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 3);
  position: relative;
  padding-left: calc(var(--spacing-unit) * 2);
}

.module-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 2px;
}

.module-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.module-content p {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 2);
}

.tag {
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: var(--transition);
}

.tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.related-section {
  margin-top: calc(var(--spacing-unit) * 8);
}

.video-grid--related {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.site-footer {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  padding: calc(var(--spacing-unit) * 4) 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing-unit) * 4);
  right: calc(var(--spacing-unit) * 4);
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .header-inner {
    height: auto;
    flex-direction: column;
    padding: calc(var(--spacing-unit) * 2) 0;
    gap: calc(var(--spacing-unit) * 2);
  }

  .main-nav {
    gap: calc(var(--spacing-unit) * 2);
    font-size: 14px;
  }

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

  .hero-desc {
    font-size: 14px;
  }

  .section-title {
    font-size: 22px;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
  }

  .video-cover {
    padding-top: 140%;
  }

  .video-title {
    font-size: 14px;
  }

  .video-one-line {
    font-size: 12px;
  }

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

  .top-item__link {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-cover {
    width: 100%;
    height: auto;
    padding-top: 56.25%;
    position: relative;
  }

  .top-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

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

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

  .module-title {
    font-size: 20px;
  }

  .video-grid--related {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
