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

:root {
  --primary-color: #00A67E;
  --text-dark: #1a1a1a;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 8px;
  --spacing: 16px;
}

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

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

.site-nav {
  background: var(--primary-color);
  color: #fff;
  padding: var(--spacing) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing) * 1.5);
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

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

.nav-links a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
  white-space: nowrap;
  display: block;
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 0.8;
  border-bottom: 2px solid #fff;
}

.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #008f6d 100%);
  color: #fff;
  text-align: center;
  padding: calc(var(--spacing) * 4) var(--spacing);
}

.hero-title {
  font-size: 32px;
  margin-bottom: var(--spacing);
  font-weight: 600;
}

.hero-subtitle {
  font-size: 18px;
  opacity: 0.95;
}

.site-intro {
  background: var(--bg-light);
  padding: calc(var(--spacing) * 2) 0;
}

.site-intro p {
  line-height: 1.8;
  color: var(--text-light);
  text-align: justify;
}

.video-section {
  padding: calc(var(--spacing) * 3) 0;
}

.section-title {
  font-size: 28px;
  margin-bottom: calc(var(--spacing) * 2);
  padding-bottom: var(--spacing);
  border-bottom: 3px solid var(--primary-color);
  display: inline-block;
}

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

.video-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  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 {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

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

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

.video-title {
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
  flex-wrap: wrap;
}

.video-meta span {
  background: var(--bg-light);
  padding: 4px 8px;
  border-radius: 4px;
}

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

.page-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.page-desc {
  color: var(--text-light);
  font-size: 16px;
}

.list-page {
  padding: calc(var(--spacing) * 2) 0;
  min-height: 60vh;
}

.page--l3 .top-list {
  padding: var(--spacing) 0;
}

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: var(--spacing);
  padding: var(--spacing);
  margin-bottom: var(--spacing);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.top-list__item:hover {
  transform: translateX(4px);
}

.rank-badge {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 40px;
  text-align: center;
}

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

.top-list__item .video-cover img {
  position: static;
  width: 100%;
  height: 100%;
}

.top-list__item .video-info {
  flex: 1;
  padding: 0;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: calc(var(--spacing) * 2);
}

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

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

.page-grouped .group {
  margin-bottom: calc(var(--spacing) * 3);
}

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

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

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

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

.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%);
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  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: var(--primary-color);
  margin-left: 4px;
}

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

.video-header {
  padding: calc(var(--spacing) * 2) 0;
  background: var(--bg-light);
}

.video-header h1 {
  font-size: 32px;
}

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

.video-basic-info h2 {
  font-size: 24px;
  margin-bottom: var(--spacing);
  color: var(--primary-color);
}

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

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

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

.detail-module {
  padding: calc(var(--spacing) * 2) 0;
  border-bottom: 1px solid var(--border-color);
}

.detail-module:last-of-type {
  border-bottom: none;
}

.detail-module h2 {
  font-size: 22px;
  margin-bottom: var(--spacing);
  color: var(--primary-color);
}

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

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--primary-color);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
}

.related-section {
  padding: calc(var(--spacing) * 3) 0;
  background: var(--bg-light);
}

.related-section h2 {
  font-size: 28px;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--primary-color);
}

.video-card--related .video-cover {
  padding-top: 56.25%;
}

.site-footer {
  background: #2c3e50;
  color: #fff;
  text-align: center;
  padding: calc(var(--spacing) * 2);
  margin-top: calc(var(--spacing) * 3);
}

#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  z-index: 999;
}

#backToTop:hover {
  background: #008f6d;
  transform: translateY(-4px);
}

#backToTop.show {
  display: flex;
}

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

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

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

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

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

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

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

  .layout__side--filters {
    position: static;
  }

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

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

  .top-list__item .video-cover img {
    position: absolute;
    top: 0;
    left: 0;
  }

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

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

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

  .nav-links a {
    font-size: 14px;
  }

  #backToTop {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .video-cover {
    height: auto;
  }

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

  .video-info {
    min-height: 100px;
  }
}

body.ui-style-6 {
  --primary-color: #1890FF;
}

body.ui-style-6 .hero-section {
  background: linear-gradient(135deg, #1890FF 0%, #096dd9 100%);
}

body.layout-C .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

body.layout-F .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

body.layout-F .video-card .video-cover {
  padding-top: 140%;
}
