/* ==========================================================================
   老鹰抓兔子 —— 样式
   ========================================================================== */

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #16310f;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  user-select: none;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* ---------- 左上角状态栏 ---------- */

#hud {
  position: fixed;
  top: 18px;
  left: 18px;
  padding: 12px 16px;
  background: rgba(12, 26, 8, .55);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  color: #eaf5e0;
}

#hud .label {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: .7;
  margin-bottom: 6px;
}

#hud .bar {
  width: 240px;
  height: 14px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .45);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6);
}

#fill {
  height: 100%;
  width: 100%;
  border-radius: 7px;
  background: #6cc24a;
  transition: width .08s linear, background-color .3s;
}

#hud .row {
  margin-top: 9px;
  font-size: 13px;
  opacity: .85;
  display: flex;
  gap: 14px;
}

#hud .row b { color: #ffd76e; }
#combo { color: #ffb347 !important; }

/* ---------- 底部提示 ---------- */

#tip {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(12, 26, 8, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #eaf5e0;
  font-size: 13px;
  letter-spacing: 1px;
  transition: opacity .8s;
  pointer-events: none;
}

#tip.hide { opacity: 0; }

/* ---------- 开场 ---------- */

#intro {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: rgba(6, 14, 4, .55);
  backdrop-filter: blur(3px);
  color: #eef6e6;
  cursor: pointer;
  transition: opacity .8s;
}

#intro.hide { opacity: 0; pointer-events: none; }

#intro .poem {
  text-align: center;
  line-height: 2.1;
  font-size: 19px;
  letter-spacing: 3px;
  opacity: .92;
}

#intro .poem p { margin: 0; }

#intro .hint {
  font-size: 13px;
  letter-spacing: 4px;
  opacity: .5;
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .3; }
  50%      { opacity: .8; }
}

/* ---------- 剧情卡（可翻多页） ---------- */

#story {
  position: fixed;
  inset: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 14, 4, .62);
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity .45s;
  cursor: pointer;
}

#story.hidden { opacity: 0; pointer-events: none; }

#story .card {
  max-width: 620px;
  padding: 8px 40px;
  text-align: center;
  color: #f2f7ea;
  animation: fadeUp .5s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

#story .lines {
  font-size: 18px;
  line-height: 2.4;
  letter-spacing: 3px;
  opacity: .95;
}

#story .lines p { margin: 0; }

#story .page {
  margin-top: 30px;
  font-size: 12px;
  letter-spacing: 3px;
  opacity: .38;
}

#story .hint {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 5px;
  opacity: .45;
  animation: pulse 2.2s ease-in-out infinite;
}

/* ---------- 结算 ---------- */

#overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 26vh;
  background: rgba(6, 14, 4, .55);
  backdrop-filter: blur(3px);
  opacity: 1;
  transition: opacity .6s;
}

#overlay.hidden { opacity: 0; pointer-events: none; }

#overlay .panel {
  text-align: center;
  color: #eaf5e0;
  padding: 30px 52px;
  border-radius: 20px;
  background: rgba(18, 36, 12, .88);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  max-width: 480px;
}

#overlay h1 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: 6px;
  font-weight: 600;
}

#overlay .lines {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 2;
  opacity: .78;
}

#overlay .lines p { margin: 0; }

#overlay .score {
  margin: 0 0 24px;
  font-size: 14px;
  opacity: .8;
}

#overlay .score b {
  color: #ffd76e;
  font-size: 20px;
}

#restart {
  padding: 11px 34px;
  font-size: 15px;
  letter-spacing: 2px;
  color: #12240b;
  background: #8fd463;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .12s, background-color .2s;
}

#restart:hover {
  background: #a5e378;
  transform: translateY(-2px);
}