/* ============================================================
   植物大战僵尸攻略百科 · 草坪战场风设计系统
   杂交版为主 · 初代经典为辅
   ============================================================ */

:root {
  /* 主色：草坪绿 */
  --lawn-900: #1B4D2A;
  --lawn-700: #2E7D32;
  --lawn-500: #43A047;
  --lawn-300: #7CB342;
  --lawn-100: #DCEDC8;

  /* 辅色：木牌棕 / 泥土棕 */
  --wood-900: #4E342E;
  --wood-700: #6D4C41;
  --wood-500: #8D6E63;
  --wood-100: #EFEBE9;

  /* 点缀：太阳黄 / 天空蓝 / 危险红 */
  --sun-500: #F9A825;
  --sun-300: #FFD54F;
  --sun-100: #FFF8E1;
  --sky-300: #81D4FA;
  --sky-100: #E1F5FE;
  --danger: #D84315;

  /* 中性 */
  --paper: #FFFDF5;
  --ink: #263238;
  --ink-soft: #546E6A;
  --line: #D7CCC8;

  /* 字体 */
  --font-display: "ZCOOL KuaiLe", "Yuanti SC", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 阴影：游戏 UI 的硬投影 */
  --shadow-card: 0 6px 0 rgba(78, 52, 46, 0.22);
  --shadow-pop: 0 10px 0 rgba(78, 52, 46, 0.25);
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    repeating-linear-gradient(180deg,
      rgba(124, 179, 66, 0.05) 0 56px,
      rgba(104, 159, 56, 0.09) 56px 112px),
    var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--lawn-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1120px, 92vw); margin: 0 auto; }

/* ============ 顶栏：木牌导航 ============ */
.topbar {
  background:
    repeating-linear-gradient(90deg,
      rgba(0,0,0,0.06) 0 2px, transparent 2px 96px),
    linear-gradient(180deg, var(--wood-700), var(--wood-900));
  border-bottom: 4px solid var(--wood-900);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sun-100);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 var(--wood-900);
}
.logo:hover { text-decoration: none; }
.logo .logo-icon {
  font-size: 26px;
  background: var(--sun-300);
  border-radius: 50%;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 3px solid var(--wood-900);
  box-shadow: 0 3px 0 rgba(0,0,0,0.35);
}
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a {
  color: var(--wood-100);
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: all 0.15s ease;
}
.nav a:hover {
  background: rgba(255, 248, 225, 0.14);
  text-decoration: none;
  transform: translateY(-1px);
}
.nav a.active {
  background: var(--sun-300);
  color: var(--wood-900);
  border-color: var(--wood-900);
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
}

/* ============ 首页 Hero：天空 + 草坪 ============ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-100) 0%, var(--sky-100) 46%, transparent 46.2%),
    repeating-linear-gradient(180deg,
      var(--lawn-300) 0 44px,
      var(--lawn-500) 44px 88px);
}
.hero::after {
  /* 草坪顶部的泥土边 */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 46%;
  height: 10px;
  background: var(--wood-700);
  opacity: 0.85;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 56px 0 64px;
  position: relative;
  z-index: 1;
}
.hero-kicker {
  display: inline-block;
  background: var(--wood-900);
  color: var(--sun-300);
  font-family: var(--font-display);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: 2px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.25;
  color: var(--wood-900);
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}
.hero h1 em {
  font-style: normal;
  color: var(--lawn-700);
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.9);
}
.hero p.lead {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 26px;
  max-width: 34em;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1px;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 3px solid var(--wood-900);
  box-shadow: var(--shadow-card);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 0 rgba(78,52,46,0.22); }
.btn-primary { background: var(--sun-300); color: var(--wood-900); }
.btn-green { background: var(--lawn-500); color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.25); }

.hero-art {
  border: 4px solid var(--wood-900);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  transform: rotate(1.2deg);
  background: var(--sun-100);
}
.hero-art img { border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; }

/* ============ 区块与标题 ============ */
.section { padding: 56px 0 20px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--wood-900);
  position: relative;
  padding-left: 18px;
}
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 8px;
  background: var(--lawn-500);
  border-radius: 4px;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.12);
}
.section-head .more { font-weight: 500; white-space: nowrap; }

/* ============ 数据速览条 ============ */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: -30px auto 0;
  position: relative;
  z-index: 2;
}
.stat-cell {
  background: var(--paper);
  border: 3px solid var(--wood-900);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  text-align: center;
}
.stat-cell b {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--lawn-700);
}
.stat-cell span { color: var(--ink-soft); font-size: 14px; }

/* ============ 种子包卡片（植物/僵尸通用） ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 20px;
}
.seed {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--sun-100) 100%);
  border: 3px solid var(--wood-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 12px 12px;
  text-align: center;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.seed:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: var(--shadow-pop);
  text-decoration: none;
}
.seed .emoji {
  font-size: 46px;
  line-height: 1.15;
  filter: drop-shadow(0 3px 0 rgba(78,52,46,0.18));
}
.seed .name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
}
.seed .meta {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.5;
  min-height: 2.9em;
}
.seed .cost {
  position: absolute;
  top: -10px; right: -8px;
  min-width: 44px;
  height: 44px;
  padding: 0 6px;
  background: radial-gradient(circle at 35% 30%, var(--sun-300), var(--sun-500));
  border: 3px solid var(--wood-900);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--wood-900);
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
}
.seed .ver-tag {
  position: absolute;
  top: -10px; left: -8px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 2px solid var(--wood-900);
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
}
.ver-tag.hybrid { background: var(--lawn-300); color: var(--lawn-900); }
.ver-tag.classic { background: var(--sky-300); color: #01579B; }

/* 待校准数值样式 */
.unknown {
  color: var(--ink-soft);
  font-style: normal;
  font-size: 12px;
  border-bottom: 1px dashed var(--ink-soft);
}

/* ============ 攻略卡片 ============ */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.guide-card {
  background: var(--paper);
  border: 3px solid var(--wood-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: flex;
  flex-direction: column;
}
.guide-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-pop); text-decoration: none; }
.guide-card .cover { aspect-ratio: 16/9; object-fit: cover; border-bottom: 3px solid var(--wood-700); background: var(--lawn-100); }
.guide-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.guide-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
}
.guide-card p { color: var(--ink-soft); font-size: 13.5px; }
.guide-card .foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12.5px;
}
.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--lawn-100);
  color: var(--lawn-900);
  border: 1.5px solid var(--lawn-500);
}
.pill.classic { background: var(--sky-100); color: #01579B; border-color: var(--sky-300); }
.pill.hybrid { background: var(--lawn-100); color: var(--lawn-900); border-color: var(--lawn-500); }

/* ============ 图鉴页筛选栏 ============ */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  font-family: var(--font-display);
  font-size: 16px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2.5px solid var(--wood-700);
  background: var(--paper);
  color: var(--wood-700);
  cursor: pointer;
  transition: all 0.13s ease;
}
.tab:hover { transform: translateY(-2px); }
.tab.active { background: var(--lawn-500); border-color: var(--lawn-900); color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.2); }
.search-box {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 2.5px solid var(--wood-700);
  border-radius: 999px;
  padding: 8px 16px;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-family: var(--font-body);
  width: 180px;
  color: var(--ink);
}
.empty-tip {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 0;
  font-size: 15px;
}

/* ============ 详情页 ============ */
.detail-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: start;
  background: var(--paper);
  border: 3px solid var(--wood-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 26px;
}
.detail-face {
  background: linear-gradient(180deg, #FFFFFF, var(--sun-100));
  border: 3px solid var(--wood-700);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.detail-face .emoji { font-size: 84px; filter: drop-shadow(0 4px 0 rgba(78,52,46,0.18)); }
.detail-face .cost-badge {
  margin-top: 10px;
  display: inline-grid;
  place-items: center;
  min-width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sun-300), var(--sun-500));
  border: 3px solid var(--wood-900);
  font-weight: 700;
  color: var(--wood-900);
}
.detail-title h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  margin-bottom: 8px;
}
.detail-title .sub { color: var(--ink-soft); margin-bottom: 14px; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.stat-table th, .stat-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1.5px dashed var(--line);
  font-size: 14.5px;
  vertical-align: top;
}
.stat-table th {
  width: 96px;
  color: var(--wood-700);
  font-weight: 600;
  white-space: nowrap;
}
.detail-section { margin-top: 30px; }
.detail-section h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 7px solid var(--lawn-500);
}
.tips-list { list-style: none; display: grid; gap: 10px; }
.tips-list li {
  background: var(--sun-100);
  border: 2px solid var(--sun-300);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14.5px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 22px 0 6px;
  font-weight: 600;
  color: var(--wood-700);
}

/* ============ 攻略正文 ============ */
.article {
  background: var(--paper);
  border: 3px solid var(--wood-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 34px clamp(20px, 4vw, 46px) 40px;
  max-width: 860px;
  margin: 0 auto;
}
.article h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  margin-bottom: 10px;
}
.article .article-meta {
  color: var(--ink-soft);
  font-size: 13.5px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.article h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 6px solid var(--sun-300);
}
.article p { margin-bottom: 14px; font-size: 15.5px; }
.article ul, .article ol { margin: 0 0 14px 1.4em; font-size: 15.5px; }
.article li { margin-bottom: 6px; }
.article .callout {
  background: var(--lawn-100);
  border: 2px solid var(--lawn-500);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14.5px;
}
.article .callout.warn { background: var(--sun-100); border-color: var(--sun-500); }
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 14px;
}
.article th, .article td { border: 1.5px solid var(--line); padding: 8px 10px; text-align: left; }
.article th { background: var(--lawn-100); }
.article code {
  background: var(--wood-100);
  border-radius: 5px;
  padding: 1px 6px;
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
}

/* ============ 版本速报 ============ */
.news-panel {
  background: var(--paper);
  border: 3px solid var(--wood-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px 26px;
}
.news-panel h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 10px;
}
.news-panel ul { margin-left: 1.3em; color: var(--ink-soft); font-size: 14.5px; }
.news-panel li { margin-bottom: 5px; }
.news-panel .src { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }

/* ============ 关于页 ============ */
.about-card {
  background: var(--paper);
  border: 3px solid var(--wood-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 30px clamp(20px, 4vw, 44px);
  max-width: 860px;
  margin: 0 auto;
}
.about-card h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  margin-bottom: 14px;
}
.about-card p { margin-bottom: 12px; font-size: 15px; }
.about-card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  margin: 22px 0 10px;
}

/* ============ 页脚 ============ */
footer {
  margin-top: 70px;
  background: linear-gradient(180deg, var(--lawn-900), #142E1B);
  color: #C8D6C0;
  padding: 36px 0 28px;
  border-top: 5px solid var(--wood-900);
}
.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-brand { font-family: var(--font-display); font-size: 20px; color: var(--sun-300); margin-bottom: 8px; }
footer p { font-size: 13px; max-width: 46em; }
footer a { color: #A5D6A7; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.foot-links a { font-size: 14px; }

/* ============ 入场动画 ============ */
@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pop-in {
  animation: pop-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@media (prefers-reduced-motion: reduce) {
  .pop-in { animation: none; }
  * { transition: none !important; }
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 40px 0 48px; }
  .hero-art { order: -1; transform: none; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .detail-head { grid-template-columns: 1fr; }
  .detail-face { max-width: 240px; margin: 0 auto; }
  .search-box { margin-left: 0; width: 100%; }
  .search-box input { width: 100%; }
}

/* 宝开语（图鉴趣味原文） */
.flavor { margin-top: 10px; padding: 10px 14px; background: var(--sun-100, #FFF8E1); border-left: 3px solid var(--sun-500, #F9A825); color: var(--ink-soft); font-size: 13.5px; border-radius: 0 8px 8px 0; }
