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

:root {
  --primary-color: #FF6700;
  --secondary-color: #FF4500;
  --bg-color: #FFFFFF;
  --text-color: #333333;
  --border-color: #E0E0E0;
  --hover-bg: #FFF5F0;
  --spacing: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", 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;
  --hover-bg: #FFF0F5;
}

.site-header {
  background: var(--bg-color);
  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: 1400px;
  margin: 0 auto;
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing) * 3);
}

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

.site-nav {
  display: flex;
  gap: calc(var(--spacing) * 2);
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2);
  color: var(--text-color);
  text-decoration: none;
  border-radius: calc(var(--spacing) * 2);
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--hover-bg);
  color: var(--primary-color);
}

.site-main {
  min-height: 60vh;
}

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

.hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: calc(var(--spacing) * 2);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 18px;
  opacity: 0.95;
  line-height: 1.5;
}

.site-intro {
  padding: calc(var(--spacing) * 6) calc(var(--spacing) * 3);
  background-color: #FAFAFA;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.site-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

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

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

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

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

.video-card {
  background: white;
  border-radius: calc(var(--spacing) * 2);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

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

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

.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) * 2);
}

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

.video-one-line {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.video-card--compact .video-card__link {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
}

.video-card--compact .video-cover {
  width: 120px;
  min-width: 120px;
  padding-top: 0;
  height: 90px;
  border-radius: calc(var(--spacing) * 1);
}

.video-card--compact .video-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 2);
}

.rank-badge {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 32px;
}

.site-footer {
  background-color: #2C2C2C;
  color: #FFFFFF;
  padding: calc(var(--spacing) * 4) calc(var(--spacing) * 3);
  text-align: center;
  margin-top: calc(var(--spacing) * 6);
}

.site-footer p {
  font-size: 14px;
  opacity: 0.8;
}

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

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: calc(var(--spacing) * 6) calc(var(--spacing) * 3);
  text-align: center;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 2);
}

.page-description {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
}

.page-content {
  padding: calc(var(--spacing) * 6) calc(var(--spacing) * 3);
}

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

.top-list__item {
  background: white;
  border-radius: calc(var(--spacing) * 2);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

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

.top-list__link {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 2);
  text-decoration: none;
  color: inherit;
}

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

.top-list__cover {
  width: 160px;
  min-width: 160px;
  height: 120px;
  border-radius: calc(var(--spacing) * 1);
  overflow: hidden;
  background-color: #F0F0F0;
}

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

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

.top-list__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 1);
  color: var(--text-color);
}

.top-list__meta {
  font-size: 14px;
  color: #666;
  margin-bottom: calc(var(--spacing) * 1);
}

.top-list__desc {
  font-size: 14px;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

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

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

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

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

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

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

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

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

.detail-section__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--text-color);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--primary-color);
}

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

.detail-info-item {
  display: flex;
  gap: calc(var(--spacing) * 1);
}

.detail-info-label {
  font-weight: 600;
  color: #666;
  min-width: 60px;
}

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

.detail-content {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 1);
}

.tag-item {
  display: inline-block;
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2);
  background-color: var(--hover-bg);
  color: var(--primary-color);
  border-radius: calc(var(--spacing) * 2);
  font-size: 14px;
}

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

.video-card--related {
  background: #FAFAFA;
}

.filter-bar {
  background: white;
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--spacing) * 2);
  margin-bottom: calc(var(--spacing) * 4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

  .site-logo a {
    font-size: 20px;
  }

  .site-nav {
    gap: calc(var(--spacing) * 1);
  }

  .nav-link {
    padding: calc(var(--spacing) * 1) calc(var(--spacing) * 1.5);
    font-size: 14px;
  }

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

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

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

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

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

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

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

  .detail-section {
    padding: calc(var(--spacing) * 3);
  }

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

  .top-list__cover {
    width: 100%;
    height: 180px;
  }

  .top-list__rank {
    position: absolute;
    top: calc(var(--spacing) * 2);
    left: calc(var(--spacing) * 2);
    background: rgba(255, 255, 255, 0.95);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
  }

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