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

:root {
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
}

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

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

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

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

.logo a {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  text-decoration: none;
}

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

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

.main-nav a {
  color: #666;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.main-nav a:hover {
  color: #333;
  background: #f0f0f0;
}

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

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

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

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

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

.section-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.more-link {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.more-link:hover {
  color: #764ba2;
}

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

.video-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

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

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

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

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

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

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

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

.page-header {
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: #333;
}

.page-desc {
  font-size: 16px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

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

.layout__side--filters {
  background: #fff;
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.filter-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.filter-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

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

.top-list__item {
  background: #fff;
  border-radius: var(--spacing-sm);
  padding: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: var(--transition);
}

.top-list__item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.rank-badge {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
  min-width: 40px;
  text-align: center;
}

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

.top-list__item .video-cover {
  width: 120px;
  flex-shrink: 0;
  padding-top: 0;
  height: 68px;
}

.top-list__item .video-cover img {
  position: static;
}

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

.group__title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-sm);
  border-left: 4px solid #667eea;
}

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

.detail-page {
  background: #fff;
}

.video-player-section {
  background: #000;
  padding: var(--spacing-md) 0;
}

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

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,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: #fff;
  transform: translate(-50%, -50%) scale(1.1);
}

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

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

.detail-title {
  font-size: 36px;
  font-weight: 700;
  color: #333;
}

.basic-info {
  background: #f9f9f9;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.info-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

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

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

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

.content-module {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid #e0e0e0;
}

.module-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: #333;
}

.module-content {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
}

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

.tag {
  display: inline-block;
  padding: 6px 12px;
  background: #f0f0f0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #666;
}

.related-section {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 2px solid #e0e0e0;
  margin-bottom: var(--spacing-xl);
}

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

.site-footer p {
  opacity: 0.8;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

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

body.ui-style-10 {
  --primary-color: #00C75A;
  --primary-hover: #00A047;
}

body.ui-style-10 .hero-section {
  background: linear-gradient(135deg, #00C75A 0%, #00A047 100%);
}

body.ui-style-10 .more-link {
  color: #00C75A;
}

body.ui-style-10 .rank-badge {
  color: #00C75A;
}

body.ui-style-10 .group__title {
  border-left-color: #00C75A;
}

body.ui-style-10 .back-to-top {
  background: #00C75A;
}

body.ui-style-10 .back-to-top:hover {
  background: #00A047;
}

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

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

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

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

  .layout__side--filters {
    position: static;
  }

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

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

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

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

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

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

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

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

  .main-nav a {
    font-size: 14px;
    padding: 6px 10px;
  }

  .video-info {
    padding: 12px;
  }

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

  .video-meta {
    font-size: 12px;
  }

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

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