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

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

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

.ui-style-8 {
  --color-bg: #1a1a1a;
  --color-bg-light: #2a2a2a;
  --color-text: #ffffff;
  --color-text-dim: #b0b0b0;
  --color-primary: #00C75A;
  --color-border: #3a3a3a;
}

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

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

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

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
}

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

.nav-menu li {
  flex-shrink: 0;
}

.nav-menu a {
  color: var(--color-text-dim);
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all 0.3s;
  display: block;
  white-space: nowrap;
}

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

.home-main,
.list-main,
.detail-main {
  flex: 1;
  padding-bottom: var(--spacing-xl);
}

.home-hero {
  background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg) 100%);
  padding: var(--spacing-xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
  font-weight: 700;
}

.hero-desc {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--color-text-dim);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.home-intro {
  background: var(--color-bg-light);
  padding: var(--spacing-lg) 0;
  margin: var(--spacing-lg) 0;
}

.home-intro p {
  color: var(--color-text-dim);
  line-height: 1.8;
  font-size: 0.95rem;
}

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

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

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

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

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px 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-bg);
  overflow: hidden;
}

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

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.play-overlay span {
  font-size: 3rem;
  color: var(--color-primary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

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

.video-title {
  font-size: 1rem;
  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;
  line-height: 1.4;
}

.video-meta {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin-bottom: var(--spacing-xs);
}

.video-one-line {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.page-header h1 {
  font-size: 2rem;
  color: var(--color-primary);
}

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

.top-item {
  background: var(--color-bg-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

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

.top-rank {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: 700;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.top-item__link {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  text-decoration: none;
  color: inherit;
}

.top-item .video-cover {
  flex-shrink: 0;
  width: 180px;
  padding-top: 0;
  height: 100px;
  position: relative;
}

.top-item .video-info {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.video-tags {
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--spacing-lg);
}

.layout__side--filters {
  background: var(--color-bg-light);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  height: fit-content;
}

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

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

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

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

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

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

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

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 199, 90, 0.4);
}

.player-play-icon {
  color: #000;
  font-size: 2rem;
  margin-left: 4px;
}

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

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

.detail-info,
.detail-module,
.detail-related {
  margin-bottom: var(--spacing-xl);
}

.detail-info h2,
.detail-module h2,
.detail-related h2 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
  padding-left: var(--spacing-sm);
  border-left: 4px solid var(--color-primary);
}

.info-list {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--spacing-sm);
  background: var(--color-bg-light);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
}

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

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

.detail-module p {
  color: var(--color-text-dim);
  line-height: 1.8;
  margin-bottom: var(--spacing-sm);
}

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

.tag {
  background: var(--color-bg-light);
  color: var(--color-primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
}

.site-footer {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
  padding: var(--spacing-lg) 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  z-index: 999;
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 199, 90, 0.4);
}

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

  .site-logo {
    font-size: 1.25rem;
  }

  .nav-menu {
    gap: var(--spacing-sm);
  }

  .nav-menu a {
    padding: var(--spacing-xs);
    font-size: 0.9rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-desc {
    font-size: 0.9rem;
  }

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

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

  .video-title {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }

  .video-meta,
  .video-one-line {
    font-size: 0.8rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .layout__side--filters {
    display: none;
  }

  .top-item__link {
    flex-direction: column;
  }

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

  .detail-header h1 {
    font-size: 1.75rem;
  }

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

  .back-to-top {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

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

  .player-play-icon {
    font-size: 1.5rem;
  }
}

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

  .container {
    padding: 0 var(--spacing-sm);
  }
}
