:root {
  --primary-bg: #1a1a1a;
  --secondary-bg: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --accent-orange: #ff6b35;
  --accent-red: #ff4757;
  --border-color: #3a3a3a;
  --hover-bg: #353535;
  --spacing-unit: 8px;
}

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

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

body.ui-style-1 {
  font-family: system-ui, -apple-system, 'Segoe UI', 'Noto Sans', sans-serif;
  border-radius: 12px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.site-header {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  padding: calc(var(--spacing-unit) * 2) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing-unit) * 3);
}

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

.logo:hover {
  color: var(--accent-orange);
}

.main-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
  align-items: center;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.nav-link {
  color: var(--text-secondary);
  font-size: 15px;
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--hover-bg);
}

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

.hero-section {
  text-align: center;
  padding: calc(var(--spacing-unit) * 6) 0;
  background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
  border-radius: 16px;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

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

.page-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

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

.intro-content {
  background: var(--secondary-bg);
  padding: calc(var(--spacing-unit) * 4);
  border-radius: 12px;
  line-height: 1.8;
  color: var(--text-secondary);
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 2px solid var(--border-color);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  position: relative;
  padding-left: calc(var(--spacing-unit) * 2);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent-orange) 0%, var(--accent-red) 100%);
  border-radius: 2px;
}

.more-link {
  color: var(--accent-orange);
  font-size: 14px;
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.more-link:hover {
  background: var(--hover-bg);
}

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

.video-card {
  background: var(--secondary-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(255, 107, 53, 0.2);
}

.video-card__link {
  display: block;
}

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

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

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 107, 53, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  transform: scale(1);
  transition: transform 0.3s ease;
}

.video-card:hover .play-icon {
  transform: scale(1.1);
}

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

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

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

.meta-item {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--primary-bg);
  padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 1.5);
  border-radius: 4px;
}

.page--grid .page-header,
.page--with-sidebar .page-header {
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.page--grid .page-title,
.page--with-sidebar .page-title {
  font-size: 28px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

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

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

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

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

.filter-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.top-item {
  background: var(--secondary-bg);
  border-radius: 12px;
  margin-bottom: calc(var(--spacing-unit) * 2);
  overflow: hidden;
  transition: all 0.3s ease;
}

.top-item:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.15);
}

.top-item__link {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 3);
  padding: calc(var(--spacing-unit) * 2);
}

.top-rank {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  background: var(--primary-bg);
  color: var(--text-secondary);
  border-radius: 8px;
}

.top-rank.rank-top {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-red) 100%);
  color: white;
}

.top-cover {
  width: 120px;
  flex-shrink: 0;
  position: relative;
  padding-top: 67.5%;
  border-radius: 8px;
  overflow: hidden;
}

.top-cover img {
  position: absolute;
  top: 0;
  left: 0;
  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-unit) * 1);
  color: var(--text-primary);
}

.top-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.top-oneline {
  font-size: 14px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

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

.detail-page .container {
  max-width: 1200px;
}

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

.video-player {
  background: var(--secondary-bg);
  border-radius: 16px;
  overflow: hidden;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 107, 53, 0.9);
  border: none;
  border-radius: 50%;
  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);
  background: var(--accent-orange);
}

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

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

.video-main-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

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

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

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

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

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

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

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

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

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

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

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

.tag-item {
  background: var(--primary-bg);
  color: var(--accent-orange);
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

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

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

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

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

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

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

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

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

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

  .logo {
    font-size: 20px;
  }

  .main-nav {
    gap: calc(var(--spacing-unit) * 1.5);
  }

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

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

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

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

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

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

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

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

  .layout__side--filters {
    position: static;
  }

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

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

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

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

  .video-main-title {
    font-size: 24px;
  }

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