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

:root {
  --color-primary: #00C75A;
  --color-bg: #1a1a1a;
  --color-surface: #2a2a2a;
  --color-text: #ffffff;
  --color-text-secondary: #b0b0b0;
  --color-border: #3a3a3a;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --radius: 8px;
}

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;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

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

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.site-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background: rgba(0, 199, 90, 0.1);
}

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

.hero-section {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-xl);
}

.hero-content {
  text-align: center;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-secondary);
}

.intro-section {
  margin-bottom: var(--spacing-xl);
}

.intro-content {
  background: var(--color-surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-primary);
}

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

.video-section {
  margin-bottom: var(--spacing-xl);
}

.section-header {
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-primary);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--color-primary);
}

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

.video-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.video-info {
  padding: var(--spacing-sm);
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xs);
}

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

.page-header {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--color-primary);
}

.page-description {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-top: var(--spacing-sm);
}

.page--top .top-list__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.top-list__item {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--spacing-sm);
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  transition: transform 0.3s ease;
}

.top-list__item:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 16px rgba(0, 199, 90, 0.2);
}

.top-rank {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 50px;
  text-align: center;
}

.top-item-link {
  display: flex;
  gap: var(--spacing-md);
  flex: 1;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.top-item-link .video-cover {
  width: 120px;
  padding-top: 67.5px;
  flex-shrink: 0;
}

.top-item-link .video-info {
  flex: 1;
}

.video-player-section {
  margin-bottom: var(--spacing-lg);
}

.video-player {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-primary);
  border: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn:hover {
  background: #00a84a;
  transform: translate(-50%, -50%) scale(1.1);
}

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

.detail-section {
  padding: var(--spacing-lg) 0;
}

.detail-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
}

.detail-info {
  background: var(--color-surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-lg);
}

.detail-section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--color-primary);
}

.info-list {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--spacing-sm);
}

.info-list dt {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.info-list dd {
  color: var(--color-text);
}

.detail-module {
  background: var(--color-surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-lg);
}

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

.related-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.video-card--related {
  background: var(--color-bg);
}

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
  text-align: center;
  color: var(--color-text-secondary);
}

.back-to-top {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  background: var(--color-primary);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
}

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

.back-to-top:hover {
  background: #00a84a;
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

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

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-sm);
  }

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

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

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

  .top-rank {
    font-size: 24px;
    min-width: 40px;
  }

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

  .top-item-link .video-cover {
    width: 100%;
    padding-top: 56.25%;
  }

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

  .related-videos {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-content {
    flex-wrap: wrap;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

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

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

  .info-list dt {
    font-weight: 700;
    margin-top: var(--spacing-sm);
  }

  .info-list dt:first-child {
    margin-top: 0;
  }
}
