/* ============================================================
   给对象修指甲 —— H5 原型样式
   目标：浏览器直接打开即玩。手机竖屏优先，桌面自适应。
   ============================================================ */
:root {
  --ink: #2a2a2a;
  --ink-soft: #6b6b6b;
  --paper: rgba(255, 255, 255, 0.92);
  --paper-card: rgba(255, 255, 255, 0.62);
  --accent: #e8b3b3;      /* 温柔粉，贴近"修指甲"场景 */
  --accent-deep: #c98b8b;
  --gold: #c9a24b;        /* 打钱/进账 */
  --danger: #c64949;      /* 弄疼/失误 */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #efe6e2;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 模式背景层：由 JS 通过 background-image 切换 */
#bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.9);
  transition: background-image 0.4s ease;
  z-index: 0;
}
#bg-dim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.30));
  z-index: 1;
}

/* 舞台：承载 DOM 场景 */
#stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* Canvas 玩法容器 */
#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: none;          /* 玩法场景进入时由 JS 显示 */
  touch-action: none;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border: none;
  border-radius: 22px;
  background: var(--paper-card);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--accent-deep); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; opacity: 0.8; }

.text-center { text-align: center; }
.hidden { display: none !important; }

/* ---------- 起始页 ---------- */
.start {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 18px 28px;
  text-align: center;
  overflow-y: auto;
}
.info-bar {
  font-size: 13px;
  color: #fff;
  background: rgba(0, 0, 0, 0.30);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.info-bar .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  margin-right: 6px;
  vertical-align: middle;
}
.info-bar b { color: #ffe9c9; }
.tag-pill {
  font-size: 13px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 5px 14px;
  border-radius: 18px;
  backdrop-filter: blur(4px);
}
.title {
  margin: 0;
  font-size: clamp(34px, 9vw, 46px);
  font-weight: 800;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  line-height: 1.15;
}
.mode-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 480px;
  margin-top: 8px;
}
.mode-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62));
  color: #2a2a2a;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
  transition: transform 0.14s ease;
}
.mode-card:active { transform: scale(0.97); }
.mode-emoji {
  font-size: 32px;
  filter: drop-shadow(0 4px 10px rgba(194, 24, 91, 0.35));
}
.mode-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(92deg, #c2185b 0%, #e0852f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mode-sub { font-size: 13px; color: #a05f6d; line-height: 1.5; }

/* ---------- 结局页 ---------- */
.end-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 28px;
  text-align: center;
}
.end-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.4);
}
.end-text {
  max-width: 560px;
  font-size: 17px;
  line-height: 1.9;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  padding: 18px 22px;
  border-radius: 14px;
  backdrop-filter: blur(4px);
}
