/* 51吃瓜网 - Bento网格风格（差异化设计） */
:root {
  --coral: #ff6b6b;
  --orange: #ffa94d;
  --yellow: #ffd43b;
  --purple: #cc5de8;
  --blue: #339af0;
  --green: #51cf66;
  --dark: #212529;
  --gray: #868e96;
  --light: #f8f9fa;
  --white: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.5;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* 极简顶栏 */
.header {
  background: var(--white);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--coral), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav { display: flex; gap: 8px; flex-wrap: wrap; }

.nav a {
  padding: 8px 16px;
  color: var(--gray);
  font-size: 13px;
  border-radius: 20px;
  transition: all 0.2s;
}

.nav a:hover {
  background: var(--light);
  color: var(--coral);
}

/* Bento主网格 */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* 介绍区 */
.intro-bento {
  background: linear-gradient(135deg, var(--coral) 0%, var(--orange) 100%);
  color: var(--white);
  padding: 32px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.intro-bento h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.intro-bento p {
  margin-bottom: 12px;
  opacity: 0.95;
  line-height: 1.7;
}

.intro-bento p:last-child { margin-bottom: 0; }

/* Bento网格 */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 140px;
  gap: 16px;
}

.bento-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s;
}

.bento-item:hover { transform: scale(1.02); }

.bento-item.span-2 { grid-column: span 2; }
.bento-item.span-3 { grid-column: span 3; }
.bento-item.row-2 { grid-row: span 2; }
.bento-item.row-3 { grid-row: span 3; }

.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: var(--white);
}

.bento-overlay h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.bento-overlay span {
  font-size: 12px;
  opacity: 0.9;
}

/* 不同色块变体 */
.bento-item.coral { background: linear-gradient(135deg, #ff6b6b, #ff8787); }
.bento-item.orange { background: linear-gradient(135deg, #ffa94d, #ffc078); }
.bento-item.purple { background: linear-gradient(135deg, #cc5de8, #e599f7); }
.bento-item.blue { background: linear-gradient(135deg, #339af0, #74c0fc); }

.bento-item.solid .bento-overlay { background: transparent; }
.bento-item.solid h3 { color: var(--dark); }
.bento-item.solid span { color: var(--gray); }

/* 内容页 */
.content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px;
}

.breadcrumb {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--coral); }

.article-content {
  background: var(--white);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.article-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.article-meta {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 24px;
}

.article-content h2 {
  font-size: 1.2rem;
  margin: 24px 0 12px;
  color: var(--coral);
}

.article-content p {
  margin-bottom: 14px;
  color: var(--dark);
  line-height: 1.7;
  text-align: justify;
}

.article-content .intro {
  font-size: 1.05rem;
  color: var(--gray);
}

.article-img {
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
}

.article-img img { width: 100%; }

/* 列表页Bento */
.list-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.list-bento .bento-item { grid-column: span 1; grid-row: span 1; }

/* 页脚 */
.footer {
  background: var(--white);
  padding: 24px 20px;
  margin-top: 32px;
  text-align: center;
  border-top: 1px solid #eee;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a { color: var(--gray); font-size: 13px; }
.footer-links a:hover { color: var(--coral); }
.footer p { color: var(--gray); font-size: 12px; }

/* 响应式 */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-item.span-3 { grid-column: span 2; }
  .list-bento { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 160px;
  }
  .bento-item.span-2,
  .bento-item.span-3 { grid-column: span 1; }
  .bento-item.row-2,
  .bento-item.row-3 { grid-row: span 1; }
  .list-bento { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .nav { width: 100%; }
  .article-content { padding: 20px; }
}
