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

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: #333;
  background: #f5f5f5;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

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

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

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

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

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

.nav-link {
  color: #666;
  transition: color 0.3s;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
  color: #e74c3c;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 60px 30px;
  border-radius: 12px;
  margin-bottom: 40px;
  text-align: center;
}

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

.hero-description {
  font-size: 16px;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0.95;
}

/* Video Sections */
.video-section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
}

.section-more {
  color: #e74c3c;
  font-size: 14px;
  transition: transform 0.3s;
}

.section-more:hover {
  transform: translateX(5px);
}

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

.video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card__link {
  display: block;
}

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #ddd;
}

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

.video-cover__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-card:hover .video-cover__overlay {
  opacity: 1;
}

.play-icon {
  font-size: 48px;
  color: #fff;
}

.video-info {
  padding: 15px;
}

.video-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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;
}

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

/* List Pages */
.page-header {
  margin-bottom: 30px;
}

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

.page-description {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
}

.filter-bar {
  margin-bottom: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
}

.filter-label {
  font-weight: bold;
}

/* L2 Sidebar Layout */
.page--with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
}

.layout__side--filters {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.layout__side--filters h3 {
  margin-bottom: 15px;
}

/* L3 Top List */
.top-list__items {
  list-style: none;
}

.top-list__item {
  background: #fff;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.top-rank {
  flex-shrink: 0;
}

.rank-badge {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background: #ddd;
  font-weight: bold;
  font-size: 18px;
}

.rank-badge.rank-gold {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.top-cover {
  flex-shrink: 0;
  width: 120px;
}

.top-cover img {
  border-radius: 4px;
}

.top-info {
  flex: 1;
}

.top-title {
  font-size: 18px;
  margin-bottom: 10px;
}

.top-title a {
  color: #333;
  transition: color 0.3s;
}

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

.top-one-line {
  color: #666;
  margin-bottom: 10px;
  line-height: 1.5;
}

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

/* L4 Grouped */
.group {
  margin-bottom: 40px;
}

.group__title {
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e74c3c;
}

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

/* Detail Page */
.detail-page {
  max-width: 900px;
}

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

.video-player {
  background: #000;
  border-radius: 8px;
  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;
  transition: transform 0.3s, background 0.3s;
}

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

.player-play-icon {
  font-size: 32px;
  color: #333;
}

.detail-header {
  margin-bottom: 30px;
}

.detail-header h1 {
  font-size: 32px;
  line-height: 1.4;
}

.detail-module {
  background: #fff;
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.detail-module h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #333;
}

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

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

.info-label {
  font-weight: bold;
  color: #666;
}

.info-value {
  color: #333;
}

.highlight-text {
  font-size: 18px;
  line-height: 1.8;
  color: #e74c3c;
  font-weight: 500;
}

.review-text {
  line-height: 1.8;
  color: #555;
}

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

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

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

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

/* Footer */
.site-footer {
  background: #333;
  color: #fff;
  padding: 30px 20px;
  margin-top: 60px;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
}

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

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

/* UI Style Variations */
.ui-style-0 .hero-section {
  background: linear-gradient(135deg, #000 0%, #333 100%);
}

.ui-style-1 .hero-section {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.ui-style-2 .hero-section {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.ui-style-3 .hero-section {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.ui-style-4 .hero-section {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

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

.ui-style-6 .hero-section {
  background: linear-gradient(135deg, #0f2027 0%, #2c5364 100%);
}

.ui-style-7 .hero-section {
  background: linear-gradient(135deg, #141e30 0%, #243b55 100%);
}

.ui-style-8 .hero-section {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.ui-style-9 .hero-section {
  background: linear-gradient(135deg, #000 0%, #434343 100%);
}

.ui-style-10 .hero-section {
  background: linear-gradient(135deg, #00C75A 0%, #00e068 100%);
}

.ui-style-11 .hero-section {
  background: linear-gradient(135deg, #0099FF 0%, #00d4ff 100%);
}

.ui-style-12 .hero-section {
  background: linear-gradient(135deg, #FF6700 0%, #ff8533 100%);
}

.ui-style-13 .hero-section {
  background: linear-gradient(135deg, #00A1D6 0%, #FB7299 100%);
}

.ui-style-14 .hero-section {
  background: linear-gradient(135deg, #1a237e 0%, #0277bd 100%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    height: auto;
    padding: 10px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-around;
    gap: 10px;
    font-size: 13px;
  }

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

  .hero-description {
    font-size: 14px;
  }

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

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

  .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%;
    max-width: 200px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}