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

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

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

a:hover {
  color: #1a3d7a;
}

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

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

.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: #2c5aa0;
}

nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  margin-left: 20px;
}

nav a {
  padding: 8px 15px;
  white-space: nowrap;
}

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

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

h1 {
  font-size: 28px;
  color: #222;
  margin-bottom: 20px;
  line-height: 1.3;
}

h2 {
  font-size: 22px;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2c5aa0;
}

h3 {
  font-size: 18px;
  color: #444;
  margin-bottom: 10px;
}

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

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

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

.video-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #2c5aa0;
}

.video-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

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

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 12px;
  color: #555;
}

.video-summary {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin: 12px 0;
  max-height: 4.8em;
  overflow: hidden;
}

/* 详情页 */
.detail-header {
  margin-bottom: 30px;
}

.detail-info {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 6px;
  margin: 20px 0;
}

.info-row {
  display: flex;
  margin-bottom: 12px;
  font-size: 15px;
}

.info-label {
  font-weight: bold;
  color: #555;
  min-width: 80px;
}

.info-value {
  color: #333;
}

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

.detail-content p {
  margin-bottom: 15px;
  line-height: 1.8;
}

/* 相关推荐 */
.related-videos {
  margin-top: 40px;
}

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

.related-card {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  transition: all 0.3s;
}

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

/* 页脚 */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

/* 响应式 - 移动端 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    padding: 10px;
  }

  .logo {
    font-size: 20px;
    margin-bottom: 10px;
  }

  nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-left: 0;
    overflow: hidden;
  }

  nav a {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 6px 4px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  section {
    padding: 20px 15px;
  }

  .video-list {
    grid-template-columns: 1fr;
    gap: 15px;
  }

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

@media (max-width: 480px) {
  nav a {
    font-size: 12px;
    padding: 6px 2px;
  }
}
