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

:root {
  --primary-color: #1a1a1a;
  --secondary-color: #e50914;
  --bg-color: #141414;
  --text-color: #ffffff;
  --text-secondary: #b3b3b3;
  --card-bg: #1f1f1f;
  --spacing: 8px;
  --border-radius: 4px;
}

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

.ui-style-5 {
  --primary-color: #141414;
  --secondary-color: #e50914;
  --bg-color: #000000;
  --text-color: #ffffff;
  --text-secondary: #999999;
  --card-bg: #181818;
  --border-radius: 6px;
}

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

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

.site-nav {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 4);
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.site-nav a {
  color: var(--text-color);
  text-decoration: none;
  white-space: nowrap;
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.site-nav .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-right: auto;
}

.site-nav a:not(.logo):hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary-color);
}

.hero-section {
  background: linear-gradient(180deg, rgba(229, 9, 20, 0.1) 0%, transparent 100%);
  padding: calc(var(--spacing) * 10) 0 calc(var(--spacing) * 8);
  text-align: center;
  margin-bottom: calc(var(--spacing) * 6);
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: calc(var(--spacing) * 3);
  font-weight: 700;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
}

.intro-section {
  margin-bottom: calc(var(--spacing) * 6);
  padding: calc(var(--spacing) * 4) 0;
}

.intro-section h2 {
  font-size: 1.5rem;
  margin-bottom: calc(var(--spacing) * 3);
  font-weight: 600;
}

.intro-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 1000px;
}

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

.video-section h2 {
  font-size: 1.8rem;
  margin-bottom: calc(var(--spacing) * 4);
  font-weight: 600;
}

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

.video-grid.masonry {
  column-count: 4;
  column-gap: calc(var(--spacing) * 3);
}

.video-grid.masonry .video-card {
  break-inside: avoid;
  margin-bottom: calc(var(--spacing) * 3);
}

.video-card {
  background: var(--card-bg);
  border-radius: calc(var(--border-radius) * 2);
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-block;
  width: 100%;
}

.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;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.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-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(229, 9, 20, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 1);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-one-line {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: calc(var(--spacing) * 1.5);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  display: flex;
  gap: calc(var(--spacing) * 2);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.video-meta span {
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5);
  background: rgba(255, 255, 255, 0.05);
  border-radius: calc(var(--border-radius) * 3);
}

.page-header {
  text-align: center;
  padding: calc(var(--spacing) * 6) 0 calc(var(--spacing) * 4);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: calc(var(--spacing) * 2);
  font-weight: 700;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

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

.layout__side--filters {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--border-radius) * 2);
  height: fit-content;
  position: sticky;
  top: calc(var(--spacing) * 10);
}

.layout__side--filters h3 {
  margin-bottom: calc(var(--spacing) * 2);
  font-size: 1.125rem;
}

.layout__side--filters p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.top-list__items {
  list-style: none;
  padding: 0;
}

.top-list__item {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  margin-bottom: calc(var(--spacing) * 2);
  border-radius: calc(var(--border-radius) * 2);
  transition: all 0.3s ease;
}

.top-list__item:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.rank-badge {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
  min-width: 48px;
  text-align: center;
}

.item-cover {
  width: 120px;
  height: 68px;
  flex-shrink: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
}

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

.item-info {
  flex: 1;
}

.item-info h3 {
  font-size: 1.125rem;
  margin-bottom: calc(var(--spacing) * 1);
}

.item-info h3 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.item-info h3 a:hover {
  color: var(--secondary-color);
}

.item-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: calc(var(--spacing) * 1);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.item-meta {
  display: flex;
  gap: calc(var(--spacing) * 2);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.item-meta span {
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5);
  background: rgba(255, 255, 255, 0.05);
  border-radius: calc(var(--border-radius) * 3);
}

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

.group__title {
  font-size: 1.5rem;
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--secondary-color);
  font-weight: 600;
}

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

.video-player {
  max-width: 1400px;
  margin: 0 auto;
}

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--secondary-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(229, 9, 20, 0.6);
}

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

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

.detail-header {
  padding: calc(var(--spacing) * 6) 0 calc(var(--spacing) * 4);
  text-align: center;
}

.detail-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  font-weight: 700;
}

.detail-module {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 4);
  margin-bottom: calc(var(--spacing) * 3);
  border-radius: calc(var(--border-radius) * 2);
}

.detail-module h2 {
  font-size: 1.5rem;
  margin-bottom: calc(var(--spacing) * 3);
  font-weight: 600;
  color: var(--secondary-color);
}

.detail-module p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: calc(var(--spacing) * 2);
}

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

.basic-info .info-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: calc(var(--spacing) * 2);
  color: var(--text-secondary);
}

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

.basic-info dd {
  margin: 0;
}

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

.tag {
  padding: calc(var(--spacing) * 1.5) calc(var(--spacing) * 3);
  background: rgba(229, 9, 20, 0.15);
  color: var(--secondary-color);
  border-radius: calc(var(--border-radius) * 4);
  font-size: 0.875rem;
  border: 1px solid rgba(229, 9, 20, 0.3);
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(229, 9, 20, 0.25);
  border-color: rgba(229, 9, 20, 0.5);
}

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

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

.site-footer {
  background: var(--primary-color);
  padding: calc(var(--spacing) * 6) 0;
  text-align: center;
  color: var(--text-secondary);
  margin-top: calc(var(--spacing) * 10);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  width: 48px;
  height: 48px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

@media (max-width: 1024px) {
  .video-grid.masonry {
    column-count: 3;
  }

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

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

  .layout__side--filters {
    position: static;
  }
}

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

  .site-nav a:not(.logo) {
    font-size: 0.875rem;
    padding: calc(var(--spacing) * 0.75) calc(var(--spacing) * 1.5);
  }

  .video-grid.masonry {
    column-count: 2;
  }

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

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

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

  .top-list__item {
    flex-direction: column;
    text-align: center;
  }

  .rank-badge {
    font-size: 1.5rem;
  }

  .item-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

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

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

  .player-play-btn {
    width: 60px;
    height: 60px;
  }

  .player-play-icon {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .video-grid.masonry {
    column-count: 1;
  }

  .site-nav .logo {
    font-size: 1.25rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-desc {
    font-size: 0.875rem;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}
