
/* 基础重置与全局样式 */
* {
  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;
}

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #1d4ed8;
}

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

/* 顶部导航 */
header {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  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: #1e40af;
}

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

nav a {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.2s;
}

nav a:hover {
  background: #f0f0f0;
}

/* 主内容区 */
main {
  min-height: calc(100vh - 200px);
  padding: 30px 0;
}

/* 页面标题 */
.page-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: #1e293b;
}

/* 简介区块 */
.intro-section {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  line-height: 1.8;
}

/* 内容区块 */
.content-section {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #1e293b;
  border-left: 4px solid #2563eb;
  padding-left: 12px;
}

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

.video-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.video-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #1e293b;
}

.video-meta {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}

.video-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-top: 10px;
}

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

.video-list-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 20px;
  transition: background 0.2s;
}

.video-list-item:hover {
  background: #f9fafb;
}

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

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 16px;
}

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

.info-item {
  background: #f8fafc;
  padding: 15px;
  border-radius: 6px;
  border-left: 3px solid #2563eb;
}

.info-label {
  font-weight: bold;
  color: #475569;
  margin-bottom: 5px;
}

.info-value {
  color: #1e293b;
}

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

.tag {
  background: #e0e7ff;
  color: #3730a3;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
}

.text-block {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 25px;
  line-height: 1.8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.text-block h2 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #1e293b;
}

/* 相关推荐 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.related-card {
  background: #f8fafc;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.related-card:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #1e293b;
}

.related-card p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

/* 页脚 */
footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 30px 0;
  text-align: center;
  margin-top: 50px;
}

/* 响应式 - 移动端单行导航 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
    padding: 12px 15px;
  }
  
  .logo {
    font-size: 20px;
  }
  
  nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0;
    overflow: visible;
  }
  
  nav a {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 13px;
    padding: 6px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-title {
    font-size: 28px;
  }
  
  .detail-meta {
    font-size: 14px;
    gap: 10px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  nav a {
    font-size: 12px;
    padding: 5px 2px;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .intro-section,
  .content-section,
  .text-block {
    padding: 20px 15px;
  }
}

/* UI Style 2 特定样式 */
body.ui-style-2 {
  /* 可根据不同 UI_INDEX 添加特定样式 */
}
