/* 全站统一样式 */

:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --text-dark: #333333;
  --text-gray: #666666;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 16px;
}

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

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

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

.logo {
  font-size: 24px;
  font-weight: bold;
  margin-right: 20px;
  flex-shrink: 0;
  color: white;
  text-decoration: none;
}

.nav a {
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition);
  border-radius: 4px;
}

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

/* 内容区域 */
.content, section {
  background: var(--bg-white);
  padding: 30px;
  margin: 30px 0;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

/* 标题 */
h1 {
  color: var(--secondary-color);
  font-size: 32px;
  margin: 0 0 20px 0;
  line-height: 1.3;
}

h2 {
  color: var(--secondary-color);
  font-size: 24px;
  margin: 30px 0 20px 0;
  padding-left: 15px;
  border-left: 4px solid var(--primary-color);
  line-height: 1.3;
}

h3 {
  color: var(--text-dark);
  font-size: 18px;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

/* 段落 */
p {
  margin: 10px 0;
  color: var(--text-dark);
  line-height: 1.8;
}

/* 链接 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
  color: #2980b9;
}

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

.item-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 8px;
  transition: var(--transition);
}

.item-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-color);
}

.item-card h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.item-card p {
  margin: 5px 0;
  color: var(--text-gray);
  font-size: 14px;
}

/* 列表布局 */
.item-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* 排行榜 */
.rank-list {
  margin-top: 30px;
}

.rank-item {
  display: flex;
  align-items: flex-start;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.rank-item:hover {
  background: #f9f9f9;
}

.rank-num {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
  min-width: 60px;
  margin-right: 20px;
  flex-shrink: 0;
}

.rank-content {
  flex: 1;
}

/* 专题分组 */
.topic-group {
  margin: 40px 0;
  padding: 25px;
  background: #f9f9f9;
  border-radius: 8px;
}

.topic-group h2 {
  color: var(--accent-color);
  border-left-color: var(--accent-color);
  margin-top: 0;
}

.topic-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.topic-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 15px;
  border-radius: 6px;
  transition: var(--transition);
}

.topic-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.topic-card h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.topic-card p {
  margin: 3px 0;
  color: var(--text-gray);
  font-size: 13px;
}

/* 最新列表 */
.latest-list {
  margin-top: 30px;
}

.latest-item {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.latest-item:hover {
  background: #f9f9f9;
}

.latest-date {
  min-width: 80px;
  color: var(--accent-color);
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.latest-content {
  flex: 1;
}

/* 详情页模块 */
.info-section, .summary-section, .review-section, .related-section {
  margin: 30px 0;
  padding: 25px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

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

.related-item {
  background: var(--bg-white);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.related-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-color);
}

.related-item h3 {
  font-size: 16px;
  margin: 0 0 8px 0;
}

.related-item p {
  font-size: 14px;
  color: var(--text-gray);
  margin: 5px 0;
}

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

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

  .logo {
    font-size: 18px;
    margin-right: 10px;
  }

  .container {
    padding: 15px;
  }

  .content, section {
    padding: 20px;
    margin: 20px 0;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .item-grid, .item-list, .topic-items {
    grid-template-columns: 1fr;
  }

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

  .rank-num {
    margin-bottom: 10px;
  }

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

  .latest-date {
    margin-bottom: 5px;
  }

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

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

  .nav a {
    padding: 6px 3px;
    font-size: 12px;
  }

  .logo {
    font-size: 16px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 18px;
  }
}

/* UI 风格变体（根据 body class） */
.ui-style-3 {
  /* 当前使用的样式索引 */
}
