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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  color: #212529;
  line-height: 1.6;
}

a { color: #007bff; text-decoration: none; }
a:hover { color: #0056b3; text-decoration: underline; }

/* 头部 */
header {
  background: #2c3e50;
  color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
  padding: 20px;
  text-align: center;
}

.logo a {
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  background: #34495e;
  padding: 0;
}

nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  color: white;
  text-decoration: none;
  padding: 15px 5px;
  transition: background 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

nav a:hover,
nav a.active {
  background: #2c3e50;
}

@media (min-width: 768px) {
  nav a {
    padding: 15px 20px;
    font-size: 16px;
  }
}

/* 主体内容 */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  font-size: 28px;
  margin: 20px 0;
  color: #2c3e50;
}

h2 {
  font-size: 22px;
  margin: 20px 0 10px;
  color: #34495e;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
}

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

/* 首页 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 30px;
}

.hero h1 {
  color: white;
  font-size: 32px;
  margin: 0;
}

.intro {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.card {
  background: white;
  padding: 20px;
  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 12px rgba(0,0,0,0.15);
}

.card h3 {
  margin: 0 0 10px;
}

.card .meta {
  font-size: 14px;
  color: #6c757d;
  margin: 5px 0;
}

.card .one-line {
  font-size: 14px;
  color: #495057;
  line-height: 1.5;
}

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

.link-card {
  background: white;
  padding: 30px 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
  display: block;
  text-decoration: none;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  text-decoration: none;
}

.link-card h3 {
  color: #2c3e50;
  margin: 0 0 10px;
}

.link-card p {
  color: #6c757d;
  margin: 0;
  font-size: 14px;
}

/* 列表页 */
.list-page {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-desc {
  color: #6c757d;
  font-size: 16px;
  margin-bottom: 20px;
}

.list-container {
  margin-top: 20px;
}

.list-item {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  transition: background 0.3s;
}

.list-item:hover {
  background: #f8f9fa;
}

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

.list-item h3 {
  margin: 0 0 10px;
}

.list-item .meta {
  font-size: 14px;
  color: #6c757d;
  margin: 5px 0;
}

.list-item .one-line {
  font-size: 14px;
  color: #495057;
  line-height: 1.5;
  margin: 10px 0 0;
}

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

.basic-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.info-item {
  margin: 10px 0;
  font-size: 15px;
}

.info-item strong {
  color: #2c3e50;
}

.one-line,
.summary,
.review {
  margin: 20px 0;
}

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

.related-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: background 0.3s;
}

.related-item:hover {
  background: #e9ecef;
}

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

.related-item .one-line {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
}

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

footer p {
  margin: 0;
}

/* 响应式 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 24px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

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

  main {
    padding: 10px;
  }

  .detail-page,
  .list-page,
  .intro {
    padding: 20px;
  }
}