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

:root {
  --color-bg: #141414;
  --color-surface: #1f1f1f;
  --color-text: #ffffff;
  --color-text-secondary: #b3b3b3;
  --color-accent: #e50914;
  --color-border: #2a2a2a;
  --spacing-unit: 8px;
  --border-radius: 8px;
}

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

body.ui-style-5 {
  --color-bg: #0f0f0f;
  --color-surface: #181818;
  --color-accent: #e50914;
  font-weight: 400;
}

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

.site-header {
  background: var(--color-surface);
  padding: calc(var(--spacing-unit) * 2) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo a {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
  white-space: nowrap;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 16px;
}

.site-nav a:hover {
  color: var(--color-accent);
}

.hero-section {
  padding: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 4) 0;
  text-align: center;
}

.hero-section h1 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.site-intro {
  padding: calc(var(--spacing-unit) * 3) 0;
  background: var(--color-surface);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.site-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  max-width: 1000px;
  margin: 0 auto;
}

.content-module {
  padding: calc(var(--spacing-unit) * 5) 0;
}

.content-module h2 {
  font-size: 28px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  font-weight: 700;
}

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

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

.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: 56.25%;
  background: var(--color-border);
  overflow: hidden;
}

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

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

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

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

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

.page-header h1 {
  font-size: 36px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

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

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

.top-list__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 3);
}

.top-list__item {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  padding: calc(var(--spacing-unit) * 2);
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
}

.top-rank {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-accent);
  min-width: 60px;
  text-align: center;
}

.top-item-link {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.top-item-cover {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
}

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

.top-item-info h3 {
  font-size: 20px;
  margin-bottom: calc(var(--spacing-unit));
}

.top-item-info p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: calc(var(--spacing-unit));
}

.top-item-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
}

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

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

.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-accent);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.video-detail {
  padding: calc(var(--spacing-unit) * 4) 0;
}

.video-detail h1 {
  font-size: 36px;
  margin-bottom: calc(var(--spacing-unit) * 4);
  text-align: center;
}

.video-basic-info,
.video-module {
  background: var(--color-surface);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.video-basic-info h2,
.video-module h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--color-accent);
}

.video-basic-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: calc(var(--spacing-unit) * 2);
}

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

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

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

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

.video-related h2 {
  font-size: 28px;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

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

.video-card--related {
  background: var(--color-surface);
}

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

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

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing-unit) * 3);
  right: calc(var(--spacing-unit) * 3);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 999;
}

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

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

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
  }

  .site-nav {
    gap: calc(var(--spacing-unit) * 2);
    font-size: 14px;
  }

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

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

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

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

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

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

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

  .top-item-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }

  .video-detail h1 {
    font-size: 24px;
  }

  .video-basic-info dl {
    grid-template-columns: 80px 1fr;
    gap: calc(var(--spacing-unit));
  }

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

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

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