:root {
  --bg: #f0f0fa;
  --text: #1a1a2e;
  --muted: #5a5e72;
  --card-shadow: rgba(80, 60, 180, 0.08);
  --card-shadow-hover: rgba(80, 60, 180, 0.18);
  --radius: 22px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --accent: #6366f1;
}

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

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(139, 92, 246, 0.12), transparent 50%),
    radial-gradient(ellipse at 100% 20%, rgba(244, 114, 182, 0.10), transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(56, 189, 248, 0.08), transparent 50%),
    var(--bg);
  overflow-x: hidden;
}

/* 容器 */
.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}

/* 页面头部 */
.page-header {
  text-align: center;
  margin-bottom: 36px;
}

.page-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 12px;
}

.page-header p {
  color: var(--muted);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.search-bar input {
  width: 100%;
  max-width: 420px;
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  box-shadow: 0 2px 8px var(--card-shadow);
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
}

.search-bar input::placeholder {
  color: #b0b8c4;
}

.search-bar input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

/* 分类筛选 */
.filter-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 200ms, color 200ms, box-shadow 200ms;
}

.filter-btn:hover {
  background: #ede9fe;
  color: #6366f1;
}

.filter-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 卡片 */
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 4px 20px var(--card-shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
  overflow: hidden;
  min-height: 180px;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px var(--card-shadow-hover);
}

/* 渐变色卡片背景（通过 style 内联注入） */
.bento-card .card-icon {
  font-size: 32px;
  margin-bottom: 16px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.bento-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.bento-card p {
  font-size: 14px;
  color: rgba(26, 26, 46, 0.7);
  line-height: 1.55;
}

.bento-card .card-category {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

/* 大卡片占两列 */
.bento-card.large {
  grid-column: span 2;
  min-height: 220px;
}

/* 空状态 */
.empty {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff;
  box-shadow: 0 4px 20px var(--card-shadow);
}

/* Footer */
footer {
  text-align: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--muted);
  font-size: 13px;
}

/* 响应式 */
@media (max-width: 860px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-card.large {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 32px 16px 40px;
  }

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

  .bento-card.large {
    grid-column: span 1;
  }

  .bento-card {
    min-height: 160px;
  }

  .page-header h1 {
    font-size: 28px;
  }
}
