/* 全局样式 */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

/* 导航栏 */
nav {
  background: var(--secondary-color);
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
}

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

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

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

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

  nav .logo {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }

  nav a {
    font-size: 11px;
    padding: 0.3rem 0.2rem;
  }
}

/* 主内容区 */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* 首页英雄区 */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3rem 2rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 2rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.5;
}

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

  .hero h1 {
    font-size: 1.3rem;
  }
}

/* 介绍区 */
.intro {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  line-height: 2;
}

.intro p {
  margin: 0;
  color: var(--text-light);
}

/* 区块标题 */
section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
  color: var(--secondary-color);
}

.card h3 a {
  color: var(--secondary-color);
}

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

.card .meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0.5rem 0;
}

.card .intro {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0.5rem 0 0 0;
}

/* 区块样式 */
.hot-section,
.top-section,
.latest-section {
  margin-bottom: 3rem;
}

.top-section p,
.latest-section p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* 列表页 */
.list-page {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.list-page h1 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.page-intro {
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 2rem;
}

.list-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-card {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.list-card:hover {
  border-left-color: var(--accent-color);
  box-shadow: var(--shadow);
}

.list-card .number,
.list-card .rank-badge {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 40px;
  text-align: center;
}

.list-card.rank .rank-badge {
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.list-card h3 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
  color: var(--secondary-color);
}

.list-card h3 a {
  color: var(--secondary-color);
}

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

.list-card .meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0.3rem 0;
}

.list-card .tags {
  font-size: 0.85rem;
  color: var(--primary-color);
  margin: 0.3rem 0;
}

.list-card .intro {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0.5rem 0 0 0;
}

.list-card .date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0.3rem 0;
}

/* 详情页 */
.detail-page {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-page h1 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 1rem;
}

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

.detail-page h2 {
  font-size: 1.3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
}

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

.basic-info li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.8;
}

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

.basic-info strong {
  color: var(--secondary-color);
  min-width: 80px;
  display: inline-block;
}

.one-line p,
.summary p,
.review p {
  line-height: 2;
  color: var(--text-color);
}

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

.related-card {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
  transition: all 0.3s ease;
}

.related-card:hover {
  border-left-color: var(--accent-color);
  box-shadow: var(--shadow);
}

.related-card h4 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  color: var(--secondary-color);
}

.related-card h4 a {
  color: var(--secondary-color);
}

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

.related-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

/* 页脚 */
footer {
  background: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer p {
  margin: 0;
}

/* 响应式 */
@media (max-width: 768px) {
  main {
    padding: 0 0.5rem;
    margin: 1rem auto;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .list-page,
  .detail-page {
    padding: 1.5rem 1rem;
  }

  .list-card {
    flex-direction: column;
  }

  .list-card .number,
  .list-card .rank-badge {
    align-self: flex-start;
  }
}

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