:root {
  --sky-top: #7ec8ff;
  --sky-bottom: #d8f2ff;
  --grass: #79c96b;
  --grass-dark: #5cab4f;
  --text: #2b2b3a;
  --muted: #6b7280;
  --card: #ffffff;
  --accent: #ff9f43;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 55%, var(--grass) 55%, var(--grass-dark) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- 主内容 ---------- */
.main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 20px;
}

.brand {
  text-align: center;
  margin-bottom: 8px;
}

.brand h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  margin: 0;
  letter-spacing: 2px;
  background: linear-gradient(120deg, #fff, #ffd9a0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 14px rgba(0,0,0,.15);
  font-weight: 800;
}

.brand p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.95);
  font-size: 1.05rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* ---------- 场景 ---------- */
.scene {
  position: relative;
  width: min(560px, 92vw);
  aspect-ratio: 1 / 0.62;
  margin: 24px 0;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, #a8dcff 0%, #dff4ff 60%, #86cd76 60%, #5fb24f 100%);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}

/* 太阳 */
.scene .sun {
  position: absolute;
  top: 14px;
  right: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3b0, #ffd54d);
  box-shadow: 0 0 30px 8px rgba(255, 213, 77, .6);
  animation: sunspin 14s linear infinite;
}
@keyframes sunspin { to { transform: rotate(360deg); } }

/* 云朵 */
.cloud {
  position: absolute;
  background: rgba(255,255,255,.9);
  border-radius: 50px;
  animation: drift 22s ease-in-out infinite;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
}
.cloud.c1 { width: 74px; height: 26px; top: 20px; left: 8%; }
.cloud.c1::before { width: 34px; height: 34px; left: 10px; top: -16px; }
.cloud.c1::after { width: 26px; height: 26px; right: 10px; top: -10px; }
.cloud.c2 { width: 56px; height: 20px; top: 52px; left: 60%; animation-delay: -8s; }
.cloud.c2::before { width: 26px; height: 26px; left: 8px; top: -13px; }
.cloud.c2::after { width: 20px; height: 20px; right: 8px; top: -8px; }
@keyframes drift {
  0% { transform: translateX(-10px); }
  50% { transform: translateX(26px); }
  100% { transform: translateX(-10px); }
}

/* 草地装饰 */
.flower { position: absolute; bottom: 6px; font-size: 22px; }
.flower.f1 { left: 6%; }
.flower.f2 { right: 8%; bottom: 12px; font-size: 18px; }
.flower.f3 { left: 46%; bottom: 4px; font-size: 16px; }

/* 皮球 */
.ball {
  position: absolute;
  bottom: 34px;
  left: 50%;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ffd166, #ef476f);
  box-shadow: 0 3px 0 rgba(0,0,0,.2);
  animation: ballbounce 1.6s ease-in-out infinite;
}
@keyframes ballbounce {
  0%, 100% { transform: translateY(0) scaleX(1); }
  50% { transform: translateY(-46px) scaleX(.92); }
}

/* 小狗 */
.pet { position: absolute; bottom: 30px; width: 108px; height: 108px; }
.dog { left: 12%; }
.mouse { right: 12%; }

.pet .body {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 72px;
  height: 62px;
  transform: translateX(-50%);
  border-radius: 45% 45% 42% 42%;
}
.dog .body { background: #c8874e; }
.mouse .body { background: #b9bfc9; }

/* 头 */
.pet .head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 66px;
  height: 58px;
  border-radius: 48%;
  z-index: 2;
}
.dog .head { background: #d99a63; }
.mouse .head { background: #c7ccd6; }

/* 耳朵 */
.pet .ear {
  position: absolute;
  top: 2px;
  width: 24px;
  height: 26px;
  border-radius: 50%;
  z-index: 1;
}
.dog .ear { background: #c8874e; }
.dog .ear.left { left: 4px; transform: rotate(-18deg); }
.dog .ear.right { right: 4px; transform: rotate(18deg); }
.mouse .ear { background: #d5dae2; border: 6px solid #f0a3b0; }
.mouse .ear.left { left: 2px; }
.mouse .ear.right { right: 2px; }

/* 眼睛 */
.eye { position: absolute; width: 8px; height: 10px; border-radius: 50%; background: #222; top: 22px; }
.eye::after {
  content: "";
  position: absolute; top: 1px; left: 2px;
  width: 3px; height: 3px; border-radius: 50%; background: #fff;
}
.dog .eye.left { left: 18px; }
.dog .eye.right { right: 18px; }
.mouse .eye.left { left: 20px; }
.mouse .eye.right { right: 20px; }

/* 鼻子 */
.nose {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 9px;
  border-radius: 50%;
  background: #2b2b3a;
}
.mouse .nose { background: #ef476f; }

/* 嘴 */
.mouth {
  position: absolute;
  top: 43px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 8px;
  border-top: 2.5px solid #2b2b3a;
  border-radius: 0 0 16px 16px;
}
.mouse .mouth { border-top-color: #ef476f; }

/* 胡须 */
.whisker {
  position: absolute;
  top: 36px;
  width: 20px; height: 2px;
  background: rgba(43,43,58,.45);
  border-radius: 2px;
}
.mouse .whisker.l1 { left: -16px; transform: rotate(-14deg); }
.mouse .whisker.l2 { left: -16px; top: 42px; transform: rotate(14deg); }
.mouse .whisker.r1 { right: -16px; transform: rotate(14deg); }
.mouse .whisker.r2 { right: -16px; top: 42px; transform: rotate(-14deg); }

/* 尾巴 */
.tail {
  position: absolute;
  width: 26px; height: 26px;
  border: 5px solid #222;
  border-color: transparent transparent #b9bfc9 #b9bfc9;
  border-radius: 50%;
}
.mouse .tail { right: -16px; bottom: 4px; transform: rotate(-12deg); animation: tailwiggle 1.2s ease-in-out infinite; }
.dog .tail { left: -12px; bottom: 6px; border-color: transparent transparent #c8874e #c8874e; animation: tailwiggle .7s ease-in-out infinite; }
@keyframes tailwiggle {
  0%, 100% { transform: rotate(-12deg); }
  50% { transform: rotate(12deg); }
}

/* 腿 */
.leg {
  position: absolute;
  bottom: -2px;
  width: 18px; height: 20px;
  border-radius: 40%;
}
.dog .leg { background: #b5793f; }
.mouse .leg { background: #a6adba; }
.leg.fl { left: 14px; }
.leg.fr { right: 14px; }
.dog .leg.fl, .dog .leg.fr, .mouse .leg.fl, .mouse .leg.fr { animation: legbounce .8s ease-in-out infinite; }
.dog .leg.fr, .mouse .leg.fr { animation-delay: .4s; }
@keyframes legbounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 小狗与老鼠整体上下跳动玩耍 */
.dog { animation: hopdog 1.6s ease-in-out infinite; }
.mouse { animation: hopmouse 1.6s ease-in-out infinite; }
@keyframes hopdog {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes hopmouse {
  0%, 100% { transform: translateY(-12px); }
  50% { transform: translateY(0); }
}

/* 泡泡/爱心 */
.heart {
  position: absolute;
  font-size: 20px;
  animation: floatheart 3s ease-in-out infinite;
  opacity: .9;
}
.heart.h1 { top: 14px; left: 40%; animation-delay: 0s; }
.heart.h2 { top: 26px; left: 55%; animation-delay: 1.2s; font-size: 15px; }
@keyframes floatheart {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.2); }
}

/* ---------- 说明文字 ---------- */
.note {
  text-align: center;
  background: rgba(255,255,255,.92);
  border-radius: 18px;
  padding: 16px 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  margin: 4px 0 28px;
}
.note .coming {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.note .sub { margin-top: 4px; color: var(--muted); font-size: .95rem; }

/* 防篡改警示 */
.warn {
  text-align: center;
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f5b5b0;
  border-radius: 14px;
  padding: 14px 20px;
  margin: 0 0 20px;
  font-weight: 600;
  max-width: min(560px, 92vw);
}

/* ---------- 页脚备案 ---------- */
footer.site-footer {
  flex-shrink: 0;
  padding: 22px 16px 26px;
  text-align: center;
  color: #f0f7ef;
  text-shadow: 0 1px 3px rgba(0,0,0,.25);
  font-size: .9rem;
  line-height: 1.9;
}
footer.site-footer .beian {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
footer.site-footer a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.5);
  transition: border-color .2s;
}
footer.site-footer a:hover { border-bottom-color: #fff; }
footer.site-footer .gov {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
footer.site-footer .gov svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- 管理后台 ---------- */
.admin-wrap {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.admin-head h2 { margin: 0; font-size: 1.6rem; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.25); }
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,.16);
  margin-bottom: 20px;
}
.card h3 { margin: 0 0 14px; font-size: 1.05rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.stat {
  background: #f6f8fb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.stat .num { font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.stat .lbl { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.chart-box { width: 100%; height: 220px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eef1f5; white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 600; }
.tbl td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .8rem; font-weight: 600;
}
.badge.ok { background: #e6f7e6; color: #1a7f37; }
.badge.bad { background: #fdecea; color: #b3261e; }
.badge.warn { background: #fff4e0; color: #a15c00; }
.btn {
  display: inline-block; padding: 8px 16px; border-radius: 10px; border: 0;
  cursor: pointer; font-weight: 600; text-decoration: none; font-size: .9rem;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: #eef1f5; color: var(--text); }
.btn.ghost-danger { background: #fdecea; color: #b3261e; }
.btn:hover { opacity: .9; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.login-box {
  width: min(380px, 92vw); margin: 12vh auto 0; background: #fff; border-radius: 18px;
  padding: 30px; box-shadow: 0 16px 40px rgba(0,0,0,.22);
}
.login-box h2 { margin: 0 0 6px; text-align: center; }
.login-box p.hint { text-align: center; color: var(--muted); font-size: .85rem; margin: 0 0 18px; }
.login-box input {
  width: 100%; padding: 12px; border: 1px solid #d9dee5; border-radius: 10px; font-size: 1rem;
}
.login-box .btn { width: 100%; margin-top: 14px; padding: 12px; }
.error { color: #b3261e; font-size: .9rem; margin-top: 10px; text-align: center; }
.muted { color: var(--muted); font-size: .85rem; }
