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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 头部与导航 - 关键：移动端单行导航 */
header {
  background: #2c3e50;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  padding: 1rem 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  background: #34495e;
}

.logo a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo a:hover {
  opacity: 0.8;
}

/* 导航栏 - 移动端单行硬性约束 */
.main-nav {
  background: #2c3e50;
}

.main-nav ul {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.main-nav a {
  display: block;
  padding: 1rem 1rem;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.3s, transform 0.2s;
  font-size: 1rem;
}

.main-nav a:hover {
  background: #34495e;
  transform: translateY(-2px);
}

.main-nav .active a {
  background: #1abc9c;
  font-weight: bold;
}

/* 移动端导航 - 确保单行显示 */
@media (max-width: 768px) {
  .logo {
    padding: 0.75rem 1rem;
    font-size: 1.2rem;
  }

  .main-nav a {
    padding: 0.75rem 0.25rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .logo {
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
  }

  .main-nav a {
    padding: 0.6rem 0.15rem;
    font-size: 0.75rem;
  }
}

/* 主容器 */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

@media (max-width: 768px) {
  main {
    padding: 1rem;
  }
}

/* 页面标题区 */
.hero h1,
.page-header h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
  line-height: 1.4;
}

.page-header {
  background: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-header .intro {
  font-size: 1rem;
  color: #666;
  text-align: center;
  line-height: 1.8;
}

/* 站点介绍 */
.site-intro {
  background: white;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.site-intro h2 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #1abc9c;
}

.site-intro p {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
}

/* 通用 section */
section {
  margin: 3rem 0;
}

section h2 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #1abc9c;
}

section h3 {
  font-size: 1.3rem;
  color: #34495e;
  margin-bottom: 0.75rem;
}

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

.video-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.video-card h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.video-card h3 a:hover {
  color: #1abc9c;
}

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

.video-card .desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

/* 视频列表 */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-item {
  background: white;
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid #1abc9c;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.list-item:hover {
  transform: translateX(4px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.list-item h3,
.list-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.list-item h3 a,
.list-item h4 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.list-item h3 a:hover,
.list-item h4 a:hover {
  color: #1abc9c;
}

.list-item .meta {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.list-item .desc {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* 专题卡片 */
.topic-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.topic-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.topic-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.topic-card h3 a {
  color: white;
  text-decoration: none;
}

.topic-card .tags {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* 列表分组 */
.list-group {
  background: white;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.list-group h3 {
  font-size: 1.4rem;
  color: #1abc9c;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ecf0f1;
}

/* 排名列表 */
.ranked-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ranked-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ranked-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ranked-item .rank {
  font-size: 2rem;
  font-weight: bold;
  color: #1abc9c;
  min-width: 50px;
  text-align: center;
}

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

.ranked-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.ranked-item h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.ranked-item h3 a:hover {
  color: #1abc9c;
}

.ranked-item .meta {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.ranked-item .desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.ranked-item .review {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  line-height: 1.6;
  padding-left: 1rem;
  border-left: 3px solid #ecf0f1;
}

/* 专题列表 */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.topic-item {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #9b59b6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.topic-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.topic-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.topic-item h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.topic-item h3 a:hover {
  color: #9b59b6;
}

.topic-item .tags {
  font-size: 0.9rem;
  color: #9b59b6;
  margin-bottom: 0.5rem;
}

.topic-item .meta {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.topic-item .desc {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* 时间线列表 */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.timeline-item .date {
  font-size: 1.5rem;
  font-weight: bold;
  color: #e74c3c;
  min-width: 80px;
  text-align: center;
}

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

.timeline-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.timeline-item h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.timeline-item h3 a:hover {
  color: #e74c3c;
}

.timeline-item .meta {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.timeline-item .desc {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

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

.more-link a {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #1abc9c;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin: 0 0.5rem;
  transition: background 0.3s, transform 0.2s;
}

.more-link a:hover {
  background: #16a085;
  transform: translateY(-2px);
}

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

.detail-page h1 {
  font-size: 2.2rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #1abc9c;
  text-align: center;
}

.detail-page section {
  margin: 2rem 0;
}

.detail-page h2 {
  font-size: 1.5rem;
  color: #34495e;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ecf0f1;
}

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

.basic-info li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #ecf0f1;
  font-size: 1rem;
  line-height: 1.6;
}

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

.basic-info strong {
  color: #2c3e50;
  display: inline-block;
  min-width: 80px;
}

.one-line p,
.summary p,
.review p {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
}

.review p {
  font-style: italic;
  background: #f8f9fa;
  padding: 1rem;
  border-left: 4px solid #1abc9c;
  border-radius: 4px;
}

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

.related-item {
  background: #f8f9fa;
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.related-item h3 a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.related-item h3 a:hover {
  color: #3498db;
}

.related-item .meta {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

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

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

footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 响应式 */
@media (max-width: 768px) {
  .hero h1,
  .page-header h1 {
    font-size: 1.5rem;
  }

  .detail-page {
    padding: 1.5rem;
  }

  .detail-page h1 {
    font-size: 1.75rem;
  }

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

  .ranked-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ranked-item .rank {
    font-size: 2.5rem;
  }

  .timeline-item {
    flex-direction: column;
  }

  .timeline-item .date {
    text-align: left;
  }
}

/* UI 风格变体 */
.ui-style-0 { --primary-color: #1abc9c; }
.ui-style-1 { --primary-color: #3498db; }
.ui-style-2 { --primary-color: #9b59b6; }
.ui-style-3 { --primary-color: #e74c3c; }
.ui-style-4 { --primary-color: #f39c12; }
.ui-style-5 { --primary-color: #16a085; }
.ui-style-6 { --primary-color: #2980b9; }
.ui-style-7 { --primary-color: #8e44ad; }
.ui-style-8 { --primary-color: #c0392b; }
.ui-style-9 { --primary-color: #d35400; }
.ui-style-10 { --primary-color: #27ae60; }
.ui-style-11 { --primary-color: #2c3e50; }
.ui-style-12 { --primary-color: #f1c40f; }
.ui-style-13 { --primary-color: #e67e22; }
.ui-style-14 { --primary-color: #95a5a6; }
.ui-style-15 { --primary-color: #34495e; }
