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

:root {
  --color-bg: #000;
  --color-bg-secondary: #111;
  --color-text: #fff;
  --color-text-secondary: #ccc;
  --color-accent: #e50914;
  --color-border: #333;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --radius: 8px;
  --transition: 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.ui-style-9 {
  --color-bg: #0a0a0a;
  --color-bg-secondary: #1a1a1a;
  --color-accent: #e50914;
  font-weight: 300;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.site-header {
  background-color: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.site-logo {
  flex-shrink: 0;
}

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

.logo-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.main-nav {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}

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

.main-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 16px;
  transition: color var(--transition);
  white-space: nowrap;
}

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

.main-content {
  flex: 1;
}

.hero-section {
  background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  text-align: center;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
}

.hero-desc {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.intro-section {
  padding: var(--spacing-lg) 0;
  background-color: var(--color-bg-secondary);
}

.intro-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.video-section {
  padding: var(--spacing-lg) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: 28px;
  font-weight: 600;
}

.more-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 16px;
  transition: color var(--transition);
}

.more-link:hover {
  color: var(--color-accent);
}

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

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-sm);
  }
}

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

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

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

.video-cover {
  position: relative;
  padding-top: 150%;
  background-color: #222;
  overflow: hidden;
}

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

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.video-info {
  padding: var(--spacing-sm);
}

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

.video-one-line {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  gap: var(--spacing-sm);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.video-meta span:not(:last-child)::after {
  content: '·';
  margin-left: var(--spacing-sm);
}

.page-header {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 700;
}

.page--with-sidebar .container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

@media (max-width: 1024px) {
  .page--with-sidebar .container {
    grid-template-columns: 1fr;
  }
}

.layout__side--filters {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--radius);
  position: sticky;
  top: 80px;
}

@media (max-width: 1024px) {
  .layout__side--filters {
    position: static;
  }
}

.filter-info h2 {
  font-size: 20px;
  margin-bottom: var(--spacing-sm);
}

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

.detail-page {
  padding: var(--spacing-lg) 0;
}

.video-player-section {
  margin-bottom: var(--spacing-lg);
}

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  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-color: var(--color-accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.detail-header {
  margin-bottom: var(--spacing-lg);
}

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

.detail-info {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-lg);
}

.info-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

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

.info-list dt {
  color: var(--color-text-secondary);
  font-weight: 500;
}

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

.detail-module {
  background-color: var(--color-bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-lg);
}

.module-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--color-accent);
}

.module-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

.module-content p:last-child {
  margin-bottom: 0;
}

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

.tag {
  display: inline-block;
  padding: 6px 16px;
  background-color: var(--color-bg);
  color: var(--color-text-secondary);
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid var(--color-border);
}

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

@media (max-width: 768px) {
  .related-section .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

.video-card--related .video-cover {
  padding-top: 140%;
}

.site-footer {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
  text-align: center;
}

.site-footer p {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

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

@media (max-width: 768px) {
  .hero-title {
    font-size: 28px;
  }

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

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

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

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

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

  .back-to-top {
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
