/* Global Styles */
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Container & Layout */
.main {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 32px;
  margin-bottom: 40px;
}

/* Typography */
h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.3;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  color: #2c2c2c;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

p {
  margin-bottom: 12px;
  color: #555;
  line-height: 1.8;
}

/* Intro Section */
.intro-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 48px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.intro-section h1 {
  color: #fff;
  font-size: 36px;
  margin-bottom: 20px;
}

.intro-text {
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255,255,255,0.95);
}

/* Sections */
.hot-section,
.latest-section,
.topic-section {
  margin-bottom: 48px;
}

.section-desc {
  color: #666;
  font-size: 15px;
  margin-bottom: 24px;
}

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

.video-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

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

.video-card h3 {
  margin-bottom: 8px;
}

.video-card h3 a {
  color: #1a1a1a;
  transition: color 0.2s;
}

.video-card h3 a:hover {
  color: #667eea;
  text-decoration: none;
}

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

.video-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* More Link */
.more-link {
  text-align: center;
  margin-top: 24px;
}

.more-link a {
  display: inline-block;
  padding: 10px 32px;
  background: #667eea;
  color: #fff;
  border-radius: 24px;
  transition: background 0.3s;
  text-decoration: none;
}

.more-link a:hover {
  background: #5568d3;
  text-decoration: none;
}

/* Topic Links */
.topic-links {
  list-style: none;
  padding: 0;
}

.topic-links li {
  margin-bottom: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  transition: all 0.3s;
}

.topic-links li:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.topic-links a {
  font-size: 16px;
  color: #333;
  display: block;
}

/* List Pages */
.list-page {
  padding-top: 20px;
}

.page-desc {
  font-size: 15px;
  color: #666;
  margin-bottom: 32px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #667eea;
}

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

.video-item {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s;
  position: relative;
}

.video-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 16px rgba(102,126,234,0.15);
}

.video-item.ranked {
  padding-left: 80px;
}

.rank-num {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  font-weight: 700;
  color: #667eea;
  width: 40px;
  text-align: center;
}

.video-item.ranked .rank-num:nth-of-type(1) {
  color: #ffd700;
}

.video-item.dated .date-tag {
  display: inline-block;
  background: #667eea;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 8px;
}

.video-item.grouped .tags {
  margin-top: 8px;
  font-size: 13px;
  color: #888;
}

.item-content h3 {
  margin-bottom: 8px;
}

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

.detail-page h1 {
  font-size: 36px;
  margin-bottom: 32px;
  color: #1a1a1a;
  padding-bottom: 16px;
  border-bottom: 3px solid #667eea;
}

.detail-page section {
  margin-bottom: 36px;
  padding: 24px;
  background: #fafafa;
  border-radius: 8px;
}

.basic-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px 24px;
}

.basic-info dt {
  font-weight: 600;
  color: #333;
}

.basic-info dd {
  color: #666;
  margin: 0;
}

.one-line p {
  font-size: 18px;
  line-height: 1.6;
  color: #667eea;
  font-weight: 500;
}

.summary p,
.review p {
  font-size: 15px;
  line-height: 1.9;
  color: #444;
  white-space: pre-wrap;
}

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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
  z-index: 999;
}

.back-to-top:hover {
  background: #5568d3;
  transform: translateY(-4px);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .main {
    padding: 20px 16px;
    margin: 10px;
    border-radius: 6px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .intro-section {
    padding: 24px 20px;
    margin-bottom: 24px;
  }

  .intro-section h1 {
    font-size: 24px;
  }

  .intro-text {
    font-size: 14px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .video-card {
    padding: 16px;
  }

  .hot-section,
  .latest-section,
  .topic-section {
    margin-bottom: 32px;
  }

  .video-item {
    padding: 16px;
  }

  .video-item.ranked {
    padding-left: 60px;
  }

  .rank-num {
    left: 16px;
    font-size: 24px;
    width: 32px;
  }

  .detail-page h1 {
    font-size: 26px;
  }

  .detail-page section {
    padding: 16px;
  }

  .basic-info dl {
    grid-template-columns: 80px 1fr;
    gap: 8px 12px;
    font-size: 14px;
  }

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

@media (max-width: 480px) {
  .video-item.ranked {
    padding-left: 16px;
    padding-top: 48px;
  }

  .rank-num {
    left: 16px;
    top: 16px;
    transform: none;
  }
}

/* UI Style Variants */
.ui-style-0 { --theme-color: #667eea; }
.ui-style-1 { --theme-color: #f093fb; }
.ui-style-2 { --theme-color: #4facfe; }
.ui-style-3 { --theme-color: #43e97b; }
.ui-style-4 { --theme-color: #fa709a; }
.ui-style-5 { --theme-color: #30cfd0; }
.ui-style-6 { --theme-color: #a8edea; }
.ui-style-7 { --theme-color: #ff9a9e; }
.ui-style-8 { --theme-color: #fbc2eb; }
.ui-style-9 { --theme-color: #fdcbf1; }
.ui-style-10 { --theme-color: #e0c3fc; }
.ui-style-11 { --theme-color: #8ec5fc; }
.ui-style-12 { --theme-color: #ffecd2; }
.ui-style-13 { --theme-color: #d299c2; }
.ui-style-14 { --theme-color: #89f7fe; }
.ui-style-15 { --theme-color: #c471f5; }
