/* 基础样式与布局 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #e74c3c;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
}

.nav a {
  padding: 8px 15px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
  white-space: nowrap;
  font-size: 15px;
}

.nav a:hover {
  color: #e74c3c;
  background: #f8f9fa;
  border-radius: 4px;
}

/* 移动端导航 */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: nowrap;
    padding: 12px 10px;
  }
  
  .logo {
    font-size: 18px;
    flex-shrink: 0;
  }
  
  .nav {
    flex: 1;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
  }
  
  .nav a {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 8px;
    font-size: 13px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 16px;
  }
  
  .nav a {
    padding: 5px 4px;
    font-size: 11px;
  }
}

/* 主要内容区 */
.main {
  padding: 30px 0;
}

.page-title {
  font-size: 28px;
  margin-bottom: 20px;
  color: #2c3e50;
}

.intro-section {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  line-height: 1.8;
}

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

.section-title {
  font-size: 22px;
  margin-bottom: 20px;
  color: #2c3e50;
  border-left: 4px solid #e74c3c;
  padding-left: 12px;
}

/* 视频卡片 */
.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;
  border: 1px solid #e0e0e0;
}

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

.video-card-content {
  padding: 15px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2c3e50;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.video-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-link {
  display: inline-block;
  margin-top: 10px;
  color: #e74c3c;
  text-decoration: none;
  font-size: 14px;
}

.video-link:hover {
  text-decoration: underline;
}

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

.video-list-item {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s;
}

.video-list-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-color: #e74c3c;
}

.list-item-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2c3e50;
}

.list-item-meta {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 12px;
}

.list-item-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 10px;
}

/* 详情页 */
.detail-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 40px 0;
  margin-bottom: 30px;
}

.detail-title {
  font-size: 32px;
  margin-bottom: 15px;
}

.detail-meta {
  font-size: 15px;
  opacity: 0.9;
}

.detail-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 25px;
}

.detail-section {
  margin-bottom: 25px;
}

.detail-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #2c3e50;
  border-left: 4px solid #e74c3c;
  padding-left: 12px;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  background: #f1f3f5;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #495057;
}

/* 排名序号 */
.rank-number {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: #e74c3c;
  color: #fff;
  border-radius: 4px;
  font-weight: bold;
  margin-right: 10px;
  font-size: 14px;
}

.rank-item {
  display: flex;
  align-items: center;
}

/* 页脚 */
.footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 30px 0;
  margin-top: 50px;
  text-align: center;
}

.footer p {
  margin: 5px 0;
  font-size: 14px;
}

/* UI 风格变体 */
body.ui-style-0 { --primary-color: #e74c3c; }
body.ui-style-1 { --primary-color: #3498db; }
body.ui-style-2 { --primary-color: #2ecc71; }
body.ui-style-3 { --primary-color: #f39c12; }
body.ui-style-4 { --primary-color: #9b59b6; }
body.ui-style-5 { --primary-color: #1abc9c; }
body.ui-style-6 { --primary-color: #e67e22; }
body.ui-style-7 { --primary-color: #34495e; }
body.ui-style-8 { --primary-color: #c0392b; }
body.ui-style-9 { --primary-color: #16a085; }
body.ui-style-10 { --primary-color: #27ae60; }
body.ui-style-11 { --primary-color: #2980b9; }
body.ui-style-12 { --primary-color: #8e44ad; }
body.ui-style-13 { --primary-color: #d35400; }
body.ui-style-14 { --primary-color: #c0392b; }
body.ui-style-15 { --primary-color: #7f8c8d; }

/* 响应式 */
@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
  }
  
  .section-title {
    font-size: 20px;
  }
  
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
  }
  
  .detail-title {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 15px;
  }
  
  .detail-content {
    padding: 20px;
  }
}
