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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

a {
  text-decoration: none;
  color: #667eea;
  transition: color 0.3s;
}

a:hover {
  color: #764ba2;
}

/* 容器 */
.container {
  min-height: calc(100vh - 250px);
}

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

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

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

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.card h3 a {
  color: #2c3e50;
}

.card h3 a:hover {
  color: #667eea;
}

.card .meta {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 0.8rem;
}

.card .oneline {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

/* 列表卡片 */
.list-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.list-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;
}

.list-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.list-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.list-card h3 a {
  color: #2c3e50;
}

.list-card h3 a:hover {
  color: #667eea;
}

.list-card .meta {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 0.8rem;
}

.list-card .oneline {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.list-card .review {
  font-size: 0.95rem;
  color: #777;
  line-height: 1.6;
  font-style: italic;
  padding-left: 1rem;
  border-left: 3px solid #667eea;
}

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

.related-card {
  background: #f8f9fa;
  padding: 1.2rem;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  transition: background 0.3s, border-color 0.3s;
}

.related-card:hover {
  background: white;
  border-color: #667eea;
}

.related-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.related-card h4 a {
  color: #2c3e50;
}

.related-card h4 a:hover {
  color: #667eea;
}

.related-card .meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.related-card .oneline {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

/* 响应式 */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

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

  .card, .list-card {
    padding: 1.2rem;
  }

  .card h3, .list-card h3 {
    font-size: 1.2rem;
  }

  body {
    font-size: 15px;
  }
}

/* UI风格变体 - 16种 */
body.ui-style-0 { --primary: #667eea; --secondary: #764ba2; }
body.ui-style-1 { --primary: #f093fb; --secondary: #f5576c; }
body.ui-style-2 { --primary: #4facfe; --secondary: #00f2fe; }
body.ui-style-3 { --primary: #43e97b; --secondary: #38f9d7; }
body.ui-style-4 { --primary: #fa709a; --secondary: #fee140; }
body.ui-style-5 { --primary: #30cfd0; --secondary: #330867; }
body.ui-style-6 { --primary: #a8edea; --secondary: #fed6e3; }
body.ui-style-7 { --primary: #ff9a56; --secondary: #ff6a88; }
body.ui-style-8 { --primary: #f8b500; --secondary: #fceabb; }
body.ui-style-9 { --primary: #667db6; --secondary: #0082c8; }
body.ui-style-10 { --primary: #e1eec3; --secondary: #f05053; }
body.ui-style-11 { --primary: #2af598; --secondary: #009efd; }
body.ui-style-12 { --primary: #f12711; --secondary: #f5af19; }
body.ui-style-13 { --primary: #c471f5; --secondary: #fa71cd; }
body.ui-style-14 { --primary: #a8c0ff; --secondary: #3f2b96; }
body.ui-style-15 { --primary: #667eea; --secondary: #764ba2; }

/* 返回顶部按钮 */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.3s, transform 0.3s;
  z-index: 1000;
}

#back-to-top:hover {
  background: #764ba2;
  transform: translateY(-3px);
}

#back-to-top.show {
  display: flex;
}
