/* 全站样式 - UI Style 13, Layout F */

:root {
  --primary-color: #2c5282;
  --secondary-color: #e53e3e;
  --accent-color: #38a169;
  --bg-color: #f7fafc;
  --text-color: #2d3748;
  --border-color: #e2e8f0;
  --hover-color: #4299e1;
  --card-bg: #ffffff;
}

* {
  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: var(--text-color);
  background: var(--bg-color);
}

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

/* 顶部导航 */
header {
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

nav a {
  display: block;
  padding: 8px 16px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
  white-space: nowrap;
}

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

/* 主内容区 */
main {
  padding: 40px 0;
  min-height: 60vh;
}

h1 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--primary-color);
  line-height: 1.3;
}

h2 {
  font-size: 26px;
  margin: 30px 0 20px;
  color: var(--primary-color);
}

h3 {
  font-size: 20px;
  margin: 20px 0 12px;
  color: var(--text-color);
}

/* 卡片样式 */
.card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.card-meta {
  font-size: 14px;
  color: #718096;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-color);
}

/* 列表网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 30px 0;
}

/* 详情页 */
.detail-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
  color: white;
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 30px;
}

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

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

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

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

.detail-section {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.detail-section h2 {
  margin-top: 0;
}

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: #edf2f7;
  color: var(--text-color);
  border-radius: 16px;
  font-size: 14px;
}

/* 推荐列表 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

/* 底部 */
footer {
  background: var(--card-bg);
  padding: 30px 0;
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: #718096;
}

/* 响应式 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
  }

  nav ul {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  nav a {
    padding: 6px 8px;
    font-size: 14px;
    text-overflow: ellipsis;
    overflow: hidden;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }

  .logo {
    font-size: 20px;
  }

  h1 {
    font-size: 24px;
  }

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

  .detail-header {
    padding: 24px;
  }

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

  .detail-section {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  nav a {
    padding: 6px 4px;
    font-size: 13px;
  }
}

/* Section样式 */
section {
  margin: 40px 0;
}

.intro-section {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  line-height: 1.8;
}

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

.rank-number {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  margin-right: 10px;
  font-weight: bold;
}

.date-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-color);
  color: white;
  border-radius: 4px;
  font-size: 13px;
  margin-right: 8px;
}
