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

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

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

.main-nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.nav-links {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-links a {
  text-decoration: none;
  color: #666;
  transition: color 0.3s;
  white-space: nowrap;
}

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

.home-main,
.list-main,
.detail-main {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 4rem 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  text-align: center;
}

.hero-section h1 {
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.4;
}

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

.site-intro p {
  line-height: 1.8;
  color: #555;
}

.video-module {
  margin-bottom: 3rem;
}

.module-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #007bff;
}

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

.video-card {
  background: #fff;
  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(-4px);
  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;
  padding-top: 56.25%;
  overflow: hidden;
  background: #eee;
}

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

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.page-header {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

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

.top-list__items {
  list-style: none;
}

.top-list__item {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.top-cover {
  flex-shrink: 0;
  width: 150px;
  height: 100px;
  overflow: hidden;
  border-radius: 6px;
}

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

.top-info {
  flex: 1;
}

.top-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

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

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

.top-meta {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.top-desc {
  color: #666;
  font-size: 0.95rem;
}

.page--with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

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

.layout__side--filters h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.group {
  margin-bottom: 3rem;
}

.group__title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #007bff;
}

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

.video-player-section {
  margin-bottom: 2rem;
}

.video-player {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.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;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s;
}

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

.player-play-icon {
  font-size: 2rem;
  color: #333;
}

.video-header {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.video-header h1 {
  font-size: 2rem;
}

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

.video-basic-info h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}

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

.info-list dd {
  color: #333;
}

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

.detail-module h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #333;
}

.detail-module p {
  line-height: 1.8;
  color: #555;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 20px;
  font-size: 0.9rem;
}

.related-videos {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.related-videos h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.site-footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

.site-footer p {
  margin: 0;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 999;
}

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

.back-to-top:hover {
  background: #0056b3;
}

.ui-style-6 {
  --primary-color: #764ba2;
  --secondary-color: #667eea;
}

.ui-style-6 .hero-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

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

.ui-style-6 .module-title {
  border-bottom-color: var(--primary-color);
}

.ui-style-6 .top-rank {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .main-nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    overflow-x: auto;
  }

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

  .nav-links a {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
  }

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

  .hero-section h1 {
    font-size: 1.5rem;
  }

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

  .layout__side--filters {
    position: static;
  }

  .top-list__item {
    flex-direction: column;
    text-align: center;
  }

  .top-cover {
    width: 100%;
    height: 150px;
  }

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

  .video-info {
    min-height: 100px;
  }

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

  .player-play-icon {
    font-size: 1.5rem;
  }

  .home-main,
  .list-main,
  .detail-main {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .video-grid,
  .related-grid,
  .group__grid {
    grid-template-columns: 1fr;
  }

  .nav-links a {
    font-size: 0.85rem;
  }
}
