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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  user-select: none;
}

#app {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #ffe3ec 0%, #cdeaff 55%, #d8f5d0 100%);
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 顶部栏 */
#topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  z-index: 10;
}
.title {
  font-size: 20px;
  font-weight: 800;
  color: #ff6f9c;
  text-shadow: 0 2px 0 #fff, 0 4px 10px rgba(255,150,180,.35);
  letter-spacing: 1px;
}
.stats {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.65);
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(255,150,180,.25);
}
.label { font-size: 12px; color: #a06a80; font-weight: 700; }
.bar {
  width: 90px; height: 10px;
  background: rgba(255,255,255,.8);
  border-radius: 999px;
  overflow: hidden;
}
.fill {
  height: 100%;
  width: 80%;
  border-radius: 999px;
  transition: width .5s ease;
}
.fill.hunger { background: linear-gradient(90deg,#ffb16b,#ff7a59); }
.fill.mood   { background: linear-gradient(90deg,#ffd36b,#ff8fc7); }
.fill.friend { background: linear-gradient(90deg,#7be0ff,#9a8bff); }
.level {
  margin-left: auto;
  background: linear-gradient(135deg,#ff8fb3,#ffb86b);
  color: #fff;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255,140,170,.4);
}

/* 对话气泡 */
#bubble {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  background: #fff;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 15px;
  color: #6b4a58;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(180,120,150,.3);
  z-index: 11;
  animation: pop .3s ease;
}
#bubble.hidden { display: none; }
#bubble .tail {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #fff;
}
@keyframes pop {
  0% { transform: translateX(-50%) scale(.6); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* 底部按钮 */
#actions {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 12px;
  z-index: 10;
}
#actions button {
  border: none;
  background: rgba(255,255,255,.85);
  color: #ff6f9c;
  font-size: 15px;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 5px 0 #ffc2d4, 0 8px 16px rgba(255,150,180,.35);
  transition: transform .1s ease, box-shadow .1s ease;
}
#actions button:hover { transform: translateY(-2px); }
#actions button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #ffc2d4, 0 3px 8px rgba(255,150,180,.35);
}

#hint {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #9b7a88;
  background: rgba(255,255,255,.5);
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 9;
}

@media (max-width: 480px) {
  .title { font-size: 17px; }
  .bar { width: 60px; }
  #actions button { padding: 10px 14px; font-size: 13px; }
}
