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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

.ui-style-4 {
  --primary-color: #FF3E3E;
  --secondary-color: #1a1a1a;
  --bg-color: #ffffff;
  --text-color: #333333;
  --border-color: #e0e0e0;
  --hover-color: #ff5555;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.site-logo a:hover {
  opacity: 0.8;
}

.site-nav {
  display: flex;
  gap: 32px;
  white-space: nowrap;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px 2px 0 0;
}

.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-section {
  margin-bottom: 48px;
  text-align: center;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 16px;
  line-height: 1.4;
}

.site-intro {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--secondary-color);
}

.video-slider-section {
  margin-bottom: 48px;
}

.horizontal-slider {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.horizontal-slider::-webkit-scrollbar {
  display: none;
}

.slider-track {
  display: flex;
  gap: 20px;
  padding-bottom: 8px;
}

.video-card--slider {
  flex: 0 0 280px;
  background: #fff;
  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--slider:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.video-grid-section,
.video-list-section,
.video-timeline-section {
  margin-bottom: 48px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

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

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px 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%;
  overflow: hidden;
  background: #f0f0f0;
}

.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: 16px;
}

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

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

.video-meta {
  margin-top: 8px;
  font-size: 13px;
  color: #999;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-card--list {
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.video-card--list .video-cover {
  flex: 0 0 200px;
  padding-top: 0;
  height: 112px;
}

.video-card--list .video-info {
  flex: 1;
  padding: 16px 20px;
}

.timeline-group {
  margin-bottom: 40px;
}

.group-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--secondary-color);
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
}

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--secondary-color);
}

.page-desc {
  font-size: 15px;
  color: #666;
}

.page--grid,
.page--with-sidebar,
.page--top,
.page--grouped {
  background: transparent;
}

.page--with-sidebar {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}

.layout__side--filters {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.layout__side--filters h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--secondary-color);
}

.filter-list {
  list-style: none;
}

.filter-list li {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  color: #666;
}

.filter-list li:hover {
  background: #f5f5f5;
  color: var(--primary-color);
}

.layout__main {
  min-width: 0;
}

.top-list__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-list__item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.top-list__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.top-list__rank {
  flex: 0 0 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  border-radius: 8px;
}

.top-list__link {
  flex: 1;
  display: flex;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.top-list__item .video-cover {
  flex: 0 0 160px;
  padding-top: 0;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
}

.top-list__item .video-info {
  flex: 1;
  padding: 0;
}

.detail-page {
  max-width: 1200px;
}

.video-player-section {
  margin-bottom: 32px;
}

.video-player {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

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

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

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

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

.title-section {
  margin-bottom: 24px;
}

.title-section h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--secondary-color);
}

.basic-info {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  gap: 12px;
}

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

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

.content-module {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.module-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--secondary-color);
}

.module-content p {
  font-size: 15px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 12px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  display: inline-block;
  padding: 6px 16px;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 14px;
  color: #666;
  transition: background 0.2s, color 0.2s;
}

.tag:hover {
  background: var(--primary-color);
  color: #fff;
}

.related-section {
  margin-top: 40px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.video-card--related {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card--related .video-title {
  font-size: 15px;
}

.site-footer {
  background: #fff;
  border-top: 1px solid var(--border-color);
  padding: 32px 0;
  margin-top: 60px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-text {
  color: #999;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  box-shadow: 0 4px 12px rgba(255, 62, 62, 0.3);
  z-index: 999;
}

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

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

@media (max-width: 768px) {
  .header-container {
    height: 56px;
  }

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

  .site-nav {
    gap: 16px;
    font-size: 14px;
  }

  .nav-link {
    font-size: 14px;
  }

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

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

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .group__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .page--with-sidebar {
    grid-template-columns: 1fr;
  }

  .layout__side--filters {
    position: static;
  }

  .video-card--list {
    flex-direction: column;
  }

  .video-card--list .video-cover {
    flex: 0 0 auto;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
  }

  .top-list__item {
    flex-wrap: wrap;
  }

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

  .top-list__item .video-cover {
    width: 100%;
    flex: 0 0 auto;
    padding-top: 56.25%;
    height: 0;
  }

  .video-info {
    padding: 12px;
  }

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

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

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

@media (max-width: 480px) {
  .site-nav {
    gap: 12px;
  }

  .main-content {
    padding: 24px 16px;
  }

  .video-grid,
  .group__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .video-card {
    border-radius: 8px;
  }

  .video-info {
    padding: 10px;
  }

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

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

  .player-play-btn {
    width: 60px;
    height: 60px;
  }

  .player-play-icon {
    font-size: 24px;
  }
}
