/* 全站样式 - UI Style 10 - Layout G */

:root {
  --primary-color: #2c5f8d;
  --secondary-color: #4a8cc7;
  --accent-color: #f39c12;
  --bg-color: #f8f9fa;
  --text-color: #2c3e50;
  --border-color: #dce4ec;
  --hover-color: #1a4971;
  --card-bg: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

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

/* 顶部导航 */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  flex-wrap: nowrap;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 20px;
}

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

.nav-list {
  display: flex;
  list-style: none;
  gap: 10px;
  flex-wrap: nowrap;
}

.nav-list li {
  flex: 0 0 auto;
}

.nav-list a {
  color: #ffffff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s;
  white-space: nowrap;
  display: block;
}

.nav-list a:hover {
  background-color: var(--hover-color);
}

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

.page-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.page-intro {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
  line-height: 1.8;
  font-size: 16px;
}

.section {
  margin-bottom: 50px;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent-color);
}

.section-desc {
  color: #666;
  margin-bottom: 20px;
  font-size: 14px;
}

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

.video-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

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

.video-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
  text-decoration: none;
  display: block;
}

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

.video-meta span {
  background: var(--bg-color);
  padding: 3px 10px;
  border-radius: 3px;
}

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

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

.list-item {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

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

.list-item-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.rank-number {
  background: var(--accent-color);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
}

/* 详情页 */
.detail-container {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.detail-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 8px;
}

.meta-item {
  display: flex;
  gap: 10px;
}

.meta-label {
  font-weight: bold;
  color: var(--primary-color);
}

.meta-value {
  color: #555;
}

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

.detail-section h2 {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.detail-text {
  line-height: 1.8;
  font-size: 16px;
  color: #444;
}

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

.tag {
  background: var(--secondary-color);
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
}

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

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

/* 页脚 */
footer {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
}

footer p {
  margin: 5px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
  }

  .logo {
    text-align: center;
    margin-bottom: 10px;
    margin-right: 0;
    font-size: 20px;
  }

  nav {
    width: 100%;
    justify-content: center;
  }

  .nav-list {
    width: 100%;
    justify-content: space-between;
    gap: 0;
    flex-wrap: nowrap;
  }

  .nav-list li {
    flex: 1 1 0;
    min-width: 0;
  }

  .nav-list a {
    padding: 6px 4px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-title {
    font-size: 24px;
  }

  .page-intro {
    padding: 20px;
  }

  .detail-container {
    padding: 20px;
  }

  .detail-title {
    font-size: 28px;
  }

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

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

  .page-title {
    font-size: 20px;
  }

  .detail-title {
    font-size: 24px;
  }
}
