:root {
  --bg-dark: #07080a;
  --bg-mid: #0f1114;
  --panel: rgba(20,22,30,0.56);
  --glass: rgba(255,255,255,0.03);
  --accent: #7b61ff;    /* 蓝紫 */
  --accent-2: #3fb0ff;  /* 青蓝 */
  --muted: #9aa4b6;
  --soft: #e8f0ff;
  --glass-border: rgba(123,97,255,0.12);
  --shadow: 0 10px 40px rgba(3,6,20,0.6);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 24px;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(800px 400px at 10% 10%, rgba(59,40,115,0.18), transparent 10%),
    radial-gradient(700px 300px at 90% 85%, rgba(63,176,255,0.06), transparent 8%),
    linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  color: var(--soft);
  overflow-x: hidden;
}

/* header */
header {
  text-align: center;
  margin-bottom: 22px;
  padding: 6px 12px;
  backdrop-filter: blur(6px) saturate(120%);
}

#index-title {
  font-size: 44px;
  margin: 0;
  line-height: 1.02;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.6px;
  text-shadow: 0 10px 40px rgba(123,97,255,0.08);
}

#index-subtitle {
  margin: 8px auto 0 auto;
  font-size: 14px;
  color: var(--muted);
  max-width: 900px;
  line-height: 1.5;
  padding: 0 8px;
}

/* 列表容器 */
#pest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
  margin-top: 18px;
  width: 100%;
}

/* 卡片：玻璃质感，悬停放大 */
.pest-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.043), rgba(218, 203, 255, 0.135));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  width: 300px;
  max-width: calc(100% - 40px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  color: var(--soft);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  cursor: pointer;
}

.pest-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 28px 80px rgba(111, 77, 214, 0.354);
  border-color: rgba(63,176,255,0.18);
}

/* 图片 */
.pest-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 8px 28px rgba(2,6,23,0.45), inset 0 1px 0 rgba(255,255,255,0.02);
}

/* 标题与描述 */
.pest-card h2 {
  margin: 6px 0 2px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--soft);
  text-align: center;
  letter-spacing: -0.2px;
}

.pest-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

/* 小屏适配 */
@media (max-width: 640px) {
  body { padding: 16px; }
  #index-title { font-size: 32px; }
  .pest-card { width: 100%; max-width: 520px; padding: 12px; }
  .pest-card img { height: 160px; }
  #index-subtitle { font-size: 13px; }
}

/* 布局提示（可选）：当列表项很多时让容器居中 */
#pest-list:empty {
  display: block;
  text-align: center;
  color: var(--muted);
}