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

:root {
  --color-primary: #007bff;
  --color-secondary: #6c757d;
  --color-accent: #ff6b6b;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-text: #212529;
  --color-text-light: #6c757d;
  --color-border: #dee2e6;
  --spacing: 8px;
  --border-radius: 8px;
  --transition: 0.3s ease;
}

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

.ui-style-0 {
  --color-primary: #000000;
  --color-accent: #00f2ea;
  --color-bg: #000000;
  --color-text: #ffffff;
}

.ui-style-1 {
  --color-primary: #ff4500;
  --color-accent: #fe2c55;
}

.ui-style-2 {
  --color-primary: #ff6600;
  --color-accent: #ff4500;
}

.ui-style-3 {
  --color-primary: #e60023;
  --color-accent: #bd081c;
}

.ui-style-4 {
  --color-primary: #e50914;
  --color-accent: #b20710;
}

.ui-style-5 {
  --color-primary: #141414;
  --color-accent: #e50914;
  --color-bg: #141414;
  --color-bg-alt: #1a1a1a;
  --color-text: #ffffff;
  --color-text-light: #b3b3b3;
  --color-border: #404040;
}

.ui-style-6 {
  --color-primary: #1a1a2e;
  --color-accent: #0f3460;
  --color-bg: #0f0f23;
  --color-text: #eaeaea;
}

.ui-style-7 {
  --color-primary: #0063e5;
  --color-accent: #0063e5;
}

.ui-style-8 {
  --color-primary: #1db954;
  --color-accent: #1ed760;
  --color-bg: #191414;
  --color-text: #ffffff;
}

.ui-style-9 {
  --color-primary: #000000;
  --color-accent: #ffffff;
  --color-bg: #000000;
  --color-text: #ffffff;
  --color-text-light: #808080;
  --color-border: #2a2a2a;
}

.ui-style-10 {
  --color-primary: #00c75a;
  --color-accent: #00f777;
}

.ui-style-11 {
  --color-primary: #0099ff;
  --color-accent: #ff6600;
}

.ui-style-12 {
  --color-primary: #ff6700;
  --color-accent: #ff8547;
}

.ui-style-13 {
  --color-primary: #00a1d6;
  --color-accent: #fb7299;
}

.ui-style-14 {
  --color-primary: #003366;
  --color-accent: #ff6600;
}

.site-nav {
  background: var(--color-primary);
  color: white;
  padding: calc(var(--spacing) * 2) var(--spacing);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing);
}

.nav-logo a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing) * 2);
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-links li {
  flex-shrink: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: calc(var(--spacing) * 0.5) var(--spacing);
  border-radius: var(--border-radius);
  transition: var(--transition);
  display: block;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.2);
}

.home-page,
.list-page,
.detail-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--spacing) * 3) var(--spacing);
}

.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: white;
  padding: calc(var(--spacing) * 6) calc(var(--spacing) * 3);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing) * 4);
  text-align: center;
}

.hero-title {
  font-size: 2rem;
  margin-bottom: calc(var(--spacing) * 2);
  font-weight: bold;
}

.hero-desc {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.95;
}

.intro-section {
  background: var(--color-bg-alt);
  padding: calc(var(--spacing) * 3);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing) * 4);
}

.intro-content p {
  line-height: 1.8;
  font-size: 1rem;
}

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

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

.section-header h2 {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.more-link {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

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

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

.video-card {
  background: var(--color-bg-alt);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.video-cover {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--color-border);
}

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

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

.video-title {
  font-size: 1.1rem;
  margin-bottom: calc(var(--spacing) * 0.5);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  color: var(--color-text-light);
  font-size: 0.875rem;
  margin-bottom: calc(var(--spacing) * 0.5);
}

.video-one-line {
  font-size: 0.9rem;
  color: var(--color-text-light);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-header {
  margin-bottom: calc(var(--spacing) * 4);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 3px solid var(--color-primary);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: var(--spacing);
  color: var(--color-primary);
}

.page-desc {
  font-size: 1.1rem;
  color: var(--color-text-light);
}

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

.top-item {
  display: flex;
  gap: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 2);
  background: var(--color-bg-alt);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing) * 2);
  align-items: center;
  transition: var(--transition);
}

.top-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateX(4px);
}

.top-rank {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-primary);
  min-width: 50px;
  text-align: center;
}

.top-cover {
  width: 160px;
  flex-shrink: 0;
}

.top-cover img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.top-info {
  flex: 1;
  min-width: 0;
}

.top-title {
  font-size: 1.2rem;
  margin-bottom: calc(var(--spacing) * 0.5);
}

.top-title a {
  color: inherit;
  text-decoration: none;
}

.top-title a:hover {
  color: var(--color-primary);
}

.top-meta {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: calc(var(--spacing) * 0.5);
}

.top-summary {
  font-size: 0.95rem;
  color: var(--color-text);
}

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

.group-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: calc(var(--spacing) * 2);
  padding-left: var(--spacing);
  border-left: 4px solid var(--color-accent);
}

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

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

.video-player {
  max-width: 1000px;
  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: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.player-play-icon {
  font-size: 2rem;
  color: var(--color-primary);
  margin-left: 4px;
}

.detail-header {
  margin-bottom: calc(var(--spacing) * 3);
}

.detail-header h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
}

.detail-info {
  background: var(--color-bg-alt);
  padding: calc(var(--spacing) * 3);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing) * 3);
}

.detail-info h2 {
  font-size: 1.3rem;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--color-primary);
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing);
  font-size: 1rem;
}

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

.info-list dd {
  margin: 0;
}

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

.detail-module h2 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: var(--spacing);
}

.detail-module p {
  line-height: 1.8;
  font-size: 1rem;
  margin-bottom: var(--spacing);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing);
}

.tag {
  display: inline-block;
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5);
  background: var(--color-primary);
  color: white;
  border-radius: calc(var(--border-radius) * 2);
  font-size: 0.9rem;
}

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

.video-card--related {
  background: white;
}

.site-footer {
  background: var(--color-bg-alt);
  padding: calc(var(--spacing) * 4) var(--spacing);
  margin-top: calc(var(--spacing) * 6);
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.footer-content p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

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

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

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

  .nav-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: var(--spacing);
  }

  .top-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-cover {
    width: 100%;
  }

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

  .detail-header h1 {
    font-size: 1.8rem;
  }

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

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

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

  .video-title {
    font-size: 0.95rem;
  }

  .video-one-line {
    font-size: 0.85rem;
  }
}

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

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

  .nav-links {
    font-size: 0.9rem;
    gap: calc(var(--spacing) * 0.5);
  }

  .nav-links a {
    padding: calc(var(--spacing) * 0.5);
  }
}
