/* 全局样式 */
:root {
  --primary-color: #e63946;
  --secondary-color: #f1faee;
  --text-color: #1d3557;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.8;
  font-size: 16px;
}

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

/* 头部导航 */
header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--primary-color);
}

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

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: transform 0.3s;
}

.logo:hover {
  transform: scale(1.05);
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  gap: 8px;
}

.main-nav li {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.main-nav a {
  display: block;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav .active a {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

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

/* 首页英雄区 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 40px;
  border-radius: var(--radius);
  margin-bottom: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.hero .intro {
  font-size: 18px;
  opacity: 0.95;
  max-width: 900px;
  margin: 0 auto;
}

/* 站点介绍 */
.site-intro {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius);
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
}

.site-intro h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 24px;
}

.site-intro p {
  color: #555;
  line-height: 2;
}

/* 列表区块 */
.list-section {
  margin-bottom: 50px;
}

.list-section h2 {
  font-size: 28px;
  color: var(--text-color);
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
}

/* 视频网格卡片 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 20px;
}

.video-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border-top: 3px solid transparent;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-top-color: var(--primary-color);
}

.video-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.video-card h3 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.video-card h3 a:hover {
  color: var(--primary-color);
}

.video-card .meta {
  color: #777;
  font-size: 14px;
  margin-bottom: 12px;
}

.video-card .desc {
  color: #666;
  line-height: 1.6;
  font-size: 15px;
}

/* 更多链接 */
.more-link {
  text-align: center;
  margin-top: 20px;
}

.more-link a {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.3s;
  font-weight: 600;
}

.more-link a:hover {
  background: #d62839;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

/* 快速链接 */
.quick-links {
  text-align: center;
  padding: 30px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-links a {
  color: var(--primary-color);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 500;
  transition: color 0.3s;
}

.quick-links a:hover {
  color: #d62839;
  text-decoration: underline;
}

/* 列表页样式 */
.page-intro {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--radius);
  margin: 20px 0 40px;
  box-shadow: var(--shadow);
  font-size: 17px;
  line-height: 1.8;
  color: #555;
  border-left: 4px solid var(--primary-color);
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.video-item {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s;
  position: relative;
  border-left: 4px solid transparent;
}

.video-item:hover {
  transform: translateX(5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-left-color: var(--primary-color);
}

.rank-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
}

.video-item h2 {
  margin-bottom: 15px;
  font-size: 24px;
}

.video-item h2 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.video-item h2 a:hover {
  color: var(--primary-color);
}

.meta-info {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  font-size: 14px;
  color: #777;
}

.meta-info span {
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 4px;
}

.video-item .summary {
  color: #555;
  margin-bottom: 12px;
  line-height: 1.7;
}

.video-item .review {
  color: #666;
  font-style: italic;
  padding-left: 15px;
  border-left: 3px solid var(--primary-color);
  line-height: 1.7;
}

/* 详情页样式 */
.video-detail h1 {
  font-size: 36px;
  color: var(--text-color);
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--primary-color);
}

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

.video-detail h2 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.info-list {
  list-style: none;
  padding: 0;
}

.info-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  line-height: 1.6;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list strong {
  color: var(--primary-color);
  display: inline-block;
  width: 100px;
}

.oneline {
  font-size: 20px;
  color: var(--primary-color);
  font-weight: 500;
  line-height: 1.7;
}

.summary p,
.review p {
  line-height: 2;
  color: #555;
  font-size: 16px;
}

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

.related-card {
  padding: 20px;
  background: #f9f9f9;
  border-radius: var(--radius);
  transition: all 0.3s;
  border: 2px solid transparent;
}

.related-card:hover {
  background: white;
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.related-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.related-card h3 a {
  color: var(--text-color);
  text-decoration: none;
}

.related-card h3 a:hover {
  color: var(--primary-color);
}

.related-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* 页脚 */
footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
}

footer p {
  margin: 0;
  opacity: 0.9;
}

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

  .logo {
    font-size: 22px;
    margin-bottom: 8px;
  }

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

  .main-nav a {
    padding: 8px 6px;
    font-size: 13px;
  }

  .hero {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero .intro {
    font-size: 16px;
  }

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

  .list-section h2 {
    font-size: 22px;
  }

  .video-detail h1 {
    font-size: 28px;
  }

  .info-list strong {
    width: 80px;
    font-size: 14px;
  }

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

  .rank-badge {
    top: 15px;
    right: 15px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .main-nav a {
    padding: 6px 4px;
    font-size: 11px;
  }

  .site-intro,
  .video-detail section {
    padding: 20px 15px;
  }
}
