/* 全局样式 */
* {
  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-color: #f5f5f5;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0052a3;
}

/* 导航栏 */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  margin-bottom: 1rem;
  display: block;
  text-align: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.main-nav li {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.main-nav a {
  color: white;
  padding: 0.5rem 0.3rem;
  display: block;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}

.main-nav a:hover {
  background-color: rgba(255,255,255,0.2);
  color: white;
}

/* 移动端导航优化 */
@media (max-width: 768px) {
  .logo {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .main-nav ul {
    gap: 0.2rem;
  }

  .main-nav a {
    padding: 0.4rem 0.2rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .main-nav a {
    font-size: 0.7rem;
    padding: 0.3rem 0.1rem;
  }
}

/* 主内容区 */
.main-content {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}

.page-title {
  font-size: 2rem;
  color: #222;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #667eea;
}

.section {
  background: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.section-title {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 1rem;
  padding-left: 12px;
  border-left: 4px solid #667eea;
}

.section-desc {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

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

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

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

.video-card-content {
  padding: 1.2rem;
}

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

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

.video-meta span {
  background: #f0f0f0;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.video-desc {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.tag {
  background: #e8eaf6;
  color: #5c6bc0;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* 视频列表 */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.video-list-item {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}

.video-list-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* 详情页 */
.video-detail {
  background: white;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.detail-title {
  font-size: 2.2rem;
  color: #222;
  margin-bottom: 1.5rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.meta-item {
  display: flex;
  gap: 0.5rem;
}

.meta-label {
  font-weight: 600;
  color: #555;
}

.meta-value {
  color: #666;
}

.detail-section {
  margin-bottom: 2rem;
}

.detail-section h2 {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 1rem;
  padding-left: 12px;
  border-left: 4px solid #667eea;
}

.detail-section p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 0.8rem;
}

/* 相关推荐 */
.related-videos {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #eee;
}

/* 响应式 */
@media (max-width: 768px) {
  .main-content {
    padding: 0 15px;
    margin: 1rem auto;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .section {
    padding: 1.5rem;
  }

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

  .video-detail {
    padding: 1.5rem;
  }

  .detail-title {
    font-size: 1.6rem;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}

/* UI风格变体 */
body.ui-style-0 { --primary-color: #667eea; --secondary-color: #764ba2; }
body.ui-style-1 { --primary-color: #f093fb; --secondary-color: #f5576c; }
body.ui-style-2 { --primary-color: #4facfe; --secondary-color: #00f2fe; }
body.ui-style-3 { --primary-color: #43e97b; --secondary-color: #38f9d7; }
body.ui-style-4 { --primary-color: #fa709a; --secondary-color: #fee140; }
body.ui-style-5 { --primary-color: #30cfd0; --secondary-color: #330867; }
body.ui-style-6 { --primary-color: #a8edea; --secondary-color: #fed6e3; }
body.ui-style-7 { --primary-color: #ff9a56; --secondary-color: #ff6a88; }
body.ui-style-8 { --primary-color: #f8b500; --secondary-color: #fceabb; }
body.ui-style-9 { --primary-color: #667db6; --secondary-color: #0082c8; }
body.ui-style-10 { --primary-color: #e0c3fc; --secondary-color: #8ec5fc; }
body.ui-style-11 { --primary-color: #f77062; --secondary-color: #fe5196; }
body.ui-style-12 { --primary-color: #21d4fd; --secondary-color: #b721ff; }
body.ui-style-13 { --primary-color: #08aeea; --secondary-color: #2af598; }
body.ui-style-14 { --primary-color: #fbc2eb; --secondary-color: #a6c1ee; }
body.ui-style-15 { --primary-color: #fdcbf1; --secondary-color: #e6dee9; }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: white;
}

/* 分组标题 */
.group-title {
  font-size: 1.2rem;
  color: #555;
  margin: 2rem 0 1rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid #eee;
}

/* 排名序号 */
.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.9rem;
  margin-right: 0.8rem;
}

.rank-number.top3 {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 日期标签 */
.date-tag {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}
