/* ==========================================================================
   植物大战僵尸改版官网 —— 草坪绿主题
   ========================================================================== */
:root {
  --green: #4f8c1f;
  --green-2: #5a9e2a;
  --green-dark: #3f7018;
  --green-ink: #2f5411;
  --accent: #ffd21e;
  --accent-2: #f5c400;
  --bg: #f6f8ee;
  --bg-2: #eef3e0;
  --card: #ffffff;
  --ink: #2a3222;
  --muted: #6d7a63;
  --line: #e3e9d6;
  --footer: #8a4a1a;
  --radius: 12px;
  --shadow: 0 2px 14px rgba(47, 84, 17, .08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

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

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------ 顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.site-header .inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; }
.brand .mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--accent);
  display: grid; place-items: center;
  font-size: 20px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08);
}
.nav { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.nav a {
  color: #fff;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 15px;
  transition: background .15s;
}
.nav a:hover { background: rgba(0, 0, 0, .12); }
.nav a.active { background: rgba(0, 0, 0, .18); font-weight: 600; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.btn-qq {
  background: var(--accent);
  color: #4a3b00;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
.btn-qq:hover { background: var(--accent-2); }
.user-chip { color: #fff; font-size: 14px; opacity: .95; }

/* ------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, background .15s, box-shadow .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #4a3b00; box-shadow: 0 3px 0 #d8ab00; }
.btn-accent:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-green { background: var(--green-2); color: #fff; }
.btn-green:hover { background: var(--green); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ Hero */
.hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .10) 0 2px, transparent 3px) 0 0/26px 26px,
    radial-gradient(circle at 70% 80%, rgba(0, 0, 0, .06) 0 2px, transparent 3px) 0 0/34px 34px,
    linear-gradient(180deg, #589a24 0%, #4b871c 100%);
  color: #fff;
  text-align: center;
  padding: 56px 0 64px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #4a3b00;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 46px;
  margin: 0 0 16px;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
.hero p {
  max-width: 720px;
  margin: 0 auto 30px;
  font-size: 16px;
  color: rgba(255, 255, 255, .92);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------ 区块 */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-2); }
.section-title { text-align: center; font-size: 30px; margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 36px; }

/* ------------------------------------------------------------ 版本卡 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 26px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.card-cover { aspect-ratio: 16 / 8.6; background: var(--bg-2); overflow: hidden; position: relative; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-cover img { transform: scale(1.03); }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.card-head h3 { margin: 0; font-size: 20px; }
.tag {
  margin-left: auto;
  background: var(--accent);
  color: #4a3b00;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.card-sub { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.card-desc { color: #3c4633; font-size: 14px; margin: 0 0 14px; }
.features { list-style: none; margin: 0 0 18px; padding: 0; }
.features li { position: relative; padding-left: 22px; font-size: 14px; color: #3c4633; margin-bottom: 6px; }
.features li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--green-2);
  font-weight: 700;
}
.card-body .btn { margin-top: auto; }

/* ------------------------------------------------------------ 公告 */
.notice-card {
  background: #fff;
  border: 1px dashed #cfdcc0;
  border-radius: var(--radius);
  padding: 46px 24px;
  text-align: center;
  color: var(--muted);
}
.notice-card .sprout { font-size: 34px; opacity: .45; margin-bottom: 6px; }
.notice-list { display: grid; gap: 14px; }
.notice-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
}
.notice-item h3 { margin: 0 0 6px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.notice-item .pin { background: var(--accent); color: #4a3b00; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.notice-item time { color: var(--muted); font-size: 12px; }
.notice-item p { margin: 8px 0 0; color: #3c4633; font-size: 14px; white-space: pre-wrap; }
.more-link { display: block; text-align: center; margin-top: 22px; color: var(--green-dark); font-weight: 600; }

/* ------------------------------------------------------------ 页脚 */
.site-footer { background: var(--footer); color: #f3e3d2; padding: 28px 0; margin-top: 0; }
.site-footer .inner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  justify-content: space-between;
}
.site-footer .brand { color: #fff; }
.site-footer .copy { color: #e8d2bd; font-size: 13px; }

/* ------------------------------------------------------------ 页面头 */
.page-head { padding: 48px 0 8px; text-align: center; }
.page-head h1 { font-size: 34px; margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; }

/* ------------------------------------------------------------ 下载卡 */
.dl-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.dl-card .card-cover { aspect-ratio: 16 / 9; }
.dl-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.dl-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.meta-tile { background: #f3f7e9; border-radius: 10px; padding: 10px 14px; }
.meta-tile .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.meta-tile .v { font-size: 15px; font-weight: 700; color: #33421f; margin-top: 2px; }
.tip {
  background: #fffdf0;
  border: 1px solid #f2dfa0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #6b5b15;
  margin: 6px 0 16px;
  display: flex; gap: 8px; align-items: flex-start;
}
.dl-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }

/* ------------------------------------------------------------ 论坛 */
.forum-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 48px 0 18px; }
.forum-head h1 { font-size: 32px; margin: 0 0 6px; }
.forum-head p { margin: 0; color: var(--muted); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 26px; }
.tabs a {
  padding: 7px 16px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
  color: #445232;
}
.tabs a.active { background: var(--green-2); border-color: var(--green-2); color: #fff; font-weight: 600; }
.post-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .15s;
}
.post-row:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(47, 84, 17, .10); }
.post-row .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green-2); color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
}
.post-main { flex: 1; min-width: 0; }
.post-main h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.post-main .meta { color: var(--muted); font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.chip { background: #eef4e2; color: #4a6b2a; font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.chip.pin { background: var(--accent); color: #4a3b00; }
.empty {
  background: #fff;
  border: 1px dashed #cfdcc0;
  border-radius: var(--radius);
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
}
.empty .sprout { font-size: 34px; opacity: .45; }
.empty a { color: var(--green-dark); font-weight: 600; }

/* ------------------------------------------------------------ 帖子详情 */
.post-detail { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 28px 32px; }
.post-detail h1 { margin: 0 0 8px; font-size: 26px; }
.post-detail .meta { color: var(--muted); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.post-body { white-space: pre-wrap; font-size: 15px; color: #35402a; }
.reply { border-top: 1px solid var(--line); padding: 16px 0; }
.reply .who { font-weight: 700; font-size: 14px; }
.reply .time { color: var(--muted); font-size: 12px; margin-left: 8px; }
.reply .body { margin-top: 6px; white-space: pre-wrap; color: #35402a; }
.card-box { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 24px 28px; margin-top: 20px; }

/* ------------------------------------------------------------ 表单 */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: #43502f; margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d8e0c8;
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(90, 158, 42, .14); }
.textarea { min-height: 140px; resize: vertical; }
.hint { color: var(--muted); font-size: 12px; margin-top: 5px; }
.auth-box { max-width: 420px; margin: 64px auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 32px; }
.auth-box h1 { margin: 0 0 6px; font-size: 24px; }
.auth-box p.sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------ 提示条 */
.flash { padding: 11px 16px; border-radius: 10px; font-size: 14px; margin: 14px 0; }
.flash.ok { background: #e8f5d9; color: #3d6a12; border: 1px solid #cfe6b3; }
.flash.error { background: #fdeaea; color: #a5322b; border: 1px solid #f4c9c5; }
.flash.warn { background: #fff6dd; color: #7a5a00; border: 1px solid #f2dfa0; }

/* ------------------------------------------------------------ 后台 */
.admin-shell { display: flex; min-height: 100vh; background: #f2f5ea; }
.admin-side {
  width: 220px; flex: none;
  background: #2f3b23;
  color: #dfe8d2;
  padding: 20px 14px;
}
.admin-side .brand { color: #fff; margin-bottom: 22px; font-size: 16px; }
.admin-side a {
  display: block;
  padding: 10px 14px;
  border-radius: 9px;
  color: #cfdcbe;
  font-size: 14px;
  margin-bottom: 4px;
}
.admin-side a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-side a.active { background: var(--green-2); color: #fff; font-weight: 600; }
.admin-side .sep { height: 1px; background: rgba(255, 255, 255, .12); margin: 14px 0; }
.admin-main { flex: 1; padding: 28px 34px; min-width: 0; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-title h1 { font-size: 24px; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 16px 18px; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 26px; font-weight: 800; color: var(--green-dark); margin-top: 2px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid #eef2e6; }
.table th { background: #f7f9f1; color: #55643f; font-weight: 600; font-size: 13px; }
.table tr:last-child td { border-bottom: none; }
.table td.actions { white-space: nowrap; }
.panel { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 20px 22px; margin-bottom: 18px; }
.panel h2 { font-size: 16px; margin: 0 0 14px; }
.inline { display: inline; }
.danger { color: #b03a30; }
.muted { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .cards { grid-template-columns: 1fr; }
  .admin-side { display: none; }
  .nav a { padding: 8px 10px; font-size: 14px; }
}
