:root {
  --color-bg: #000;
  --color-bg-secondary: #1a1a1a;
  --color-text: #fff;
  --color-text-secondary: #b0b0b0;
  --color-primary: #fe2c55;
  --color-primary-hover: #ff4d6d;
  --color-border: #2a2a2a;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
}

.ui-style-1 {
  --color-bg: #000;
  --color-bg-secondary: #1a1a1a;
  --color-primary: #fe2c55;
  --color-primary-hover: #ff4d6d;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.main-nav {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  white-space: nowrap;
}

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

.main-content {
  min-height: 70vh;
}

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

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

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

.intro-section {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

.intro-section p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  text-align: justify;
}

.video-section {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

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

.section-title {
  font-size: 24px;
  font-weight: 700;
}

.section-more {
  color: var(--color-primary);
  transition: var(--transition);
}

.section-more:hover {
  color: var(--color-primary-hover);
}

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

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

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

.video-card__link {
  display: block;
}

.video-cover {
  position: relative;
  padding-top: 140%;
  overflow: hidden;
  background: #2a2a2a;
}

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

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: var(--transition);
}

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

.play-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

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

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.video-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.video-meta span {
  padding: 2px 8px;
  background: var(--color-border);
  border-radius: 4px;
}

.page-header {
  padding: var(--spacing-lg) 0;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}

.page-title {
  font-size: 28px;
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

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

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

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

.filter-box {
  background: var(--color-bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
}

.filter-box h3 {
  margin-bottom: var(--spacing-sm);
  font-size: 18px;
}

.filter-group {
  margin-bottom: var(--spacing-md);
}

.filter-group h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--color-text-secondary);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  padding: 4px 12px;
  background: var(--color-border);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--color-primary);
  color: #fff;
}

.top-list__items {
  list-style: none;
  padding: var(--spacing-lg) 0;
}

.top-list-item {
  display: flex;
  gap: var(--spacing-md);
  background: var(--color-bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
  transition: var(--transition);
}

.top-list-item:hover {
  background: #2a2a2a;
}

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

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000;
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
  color: #000;
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #cd7f32 0%, #e5a569 100%);
  color: #000;
}

.top-item-link {
  display: flex;
  gap: var(--spacing-md);
  flex: 1;
}

.top-item-link .video-cover {
  flex-shrink: 0;
  width: 100px;
  padding-top: 0;
  height: 140px;
}

.top-item-link .video-info {
  flex: 1;
}

.grouped-grid {
  padding: var(--spacing-lg) 0;
}

.group {
  margin-bottom: var(--spacing-xl);
}

.group-title {
  font-size: 24px;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--color-primary);
}

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

.video-player-section {
  background: #000;
  padding: var(--spacing-lg) 0;
}

.video-player {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.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(--color-primary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.detail-header {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

.detail-title {
  font-size: 32px;
  font-weight: 700;
}

.detail-info {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

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

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
}

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

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

.detail-module {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

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

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

.module-content p {
  margin-bottom: var(--spacing-sm);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 16px;
  background: var(--color-border);
  border-radius: 20px;
  font-size: 14px;
  transition: var(--transition);
}

.tag:hover {
  background: var(--color-primary);
  color: #fff;
}

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

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

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

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

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

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

@media (max-width: 768px) {
  .nav-links {
    gap: 8px;
    font-size: 14px;
  }

  .nav-links a {
    padding: 6px 10px;
  }

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

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

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

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

  .layout__side--filters {
    position: static;
  }

  .top-item-link {
    flex-direction: column;
  }

  .top-item-link .video-cover {
    width: 100%;
    height: auto;
    padding-top: 140%;
  }

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

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

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

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