/* 基础样式 */
:root {
  --primary-color: #0066cc;
  --secondary-color: #2c3e50;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --hover-bg: #f0f0f0;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background: var(--bg-color);
  color: var(--text-color);
}

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

/* 头部样式 */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
}

.site-header .logo {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 10px;
}

.site-header h1 {
  font-size: 1.5em;
  font-weight: normal;
  margin: 0;
}

/* 导航栏增强 */
nav {
  background: var(--card-bg);
  border-bottom: 2px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

nav .nav-container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 15px 10px;
  color: var(--text-color);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
  background: var(--hover-bg);
  color: var(--primary-color);
  text-decoration: none;
}

/* 移动端导航 - 强制单行 */
@media (max-width: 767px) {
  nav .nav-container {
    padding: 0 5px;
  }

  nav a {
    padding: 12px 5px;
    font-size: 13px;
  }
}

/* 首页布局 */
.intro {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  line-height: 1.8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section {
  margin-bottom: 40px;
}

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

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

.card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
}

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

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

.card .meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
}

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

.more-link {
  text-align: center;
  margin-top: 20px;
}

.more-link a {
  display: inline-block;
  padding: 10px 30px;
  background: var(--primary-color);
  color: white;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.more-link a:hover {
  background: #0052a3;
  text-decoration: none;
}

.links {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-top: 40px;
}

/* 列表页样式 */
.page-header {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-header h1 {
  font-size: 2em;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-desc {
  font-size: 1.05em;
  line-height: 1.8;
  color: #555;
}

.list-section {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.list-item {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

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

.list-item:hover {
  background: var(--hover-bg);
}

.list-item .rank,
.list-item .category,
.list-item .tag,
.list-item .year {
  display: inline-block;
  padding: 3px 10px;
  margin-right: 10px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: bold;
}

.list-item .rank {
  background: #ff6b6b;
  color: white;
}

.list-item .category {
  background: #4ecdc4;
  color: white;
}

.list-item .tag {
  background: #95e1d3;
  color: #333;
}

.list-item .year {
  background: #f38181;
  color: white;
}

.list-item h3 {
  display: inline;
  font-size: 1.3em;
  margin-left: 5px;
}

.list-item h3 a {
  color: var(--text-color);
}

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

.list-item .meta {
  font-size: 0.9em;
  color: #666;
  margin: 10px 0;
}

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

/* 详情页样式 */
.detail {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail header h1 {
  font-size: 2.2em;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.detail .info {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 30px;
}

.detail .info-item {
  padding: 8px 0;
  font-size: 1.05em;
}

.detail .info-item strong {
  color: var(--secondary-color);
  margin-right: 10px;
}

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

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

.detail section p {
  font-size: 1.05em;
  line-height: 1.8;
  color: #444;
}

.detail .highlight {
  background: #fffbea;
  padding: 20px;
  border-left: 4px solid #ffc107;
  border-radius: 5px;
}

.detail .review {
  background: #e8f5e9;
  padding: 20px;
  border-left: 4px solid #4caf50;
  border-radius: 5px;
}

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

.related-item {
  background: var(--bg-color);
  padding: 15px;
  border-radius: 5px;
  transition: transform 0.3s ease;
}

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

.related-item h4 {
  font-size: 1.1em;
  margin-bottom: 8px;
}

.related-item h4 a {
  color: var(--text-color);
}

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

.related-item .meta {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
}

.related-item .desc {
  font-size: 0.9em;
  color: #555;
  line-height: 1.5;
}

/* 页脚样式 */
.site-footer {
  background: var(--secondary-color);
  color: white;
  padding: 30px 0;
  text-align: center;
  margin-top: 50px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px 10px;
  }

  .site-header {
    padding: 30px 15px;
  }

  .site-header .logo {
    font-size: 1.5em;
  }

  .site-header h1 {
    font-size: 1.2em;
  }

  .section h2,
  .page-header h1 {
    font-size: 1.5em;
  }

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

  .detail {
    padding: 20px 15px;
  }

  .detail header h1 {
    font-size: 1.8em;
  }

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

/* UI 风格变体 */
body.ui-style-0 { --primary-color: #0066cc; }
body.ui-style-1 { --primary-color: #1976d2; }
body.ui-style-2 { --primary-color: #2196f3; }
body.ui-style-3 { --primary-color: #00838f; }
body.ui-style-4 { --primary-color: #00695c; }
body.ui-style-5 { --primary-color: #388e3c; }
body.ui-style-6 { --primary-color: #5d4037; }
body.ui-style-7 { --primary-color: #c62828; }
body.ui-style-8 { --primary-color: #d32f2f; }
body.ui-style-9 { --primary-color: #ad1457; }
body.ui-style-10 { --primary-color: #6a1b9a; }
body.ui-style-11 { --primary-color: #4527a0; }
body.ui-style-12 { --primary-color: #283593; }
body.ui-style-13 { --primary-color: #1565c0; }
body.ui-style-14 { --primary-color: #0277bd; }
body.ui-style-15 { --primary-color: #00695c; }
