
/* 基础样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}
body.ui-style-4 { --primary-color: #dfe363; }

a { color: #0066cc; text-decoration: none; transition: all 0.3s ease; }
a:hover { color: #004499; text-decoration: underline; }

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

/* 头部导航 */
header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid #e0e0e0;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
header .logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
}
nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
}
nav a {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s ease;
  white-space: nowrap;
}
nav a:hover {
  background: #f0f0f0;
  text-decoration: none;
}

/* 移动端导航 */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
  }
  nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    margin-top: 0.5rem;
  }
  nav a {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0.5rem 0.2rem;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* 主内容区 */
main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

section {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  border-left: 4px solid #0066cc;
  padding-left: 1rem;
}

h2 {
  font-size: 1.5rem;
  color: #34495e;
  margin: 1.5rem 0 1rem;
}

h3 {
  font-size: 1.2rem;
  color: #555;
  margin: 1rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

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

.card {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: #0066cc;
}

.card h3 {
  margin-top: 0;
  color: #2c3e50;
}

.card .meta {
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.card .desc {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.5rem 0;
}

.card a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #0066cc;
  font-weight: 500;
}

/* 详情页 */
.detail-info {
  background: #f9f9f9;
  border-left: 3px solid #0066cc;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
}

.detail-info .info-item {
  margin: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
}

.detail-info .info-label {
  font-weight: bold;
  color: #555;
  min-width: 80px;
}

.detail-info .info-value {
  color: #333;
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.tag {
  background: #e8f4f8;
  color: #0066cc;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

/* 页脚 */
footer {
  background: #2c3e50;
  color: #ecf0f1;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer p {
  margin: 0.5rem 0;
}

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

  h1 {
    font-size: 1.5rem;
  }

  section {
    padding: 1rem;
  }
}
