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

:root {
  --primary-color: #000;
  --secondary-color: #fff;
  --accent-color: #ff4757;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --spacing: 16px;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

body.ui-style-0 {
  --primary-color: #1a1a1a;
  --accent-color: #ff4757;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

.site-nav {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.nav-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: calc(var(--spacing) * 1.5);
  white-space: nowrap;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.hero-section {
  min-height: 400px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--spacing) * 4) var(--spacing);
  color: var(--secondary-color);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: calc(var(--spacing) * 1.5);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  line-height: 1.4;
}

.hero-desc {
  font-size: 18px;
  line-height: 1.8;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.intro-section {
  padding: calc(var(--spacing) * 3) var(--spacing);
  background: var(--card-bg);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.site-intro {
  font-size: 16px;
  line-height: 2;
  color: var(--text-color);
  text-align: justify;
}

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

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

.section-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.section-more {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.section-more:hover {
  opacity: 0.8;
}

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

.video-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

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

.video-cover {
  width: 100%;
  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);
}

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

.video-one-line {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: calc(var(--spacing) * 0.5);
  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: calc(var(--spacing) * 0.5);
  flex-wrap: wrap;
}

.meta-item {
  font-size: 12px;
  color: var(--text-light);
  padding: 2px 8px;
  background: var(--bg-color);
  border-radius: 4px;
}

.list-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--spacing) * 2) var(--spacing);
}

.page-header {
  text-align: center;
  padding: calc(var(--spacing) * 3) 0;
}

.page-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: var(--spacing);
}

.page-desc {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

.list-container {
  margin-top: calc(var(--spacing) * 2);
}

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

.top-list__item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: var(--spacing);
  box-shadow: var(--shadow);
  display: flex;
  gap: var(--spacing);
  align-items: flex-start;
  transition: var(--transition);
}

.top-list__item:hover {
  box-shadow: var(--shadow-hover);
}

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

.top-cover {
  width: 120px;
  flex-shrink: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.top-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.top-info {
  flex: 1;
}

.top-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: calc(var(--spacing) * 0.5);
}

.top-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.top-title a:hover {
  color: var(--accent-color);
}

.top-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: calc(var(--spacing) * 0.5);
  line-height: 1.6;
}

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

.detail-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: calc(var(--spacing) * 2) var(--spacing);
}

.video-player-section {
  margin-bottom: calc(var(--spacing) * 2);
}

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

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

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

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

.player-play-icon {
  font-size: 32px;
  color: var(--primary-color);
  margin-left: 4px;
}

.detail-header {
  padding: calc(var(--spacing) * 2) 0;
  text-align: center;
}

.detail-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
}

.detail-info {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 2);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: calc(var(--spacing) * 2);
}

.info-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: var(--spacing);
  color: var(--primary-color);
}

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

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

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

.detail-module {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 2);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: calc(var(--spacing) * 2);
}

.module-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: var(--spacing);
  color: var(--primary-color);
  border-left: 4px solid var(--accent-color);
  padding-left: var(--spacing);
}

.module-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-color);
}

.module-content p {
  margin-bottom: var(--spacing);
}

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

.tag-item {
  padding: 6px 12px;
  background: var(--bg-color);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-color);
  transition: var(--transition);
}

.tag-item:hover {
  background: var(--accent-color);
  color: var(--secondary-color);
}

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

.site-footer {
  background: var(--primary-color);
  color: var(--secondary-color);
  padding: calc(var(--spacing) * 2);
  text-align: center;
  margin-top: calc(var(--spacing) * 4);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-color);
  color: var(--secondary-color);
  border: none;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  z-index: 999;
}

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

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

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

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

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

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

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

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

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

  .video-title {
    font-size: 14px;
    -webkit-line-clamp: 1;
  }

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

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

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

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

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

  .top-cover {
    width: 100%;
  }

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

  .info-list {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing) * 0.5);
  }

  .info-list dt {
    margin-top: var(--spacing);
  }

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