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

:root {
  --primary-color: #ff0050;
  --bg-dark: #0a0a0a;
  --bg-gray: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --border-color: #2a2a2a;
  --spacing-unit: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

body.ui-style-0 {
  --primary-color: #00f2ea;
  --secondary-color: #ff0050;
}

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

header {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 1px;
}

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

.nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

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

.layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.layout__side {
  width: 280px;
  background: var(--bg-gray);
  padding: calc(var(--spacing-unit) * 3);
  border-right: 1px solid var(--border-color);
}

.layout__main {
  flex: 1;
  padding: calc(var(--spacing-unit) * 4);
}

.hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: calc(var(--spacing-unit) * 5);
  background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-dark) 100%);
  padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 6);
}

.hero h1 {
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: calc(var(--spacing-unit) * 3);
  background: linear-gradient(135deg, var(--primary-color), var(--text-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.8;
}

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

.section-title {
  font-size: 28px;
  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(240px, 1fr));
  gap: calc(var(--spacing-unit) * 3);
}

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

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

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

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56%;
  overflow: hidden;
  background: var(--bg-dark);
}

.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.1);
}

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

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

.video-meta {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: calc(var(--spacing-unit));
}

.video-one-line {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-header {
  margin-bottom: calc(var(--spacing-unit) * 5);
}

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

.page-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

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

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, rgba(255, 0, 80, 0.1), rgba(0, 242, 234, 0.1));
}

.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;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 30px var(--primary-color);
}

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

.detail-main {
  max-width: 1200px;
  margin: 0 auto;
}

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

.detail-title {
  font-size: 38px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  line-height: 1.3;
}

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

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
}

.info-item {
  display: flex;
  gap: calc(var(--spacing-unit));
}

.info-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 60px;
}

.info-value {
  color: var(--text-primary);
}

.content-module {
  background: var(--bg-gray);
  padding: calc(var(--spacing-unit) * 4);
  border-radius: 12px;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

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

.module-content {
  line-height: 1.8;
  color: var(--text-secondary);
}

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

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

.tag {
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  background: rgba(255, 0, 80, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 13px;
}

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

.video-card--related {
  background: var(--bg-dark);
}

footer {
  background: var(--bg-gray);
  padding: calc(var(--spacing-unit) * 4) 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
  margin-top: calc(var(--spacing-unit) * 8);
}

.side-info {
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.side-info h3 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--primary-color);
}

.side-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.back-to-top {
  position: fixed;
  right: calc(var(--spacing-unit) * 3);
  bottom: calc(var(--spacing-unit) * 3);
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 0, 80, 0.4);
}

@media (max-width: 1024px) {
  .layout__side {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav {
    gap: calc(var(--spacing-unit) * 2);
    font-size: 14px;
  }

  .hero h1 {
    font-size: 28px;
  }

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

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

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

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

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

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

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

.page--grid .video-grid {
  margin-top: calc(var(--spacing-unit) * 4);
}

.page--with-sidebar {
  display: flex;
  gap: calc(var(--spacing-unit) * 4);
}

.page--with-sidebar .layout__side--filters {
  width: 220px;
  flex-shrink: 0;
}

.page--with-sidebar .page-main {
  flex: 1;
}

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
  background: var(--bg-gray);
  padding: calc(var(--spacing-unit) * 2);
  border-radius: 12px;
  transition: transform 0.3s ease;
}

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

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

.top-list__item:nth-child(1) .top-rank {
  color: #ffd700;
}

.top-list__item:nth-child(2) .top-rank {
  color: #c0c0c0;
}

.top-list__item:nth-child(3) .top-rank {
  color: #cd7f32;
}

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

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

.top-info {
  flex: 1;
}

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

.top-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

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

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

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

@media (max-width: 768px) {
  .page--with-sidebar {
    flex-direction: column;
  }

  .page--with-sidebar .layout__side--filters {
    width: 100%;
  }

  .top-list__item {
    flex-wrap: wrap;
  }

  .top-cover {
    width: 100px;
    height: 56px;
  }

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