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

:root {
  --color-primary: #3498db;
  --color-secondary: #2ecc71;
  --color-accent: #e74c3c;
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-text: #2c3e50;
  --color-text-light: #7f8c8d;
  --spacing-unit: 8px;
}

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

body.ui-style-0 { --color-primary: #1a1a1a; --color-accent: #ff6b6b; }
body.ui-style-1 { --color-primary: #2c2c2c; --color-accent: #ff4444; }
body.ui-style-2 { --color-primary: #e74c3c; --color-accent: #ff9800; }
body.ui-style-3 { --color-primary: #e91e63; --color-accent: #ff5722; }
body.ui-style-4 { --color-primary: #e74c3c; --color-accent: #c0392b; }
body.ui-style-5 { --color-primary: #1a1a1a; --color-accent: #e50914; }
body.ui-style-6 { --color-primary: #0d253f; --color-accent: #01b4e4; }
body.ui-style-7 { --color-primary: #0f1b2a; --color-accent: #1e90ff; }
body.ui-style-8 { --color-primary: #2a2a2a; --color-accent: #00d66a; }
body.ui-style-9 { --color-primary: #141414; --color-accent: #e50914; }
body.ui-style-10 { --color-primary: #00c75a; --color-accent: #00e676; }
body.ui-style-11 { --color-primary: #0099ff; --color-accent: #ff6b35; }
body.ui-style-12 { --color-primary: #ff6700; --color-accent: #ff4500; }
body.ui-style-13 { --color-primary: #00a1d6; --color-accent: #fb7299; }
body.ui-style-14 { --color-primary: #003d7a; --color-accent: #ff6600; }

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

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing-unit) * 3);
  align-items: center;
  flex-wrap: nowrap;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: opacity 0.3s;
}

.nav-menu a:hover {
  opacity: 0.8;
}

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

.hero-section {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 4);
  border-radius: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
  line-height: 1.3;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.95;
}

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

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

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}

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

.video-card {
  background: var(--color-surface);
  border-radius: calc(var(--spacing-unit) * 2);
  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.15);
}

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

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #ddd;
}

.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: 1.1rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.video-meta {
  display: flex;
  gap: calc(var(--spacing-unit));
  font-size: 0.85rem;
  color: var(--color-text-light);
  flex-wrap: wrap;
}

.video-meta span {
  background: rgba(0, 0, 0, 0.05);
  padding: calc(var(--spacing-unit) / 2) calc(var(--spacing-unit));
  border-radius: calc(var(--spacing-unit));
}

.page-header {
  background: var(--color-surface);
  padding: calc(var(--spacing-unit) * 4);
  border-radius: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 4);
  text-align: center;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.page-description {
  font-size: 1.1rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

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

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

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

.top-item:hover {
  transform: translateX(8px);
}

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

.top-cover {
  width: 120px;
  height: 180px;
  flex-shrink: 0;
  border-radius: calc(var(--spacing-unit));
  overflow: hidden;
  background: #ddd;
}

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

.top-info {
  flex: 1;
}

.top-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
}

.top-title a {
  color: var(--color-text);
  text-decoration: none;
}

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

.top-desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: calc(var(--spacing-unit));
  line-height: 1.6;
}

.top-meta {
  display: flex;
  gap: calc(var(--spacing-unit));
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.top-meta span {
  background: rgba(0, 0, 0, 0.05);
  padding: calc(var(--spacing-unit) / 2) calc(var(--spacing-unit));
  border-radius: calc(var(--spacing-unit));
}

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

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

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

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

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: calc(var(--spacing-unit) * 2);
  overflow: hidden;
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

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

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

.detail-header {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.detail-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
}

.detail-info {
  background: var(--color-surface);
  padding: calc(var(--spacing-unit) * 4);
  border-radius: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.info-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--color-primary);
}

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

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

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

.detail-module {
  background: white;
  padding: calc(var(--spacing-unit) * 4);
  border-radius: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.module-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 2px solid var(--color-accent);
}

.module-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.module-content p {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

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

.tag {
  background: var(--color-primary);
  color: white;
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  border-radius: calc(var(--spacing-unit) * 3);
  font-size: 0.9rem;
}

.related-section {
  margin-top: calc(var(--spacing-unit) * 6);
  padding-top: calc(var(--spacing-unit) * 6);
  border-top: 2px solid var(--color-surface);
}

.site-footer {
  background: var(--color-primary);
  color: white;
  text-align: center;
  padding: calc(var(--spacing-unit) * 4);
  margin-top: calc(var(--spacing-unit) * 8);
}

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

  .nav-menu {
    gap: calc(var(--spacing-unit) * 2);
    font-size: 0.85rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    justify-content: flex-start;
    padding-bottom: calc(var(--spacing-unit));
  }

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

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

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

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

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

  .top-rank {
    min-width: auto;
  }

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

  .detail-title {
    font-size: 1.8rem;
  }

  .info-list {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit));
  }
}
