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

:root {
  --primary-color: #FB7299;
  --secondary-color: #00A1D6;
  --text-color: #333;
  --bg-color: #fff;
  --border-color: #e0e0e0;
  --hover-color: #f5f5f5;
  --spacing-unit: 8px;
}

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

body.ui-style-3 {
  --primary-color: #FB7299;
  --secondary-color: #00A1D6;
}

.site-header {
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

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

.main-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
}

.main-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--primary-color);
}

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

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 4);
  border-radius: 16px;
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

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

.site-intro {
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.95;
}

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

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.module-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
  padding-left: calc(var(--spacing-unit) * 2);
}

.module-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.module-more {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.3s;
}

.module-more:hover {
  opacity: 0.8;
}

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

.video-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background-color: #f0f0f0;
  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: 16px;
  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: #666;
  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) * 2);
  font-size: 12px;
  color: #999;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 2);
}

.ranking-item {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 8px;
  padding: calc(var(--spacing-unit) * 2);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}

.ranking-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.rank-number {
  font-size: 20px;
  font-weight: 700;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: #f5f5f5;
  color: #666;
  flex-shrink: 0;
}

.rank-number.rank-top {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

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

.ranking-cover {
  width: 100px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #f0f0f0;
  flex-shrink: 0;
}

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

.ranking-info {
  margin-left: calc(var(--spacing-unit) * 2);
  flex: 1;
}

.ranking-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) / 2);
}

.ranking-desc {
  font-size: 13px;
  color: #666;
}

.site-footer {
  background-color: #f9f9f9;
  border-top: 1px solid var(--border-color);
  padding: calc(var(--spacing-unit) * 4) 0;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing-unit) * 4);
  right: calc(var(--spacing-unit) * 4);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: opacity 0.3s, transform 0.3s;
}

.back-to-top:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.back-to-top.visible {
  display: flex;
}

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

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
}

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

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

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

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

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

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

.video-main-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
}

.video-basic-info {
  background-color: #f9f9f9;
  border-radius: 12px;
  padding: calc(var(--spacing-unit) * 3);
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: calc(var(--spacing-unit) * 2);
  position: relative;
  padding-left: calc(var(--spacing-unit) * 2);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  font-size: 15px;
  line-height: 1.8;
}

.info-list dt {
  font-weight: 600;
  color: #666;
}

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

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

.section-content {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

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

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

.video-card--related {
  background-color: #fafafa;
}

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

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

  .main-nav a {
    flex-shrink: 0;
  }

  .hero-section {
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
  }

  .site-title {
    font-size: 20px;
  }

  .site-intro {
    font-size: 14px;
  }

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

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

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

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

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

  .video-main-title {
    font-size: 22px;
  }

  .back-to-top {
    bottom: calc(var(--spacing-unit) * 2);
    right: calc(var(--spacing-unit) * 2);
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .ranking-cover {
    width: 80px;
    height: 45px;
  }

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

  .ranking-desc {
    font-size: 12px;
  }
}
