/* ===== 全局样式 ===== */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

body {
  font-size: 16px;
  overflow-x: hidden;
}

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

/* ===== 导航栏样式增强 ===== */
nav .nav-links a.active {
  background: rgba(255,255,255,0.25);
  font-weight: 600;
}

/* ===== 首页样式 ===== */
.home-main {
  min-height: calc(100vh - 200px);
}

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

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  opacity: 0.95;
}

.hero-tags {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.intro-section {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  margin: 30px 0;
  box-shadow: var(--shadow);
  line-height: 1.8;
}

.intro-section h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.intro-section p {
  color: var(--text-light);
  font-size: 1.05rem;
}

/* ===== 视频卡片区块 ===== */
.video-section {
  margin: 40px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary-color);
}

.section-header h2 {
  font-size: 1.8rem;
  color: var(--text-color);
}

.more-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.more-link:hover {
  color: var(--secondary-color);
  transform: translateX(4px);
}

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

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

.video-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.video-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--primary-color);
}

.video-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.video-card h3 a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.video-card h3 a:hover {
  color: var(--primary-color);
}

.video-card .meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.video-card .desc {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.video-card.compact h3 {
  font-size: 1.05rem;
}

/* ===== 列表样式 ===== */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-item {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.video-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateX(4px);
}

.video-item .rank {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 40px;
  text-align: center;
}

.video-item .item-content {
  flex: 1;
}

.video-item h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.video-item h3 a {
  color: var(--text-color);
  text-decoration: none;
}

.video-item h3 a:hover {
  color: var(--primary-color);
}

/* ===== 快速链接 ===== */
.quick-links {
  margin: 50px 0;
}

.quick-links h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  text-align: center;
  color: var(--text-color);
}

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

.quick-link-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 30px;
  border-radius: 12px;
  text-decoration: none;
  transition: var(--transition);
  text-align: center;
}

.quick-link-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.quick-link-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.quick-link-card p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ===== 列表页样式 ===== */
.list-main {
  min-height: calc(100vh - 200px);
  padding: 30px 0;
}

.page-header {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.page-header h1 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 16px;
  line-height: 1.3;
}

.page-header .intro {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-light);
}

.list-content {
  margin: 30px 0;
}

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

.video-card.full-info .genre {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin: 8px 0;
}

.video-card.ranked {
  position: relative;
  padding-left: 70px;
}

.rank-badge {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.topic-group {
  margin-bottom: 50px;
}

.topic-title {
  font-size: 1.6rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.video-card.topic-grouped h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.video-card.topic-grouped h4 a {
  color: var(--text-color);
  text-decoration: none;
}

.video-card.topic-grouped h4 a:hover {
  color: var(--primary-color);
}

.video-card.topic-grouped .tags {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 8px;
}

.video-card.latest-date .date {
  color: var(--secondary-color);
  font-size: 0.85rem;
  margin-top: 8px;
  font-weight: 600;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-4px);
}

/* ===== 详情页样式 ===== */
.detail-main {
  min-height: calc(100vh - 200px);
  padding: 30px 0;
}

.video-detail {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 50px 40px;
  text-align: center;
}

.detail-header h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.detail-header .subtitle {
  font-size: 1.15rem;
  opacity: 0.95;
  line-height: 1.6;
}

.video-detail section {
  padding: 40px;
  border-bottom: 1px solid var(--border-color);
}

.video-detail section:last-child {
  border-bottom: none;
}

.video-detail h2 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.basic-info .info-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px 24px;
  line-height: 1.8;
}

.basic-info dt {
  font-weight: 600;
  color: var(--text-color);
}

.basic-info dd {
  color: var(--text-light);
}

.summary-text,
.review-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-light);
  text-align: justify;
}

.review-text {
  background: #f9f9f9;
  padding: 24px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

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

.related-card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.related-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.related-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.related-card h3 a {
  color: var(--text-color);
  text-decoration: none;
}

.related-card h3 a:hover {
  color: var(--primary-color);
}

/* ===== 页脚 ===== */
footer {
  background: #2d3748;
  color: #a0aec0;
  padding: 30px 0;
  margin-top: 60px;
  text-align: center;
}

footer p {
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .hero {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .intro-section,
  .page-header,
  .video-detail section {
    padding: 24px;
  }

  .section-header h2,
  .quick-links h2,
  .page-header h1 {
    font-size: 1.5rem;
  }

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

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

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

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

  .detail-header h1 {
    font-size: 1.8rem;
  }

  .basic-info .info-list {
    grid-template-columns: 80px 1fr;
    gap: 12px 16px;
  }

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

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

  .rank-badge {
    font-size: 1.5rem;
    left: 16px;
  }

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

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .video-grid.compact {
    grid-template-columns: 1fr;
  }

  .hero-tags {
    flex-direction: column;
    align-items: center;
  }

  .tag {
    width: 100%;
    text-align: center;
  }
}

/* ===== UI样式变体 (0-15) ===== */
.ui-style-0 { --primary-color: #667eea; --secondary-color: #764ba2; }
.ui-style-1 { --primary-color: #f093fb; --secondary-color: #f5576c; }
.ui-style-2 { --primary-color: #4facfe; --secondary-color: #00f2fe; }
.ui-style-3 { --primary-color: #43e97b; --secondary-color: #38f9d7; }
.ui-style-4 { --primary-color: #fa709a; --secondary-color: #fee140; }
.ui-style-5 { --primary-color: #30cfd0; --secondary-color: #330867; }
.ui-style-6 { --primary-color: #a8edea; --secondary-color: #fed6e3; }
.ui-style-7 { --primary-color: #ff6a00; --secondary-color: #ee0979; }
.ui-style-8 { --primary-color: #f857a6; --secondary-color: #ff5858; }
.ui-style-9 { --primary-color: #2196f3; --secondary-color: #f44336; }
.ui-style-10 { --primary-color: #00d2ff; --secondary-color: #3a47d5; }
.ui-style-11 { --primary-color: #f7971e; --secondary-color: #ffd200; }
.ui-style-12 { --primary-color: #56ab2f; --secondary-color: #a8e063; }
.ui-style-13 { --primary-color: #ed213a; --secondary-color: #93291e; }
.ui-style-14 { --primary-color: #06beb6; --secondary-color: #48b1bf; }
.ui-style-15 { --primary-color: #eb3349; --secondary-color: #f45c43; }
