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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
}

.logo a {
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.main-nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.main-nav a {
  padding: 10px 15px;
  text-decoration: none;
  color: #666;
  transition: color 0.3s;
  flex-shrink: 0;
}

.main-nav a:hover,
.main-nav a.active {
  color: #007bff;
}

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

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.hero-title {
  font-size: 32px;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 18px;
  opacity: 0.9;
}

.intro-section {
  background: white;
  padding: 40px 20px;
  margin: 20px 0;
}

.intro-section h2 {
  margin-bottom: 15px;
}

.video-section {
  margin: 40px 0;
}

.section-title {
  font-size: 28px;
  margin-bottom: 20px;
  padding: 0 20px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 20px;
}

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

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

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

.video-info {
  padding: 15px;
}

.video-title {
  font-size: 18px;
  margin-bottom: 8px;
  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: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 12px;
  color: #999;
}

.page-header {
  background: white;
  padding: 40px 20px;
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.page-header p {
  color: #666;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
}

.layout__side--filters {
  background: white;
  padding: 20px;
  border-radius: 8px;
  height: fit-content;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group h4 {
  margin-bottom: 10px;
}

.top-list__items {
  list-style: none;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.top-item {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  gap: 20px;
}

.top-item:last-child {
  border-bottom: none;
}

.top-rank {
  font-size: 32px;
  font-weight: bold;
  color: #007bff;
  min-width: 50px;
  text-align: center;
}

.top-cover {
  width: 120px;
  height: 68px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.top-info {
  flex: 1;
}

.top-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.top-title a {
  text-decoration: none;
  color: #333;
}

.top-title a:hover {
  color: #007bff;
}

.top-desc {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.top-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #999;
}

.group {
  margin-bottom: 40px;
}

.group__title {
  font-size: 24px;
  margin-bottom: 20px;
  padding: 0 20px;
}

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 20px;
}

.video-player-section {
  background: #000;
  padding: 20px 0;
}

.video-player {
  max-width: 900px;
  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;
  border-radius: 50%;
  border: 3px solid white;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s;
}

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

.detail-header {
  padding: 30px 0 20px;
}

.detail-header h1 {
  font-size: 36px;
}

.detail-info,
.detail-module,
.related-section {
  background: white;
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.detail-info h2,
.detail-module h2,
.related-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  border-left: 4px solid #007bff;
  padding-left: 15px;
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
}

.info-list dt {
  font-weight: bold;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 5px 15px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 14px;
}

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

.site-footer {
  background: #333;
  color: white;
  padding: 30px 0;
  text-align: center;
  margin-top: 60px;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

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

.back-to-top:hover {
  background: #0056b3;
  transform: translateY(-5px);
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 10px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .main-nav a {
    font-size: 14px;
    padding: 8px 12px;
  }

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

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

  .video-grid,
  .group__grid,
  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

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

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

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

  .top-cover {
    width: 100%;
    height: auto;
    padding-top: 56.25%;
    position: relative;
  }

  .top-cover img {
    position: absolute;
    top: 0;
    left: 0;
  }

  .detail-header h1 {
    font-size: 28px;
  }

  .detail-info,
  .detail-module,
  .related-section {
    padding: 20px;
  }
}

.ui-style-5 {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
}

.ui-style-5 .hero-section {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.ui-style-5 .main-nav a.active,
.ui-style-5 .main-nav a:hover {
  color: var(--primary-color);
}
