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

:root {
  --primary-color: #000;
  --secondary-color: #fff;
  --accent-color: #ff0050;
  --text-color: #333;
  --bg-color: #fafafa;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --spacing: 8px;
}

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-color: var(--bg-color);
}

body.ui-style-0 {
  --primary-color: #000;
  --accent-color: #00f2ea;
  --bg-color: #000;
  --text-color: #fff;
  --card-bg: #111;
  --border-color: #333;
}

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

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-logo {
  text-decoration: none;
  color: var(--primary-color);
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
}

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

.nav-item {
  text-decoration: none;
  color: var(--text-color);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  padding: calc(var(--spacing) * 1) 0;
}

.nav-item:hover,
.nav-item.active {
  color: var(--accent-color);
}

.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--spacing) * 3);
}

.hero-section {
  padding: calc(var(--spacing) * 8) 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: var(--secondary-color);
  margin: 0 calc(var(--spacing) * -3);
  margin-bottom: calc(var(--spacing) * 6);
}

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

.hero-desc {
  font-size: 18px;
  opacity: 0.9;
}

.intro-section {
  margin-bottom: calc(var(--spacing) * 6);
}

.intro-text {
  font-size: 16px;
  line-height: 1.8;
  text-align: justify;
  max-width: 900px;
  margin: 0 auto;
}

.section-hot,
.section-top,
.section-latest {
  margin-bottom: calc(var(--spacing) * 8);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--accent-color);
}

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

.video-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--border-color);
}

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

.video-card:hover .video-cover img {
  transform: scale(1.05);
}

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

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 1);
  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: #666;
  margin-bottom: calc(var(--spacing) * 1);
  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) * 1);
  flex-wrap: wrap;
  font-size: 12px;
}

.meta-item {
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5);
  background: var(--bg-color);
  border-radius: 12px;
  color: #666;
}

.page-header {
  text-align: center;
  margin-bottom: calc(var(--spacing) * 6);
  padding-bottom: calc(var(--spacing) * 3);
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 2);
}

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

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  background: var(--card-bg);
  padding: calc(var(--spacing) * 2);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.top-rank {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 50px;
  text-align: center;
}

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

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

.top-info {
  flex: 1;
  min-width: 0;
}

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

.top-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

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

.top-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: calc(var(--spacing) * 1);
}

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

.page-with-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: calc(var(--spacing) * 4);
}

.layout__side--filters {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: 12px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.layout__side--filters h3 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing) * 2);
}

.layout__side--filters p {
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

.group {
  margin-bottom: calc(var(--spacing) * 6);
}

.group__title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--accent-color);
}

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

.video-card--compact .video-info {
  padding: calc(var(--spacing) * 1.5);
}

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

.video-card--compact .video-one-line {
  font-size: 13px;
  -webkit-line-clamp: 1;
}

.detail-page {
  max-width: 1000px;
}

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

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

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

.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.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

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

.detail-header {
  margin-bottom: calc(var(--spacing) * 4);
}

.detail-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}

.detail-info {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: 12px;
  margin-bottom: calc(var(--spacing) * 4);
}

.info-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 2);
  padding-bottom: calc(var(--spacing) * 1);
  border-bottom: 2px solid var(--accent-color);
}

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

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

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

.detail-module {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: 12px;
  margin-bottom: calc(var(--spacing) * 3);
}

.module-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 2);
  padding-bottom: calc(var(--spacing) * 1);
  border-bottom: 2px solid var(--accent-color);
}

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

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

.tag-item {
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2);
  background: var(--bg-color);
  border-radius: 16px;
  font-size: 14px;
  color: #666;
  transition: background 0.2s, color 0.2s;
}

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

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

.video-card--related {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  margin-top: calc(var(--spacing) * 10);
  padding: calc(var(--spacing) * 4) 0;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 3);
  text-align: center;
}

.footer-text {
  font-size: 14px;
  color: #888;
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

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

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

@media (max-width: 768px) {
  .header-container {
    padding: calc(var(--spacing) * 2);
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: calc(var(--spacing) * 2);
    padding-top: calc(var(--spacing) * 2);
  }

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

  .nav-item {
    flex-shrink: 0;
    font-size: 14px;
  }

  .main-content {
    padding: calc(var(--spacing) * 2);
  }

  .hero-section {
    padding: calc(var(--spacing) * 6) calc(var(--spacing) * 2);
    margin: 0 calc(var(--spacing) * -2);
  }

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

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

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

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

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

  .layout__side--filters {
    position: static;
  }

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

  .top-cover {
    width: 100%;
    height: auto;
    padding-top: 56.25%;
    position: relative;
  }

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

  .detail-page {
    max-width: 100%;
  }

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

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

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

  .back-to-top {
    width: 44px;
    height: 44px;
    font-size: 18px;
    bottom: calc(var(--spacing) * 2);
    right: calc(var(--spacing) * 2);
  }
}
