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

:root {
  --primary-color: #ff0050;
  --bg-color: #000;
  --text-color: #fff;
  --card-bg: #1a1a1a;
  --border-radius: 12px;
  --spacing-unit: 8px;
}

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

body.ui-style-0 {
  --primary-color: #fe2c55;
  --bg-color: #000;
  --text-color: #fff;
  --card-bg: #1a1a1a;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 2);
  width: 100%;
}

.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.9);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--spacing-unit) * 2) 0;
}

.site-logo a {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: var(--border-radius);
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  transition: all 0.3s ease;
}

.site-logo a:hover {
  background: rgba(254, 44, 85, 0.1);
}

.site-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing-unit) * 1);
  align-items: center;
}

.nav-item {
  white-space: nowrap;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  display: block;
  font-size: 14px;
}

.nav-link:hover,
.nav-item--active .nav-link {
  background: var(--primary-color);
  color: #fff;
}

.site-main {
  flex: 1;
  padding: calc(var(--spacing-unit) * 3) 0;
}

.hero-section {
  padding: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 4);
  text-align: center;
}

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

.hero-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

.site-intro {
  padding: calc(var(--spacing-unit) * 4) 0;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.intro-content p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  padding: 0 calc(var(--spacing-unit) * 2);
}

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

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

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

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

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(254, 44, 85, 0.3);
}

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

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

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

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

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

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

.video-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.video-one-line {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

.page-header {
  margin-bottom: calc(var(--spacing-unit) * 4);
  text-align: center;
  padding: calc(var(--spacing-unit) * 4) 0;
}

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

.page-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.filter-bar {
  padding: calc(var(--spacing-unit) * 2);
  background: var(--card-bg);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.filter-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 3);
  padding: calc(var(--spacing-unit) * 3);
  background: var(--card-bg);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.top-list__item:hover {
  background: #252525;
  transform: translateX(8px);
}

.top-rank {
  font-size: 24px;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

.top-rank--top {
  color: var(--primary-color);
  font-size: 32px;
}

.top-item__cover {
  width: 120px;
  flex-shrink: 0;
}

.top-item__cover img {
  width: 100%;
  border-radius: calc(var(--border-radius) / 2);
}

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

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

.top-item__title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.top-item__title a:hover {
  color: var(--primary-color);
}

.top-item__meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.top-item__desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.layout__with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: calc(var(--spacing-unit) * 4);
}

.layout__side--filters {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.filter-box {
  background: var(--card-bg);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: var(--border-radius);
}

.filter-title {
  font-size: 16px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.filter-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

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

.group__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-left: calc(var(--spacing-unit) * 2);
  border-left: 4px solid var(--primary-color);
}

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

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

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

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

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

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 30px rgba(254, 44, 85, 0.6);
}

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

.video-detail {
  max-width: 900px;
  margin: 0 auto;
}

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

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

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

.info-title {
  font-size: 20px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--primary-color);
}

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

.info-list dt {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.info-list dd {
  color: rgba(255, 255, 255, 0.9);
}

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

.module-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-left: calc(var(--spacing-unit) * 2);
  border-left: 4px solid var(--primary-color);
}

.module-content {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

.module-content p {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 2);
}

.tag-item {
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  background: rgba(254, 44, 85, 0.2);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 14px;
}

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

.video-card--related {
  background: #222;
}

.site-footer {
  background: var(--card-bg);
  padding: calc(var(--spacing-unit) * 4) 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.footer__text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.back-to-top {
  position: fixed;
  right: calc(var(--spacing-unit) * 3);
  bottom: calc(var(--spacing-unit) * 3);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 99;
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(254, 44, 85, 0.4);
}

@media (max-width: 768px) {
  .header__inner {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .nav-list {
    justify-content: flex-start;
    min-width: max-content;
  }

  .nav-link {
    font-size: 13px;
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 1.5);
  }

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

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

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

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

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

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

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

  .top-list__item {
    flex-direction: column;
    text-align: center;
  }

  .top-item__cover {
    width: 100%;
    max-width: 200px;
  }

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

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

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