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

:root {
  --primary-color: #00A86B;
  --secondary-color: #333;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --hover-color: #00c97f;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

.ui-style-8 {
  --primary-color: #00A86B;
  --secondary-color: #2d2d2d;
  --bg-color: #e8f5e9;
}

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

.site-header {
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.site-logo a {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: block;
}

.site-nav {
  display: flex;
  gap: var(--spacing-md);
  white-space: nowrap;
}

.site-nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  transition: all 0.3s;
}

.site-nav a:hover {
  background: var(--primary-color);
  color: white;
}

.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.hero-title {
  font-size: 28px;
  margin-bottom: var(--spacing-sm);
  font-weight: bold;
}

.hero-desc {
  font-size: 16px;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.site-intro {
  background: white;
  padding: var(--spacing-lg) 0;
}

.site-intro p {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 15px;
  color: #555;
}

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

.section-title {
  font-size: 24px;
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-sm);
  border-left: 4px solid var(--primary-color);
}

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

.video-card {
  background: var(--card-bg);
  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(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.video-cover {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: #ddd;
}

.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: bold;
  margin-bottom: var(--spacing-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  font-size: 13px;
  color: #999;
  margin-bottom: var(--spacing-xs);
}

.video-one-line {
  font-size: 14px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.list-page {
  min-height: 70vh;
  padding: var(--spacing-lg) 0;
}

.page-header {
  background: white;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

.page-desc {
  font-size: 16px;
  color: #666;
}

.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.page--top .top-list__items {
  list-style: none;
}

.top-item {
  background: white;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  border-radius: 8px;
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.top-cover {
  width: 120px;
  height: 180px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

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

.top-info {
  flex: 1;
}

.page--with-sidebar .page-content {
  display: flex;
  gap: var(--spacing-lg);
}

.layout__side--filters {
  width: 240px;
  flex-shrink: 0;
  background: white;
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  height: fit-content;
}

.filter-box h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

.page--grouped .group {
  margin-bottom: var(--spacing-xl);
}

.group__title {
  font-size: 20px;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-color);
}

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

.detail-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
}

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

.video-player {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: none;
  background: rgba(0, 168, 107, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(0, 168, 107, 0.4);
}

.player-play-btn:hover {
  background: rgba(0, 200, 127, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

.player-play-icon {
  color: white;
  font-size: 32px;
  display: block;
}

.detail-header {
  background: white;
  padding: var(--spacing-lg);
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.detail-header h1 {
  font-size: 28px;
  color: var(--primary-color);
}

.detail-info, .detail-module, .related-section {
  background: white;
  padding: var(--spacing-lg);
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.detail-module h2, .detail-info h2, .related-section h2 {
  font-size: 20px;
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-sm) var(--spacing-md);
  font-size: 15px;
}

.info-list dt {
  font-weight: bold;
  color: #666;
}

.info-list dd {
  color: #333;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-size: 13px;
  color: #666;
}

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

.back-to-top {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 99;
}

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

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

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    height: auto;
    padding: var(--spacing-sm) var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .site-nav a {
    padding: var(--spacing-xs);
    font-size: 14px;
    flex-shrink: 0;
  }

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

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

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

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

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

  .page--with-sidebar .page-content {
    flex-direction: column;
  }

  .layout__side--filters {
    width: 100%;
  }

  .top-item {
    flex-direction: column;
    text-align: center;
  }

  .top-rank {
    min-width: auto;
  }

  .top-cover {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 2/3;
  }

  .detail-header h1 {
    font-size: 22px;
  }

  .player-play-btn {
    width: 60px;
    height: 60px;
  }

  .player-play-icon {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

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

  .site-nav a {
    font-size: 12px;
    padding: 6px 8px;
  }
}
