/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

a {
  color: #2c5aa0;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1a3d6f;
}

/* 头部导航 */
.site-header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.site-nav a {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s ease;
  white-space: nowrap;
}

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

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

.page-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #1e3c72;
}

/* 区块样式 */
.section {
  background: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1e3c72;
  border-left: 4px solid #2a5298;
  padding-left: 1rem;
}

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

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

.video-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.video-card-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #1e3c72;
}

.video-card-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.video-card-meta span {
  margin-right: 0.8rem;
}

.video-card-desc {
  font-size: 0.9rem;
  color: #777;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 列表样式 */
.video-list {
  list-style: none;
}

.video-list-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

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

.video-list-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #1e3c72;
}

.video-list-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.8rem;
}

.video-list-summary {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
}

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

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

.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: 6px;
}

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

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

.detail-meta-value {
  color: #333;
}

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

.detail-section-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #1e3c72;
  border-left: 4px solid #2a5298;
  padding-left: 1rem;
}

.detail-section-content {
  line-height: 1.8;
  color: #444;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #e8f0fe;
  color: #2a5298;
  border-radius: 16px;
  font-size: 0.9rem;
}

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

.related-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  transition: all 0.3s ease;
}

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

.related-card-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #1e3c72;
}

.related-card-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

/* 页脚 */
.site-footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .site-header {
    padding: 0.8rem 1rem;
  }

  .header-container {
    flex-direction: column;
    align-items: stretch;
  }

  .site-logo {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .site-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    gap: 0;
  }

  .site-nav a {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5rem 0.3rem;
    text-align: center;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .section {
    padding: 1.5rem;
  }

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

  .detail-container {
    padding: 1.5rem;
  }

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

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

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

@media (max-width: 480px) {
  .site-nav a {
    font-size: 0.75rem;
    padding: 0.4rem 0.2rem;
  }
}

/* UI 风格变体 */
body.ui-style-15 {
  --primary-color: #1e3c72;
  --secondary-color: #2a5298;
  --accent-color: #4a7cc7;
}
