:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-card: #252525;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --accent: #e5e5e5;
  --border: #333333;
  --play-btn: #ffffff;
  --spacing: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

body.ui-style-9 {
  font-weight: 300;
  letter-spacing: 0.3px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

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

.site-container {
  display: flex;
  min-height: 100vh;
}

.layout__side {
  width: 240px;
  background: var(--bg-secondary);
  padding: calc(var(--spacing) * 3);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.site-logo {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: calc(var(--spacing) * 4);
  letter-spacing: 1px;
}

.site-nav {
  list-style: none;
}

.site-nav li {
  margin-bottom: calc(var(--spacing) * 2);
}

.site-nav a {
  display: block;
  padding: calc(var(--spacing) * 1.5);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--bg-card);
}

.layout__main {
  flex: 1;
  padding: calc(var(--spacing) * 3);
  overflow-x: hidden;
}

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

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

.page-desc {
  color: var(--text-secondary);
  max-width: 800px;
  line-height: 1.8;
}

.hero-slider {
  margin-bottom: calc(var(--spacing) * 6);
  overflow: hidden;
}

.slider-track {
  display: flex;
  gap: calc(var(--spacing) * 3);
  overflow-x: auto;
  padding-bottom: calc(var(--spacing) * 2);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.slider-track::-webkit-scrollbar {
  height: 6px;
}

.slider-track::-webkit-scrollbar-track {
  background: transparent;
}

.slider-track::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.hero-card {
  flex: 0 0 400px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-4px);
}

.hero-card__cover {
  width: 100%;
  height: 225px;
  background: var(--bg-card);
}

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

.hero-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: calc(var(--spacing) * 3);
  background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
}

.hero-card__title {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: calc(var(--spacing));
}

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

.content-section {
  margin-bottom: calc(var(--spacing) * 8);
}

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

.section-title {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.section-more {
  font-size: 14px;
  color: var(--text-muted);
}

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

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

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.video-cover {
  width: 100%;
  height: 280px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.video-cover img {
  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) * 2);
}

.video-title {
  font-size: 15px;
  font-weight: 400;
  margin-bottom: calc(var(--spacing));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  gap: calc(var(--spacing) * 2);
  font-size: 12px;
  color: var(--text-muted);
}

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

.video-player-section {
  margin-bottom: calc(var(--spacing) * 6);
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

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

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: 2px solid var(--play-btn);
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.detail-main-title {
  font-size: 36px;
  font-weight: 300;
  margin-bottom: calc(var(--spacing) * 3);
  letter-spacing: 0.5px;
}

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

.detail-section__title {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: calc(var(--spacing) * 2);
  padding-bottom: calc(var(--spacing) * 1.5);
  border-bottom: 1px solid var(--border);
}

.detail-section__content {
  color: var(--text-secondary);
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: calc(var(--spacing) * 2);
  row-gap: calc(var(--spacing) * 1.5);
}

.info-label {
  color: var(--text-muted);
  font-size: 14px;
}

.info-value {
  color: var(--text-secondary);
  font-size: 14px;
}

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

.video-card--related .video-cover {
  height: 240px;
}

.page--grid .filter-bar {
  background: var(--bg-secondary);
  padding: calc(var(--spacing) * 2);
  border-radius: 6px;
  margin-bottom: calc(var(--spacing) * 4);
  font-size: 14px;
  color: var(--text-muted);
}

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

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

.page--with-sidebar .video-grid {
  flex: 1;
}

.filter-section {
  margin-bottom: calc(var(--spacing) * 3);
}

.filter-section h3 {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: calc(var(--spacing) * 1.5);
  color: var(--text-primary);
}

.filter-list {
  list-style: none;
  font-size: 13px;
}

.filter-list li {
  margin-bottom: calc(var(--spacing));
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-list li:hover {
  color: var(--text-primary);
}

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

.top-item {
  counter-increment: top-counter;
  background: var(--bg-card);
  padding: calc(var(--spacing) * 2);
  border-radius: 6px;
  margin-bottom: calc(var(--spacing) * 2);
  display: flex;
  gap: calc(var(--spacing) * 2);
  align-items: center;
  transition: transform 0.2s ease;
}

.top-item:hover {
  transform: translateX(4px);
}

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

.top-rank::before {
  content: counter(top-counter);
}

.top-item:nth-child(1) .top-rank,
.top-item:nth-child(2) .top-rank,
.top-item:nth-child(3) .top-rank {
  color: var(--accent);
}

.top-cover {
  width: 100px;
  height: 140px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.top-info {
  flex: 1;
}

.top-title {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: calc(var(--spacing));
}

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

.top-meta {
  margin-top: calc(var(--spacing));
  font-size: 12px;
  color: var(--text-muted);
}

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

.group__header {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 1px solid var(--border);
}

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

.pagination {
  display: flex;
  justify-content: center;
  gap: calc(var(--spacing) * 2);
  margin-top: calc(var(--spacing) * 6);
  padding-top: calc(var(--spacing) * 3);
  border-top: 1px solid var(--border);
}

.pagination a,
.pagination span {
  padding: calc(var(--spacing)) calc(var(--spacing) * 2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: var(--bg-card);
  opacity: 1;
}

.pagination .current {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.site-footer {
  margin-top: calc(var(--spacing) * 8);
  padding: calc(var(--spacing) * 4) 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

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

  .hero-card {
    flex: 0 0 320px;
  }

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

@media (max-width: 768px) {
  .site-container {
    flex-direction: column;
  }

  .layout__side {
    width: 100%;
    height: auto;
    position: static;
    padding: calc(var(--spacing) * 2);
  }

  .site-nav {
    display: flex;
    gap: calc(var(--spacing));
    overflow-x: auto;
  }

  .site-nav li {
    margin-bottom: 0;
    white-space: nowrap;
  }

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

  .hero-card {
    flex: 0 0 280px;
  }

  .hero-card__cover {
    height: 180px;
  }

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

  .video-cover {
    height: 180px;
  }

  .page--with-sidebar {
    flex-direction: column;
  }

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

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

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

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

  .top-rank {
    min-width: 40px;
    font-size: 20px;
  }

  .top-cover {
    width: 80px;
    height: 112px;
  }
}
