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

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

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

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

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

.site-header {
  background: var(--white);
  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-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--spacing-unit) * 2) 0;
}

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

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

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

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

.site-main {
  min-height: calc(100vh - 200px);
}

.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: calc(var(--spacing-unit) * 8) 0;
  text-align: center;
}

.site-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: calc(var(--spacing-unit) * 2);
  line-height: 1.4;
}

.site-subtitle {
  font-size: 18px;
  opacity: 0.95;
}

.intro-section {
  padding: calc(var(--spacing-unit) * 6) 0;
  background: var(--bg-light);
}

.intro-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
  text-align: justify;
}

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

.section-title {
  font-size: 28px;
  margin-bottom: calc(var(--spacing-unit) * 4);
  color: var(--text-dark);
  position: relative;
  padding-bottom: calc(var(--spacing-unit) * 2);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

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

.video-card {
  background: var(--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 8px 24px rgba(0,0,0,0.15);
}

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

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--bg-light);
  overflow: hidden;
}

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

.video-card:hover .video-cover img {
  transform: scale(1.05);
}

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

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

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

.video-meta {
  display: flex;
  gap: calc(var(--spacing-unit));
  font-size: 12px;
}

.meta-tag {
  background: var(--primary-color);
  color: var(--white);
  padding: 4px calc(var(--spacing-unit));
  border-radius: 4px;
}

.meta-year {
  color: var(--text-light);
  padding: 4px calc(var(--spacing-unit));
}

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

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

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

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

.page-header {
  padding: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 4);
  background: var(--bg-light);
}

.page-title {
  font-size: 32px;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--text-dark);
}

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

.page--grid .video-grid {
  padding: calc(var(--spacing-unit) * 6) 0;
}

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

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

.top-list__item {
  display: flex;
  align-items: center;
  background: var(--white);
  padding: calc(var(--spacing-unit) * 2);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.rank-badge {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  margin-right: calc(var(--spacing-unit) * 2);
  flex-shrink: 0;
}

.rank-badge.top-3 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.top-item-cover {
  width: 120px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: calc(var(--spacing-unit) * 2);
  flex-shrink: 0;
}

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

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

.top-item-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
  color: var(--text-dark);
}

.top-item-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: calc(var(--spacing-unit));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-item-meta {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  font-size: 13px;
  color: var(--text-light);
}

.top-item-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  width: 100%;
}

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

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

.group__title {
  font-size: 24px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--text-dark);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 2px solid var(--border-color);
}

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

.video-player-section {
  padding: calc(var(--spacing-unit) * 6) 0;
  background: var(--text-dark);
}

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

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

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

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

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

.detail-title {
  font-size: 36px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--text-dark);
  line-height: 1.3;
}

.info-block {
  background: var(--bg-light);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 12px;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.info-block h2 {
  font-size: 20px;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--text-dark);
}

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

.info-item {
  display: flex;
  font-size: 15px;
}

.info-label {
  font-weight: 600;
  color: var(--text-dark);
  min-width: 80px;
}

.info-value {
  color: var(--text-light);
  flex: 1;
}

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

.content-block h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--text-dark);
  position: relative;
  padding-bottom: calc(var(--spacing-unit) * 2);
}

.content-block h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-color);
}

.content-block p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: calc(var(--spacing-unit) * 2);
  text-align: justify;
}

.related-section {
  background: var(--bg-light);
  padding: calc(var(--spacing-unit) * 6) 0;
}

.related-title {
  font-size: 28px;
  margin-bottom: calc(var(--spacing-unit) * 4);
  color: var(--text-dark);
  text-align: center;
}

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

@media (max-width: 768px) {
  .main-nav {
    gap: calc(var(--spacing-unit) * 1.5);
    font-size: 14px;
  }

  .main-nav a {
    padding: 4px 0;
  }

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

  .site-subtitle {
    font-size: 16px;
  }

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

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

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

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

  .section-title {
    font-size: 22px;
  }

  .detail-title {
    font-size: 28px;
  }

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

  .top-item-title {
    font-size: 16px;
  }

  .top-item-desc {
    font-size: 13px;
  }

  .rank-badge {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}