/* ========================================
   V80 PET LIFE
======================================== */

#v80LifeBadge{
  position:absolute;
  z-index:20;
  top:calc(env(safe-area-inset-top) + 101px);
  left:50%;
  transform:translateX(-50%);

  height:31px;
  padding:0 11px;

  border:1px solid rgba(255,255,255,.58);
  border-radius:999px;

  display:flex;
  align-items:center;
  gap:5px;

  background:rgba(255,252,247,.86);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);

  color:#425047;

  box-shadow:0 6px 18px rgba(20,35,27,.09);

  font-size:10px;

  white-space:nowrap;
}

#v80LifeBadge span{
  font-size:13px;
}

#v80LifeBadge b{
  font-size:11px;
}

#v80LifeBadge small{
  opacity:.58;
  font-size:9px;
}

#v80LifeBadge[data-state="happy"]{
  background:rgba(239,249,241,.90);
  color:#397057;
}

#v80LifeBadge[data-state="hungry"]{
  background:rgba(255,244,218,.92);
  color:#8c6634;
}

#v80LifeBadge[data-state="weak"]{
  background:rgba(245,232,220,.94);
  color:#8a5b48;
}

#v80LifeBadge[data-state="sick"]{
  background:rgba(239,229,222,.95);
  color:#875349;
}

#v80LifeBadge[data-state="dead"]{
  background:rgba(55,55,55,.78);
  color:white;
  border-color:rgba(255,255,255,.18);
}


/* ========= 状态视觉 ========= */

img[data-life-state="happy"]{
  filter:
    saturate(1.08)
    brightness(1.025)
    drop-shadow(0 16px 16px rgba(27,56,39,.16));
}

#playPetImage[data-life-state="happy"]{
  animation:v80HappyIdle 3s ease-in-out infinite;
}

@keyframes v80HappyIdle{
  0%,100%{
    margin-top:0;
  }
  50%{
    margin-top:-5px;
  }
}


img[data-life-state="hungry"]{
  filter:
    saturate(.82)
    brightness(.96)
    drop-shadow(0 15px 15px rgba(34,42,34,.15));
}


img[data-life-state="weak"]{
  filter:
    saturate(.62)
    brightness(.91)
    contrast(.96)
    drop-shadow(0 13px 13px rgba(30,38,33,.13));
}


img[data-life-state="sick"]{
  filter:
    saturate(.48)
    brightness(.88)
    grayscale(.16)
    drop-shadow(0 12px 12px rgba(30,35,32,.12));
}


img[data-life-state="dead"]{
  filter:
    grayscale(.82)
    saturate(.22)
    brightness(.78)
    opacity(.65)
    drop-shadow(0 9px 9px rgba(25,25,25,.10));

  opacity:.72;
}


/* ========= 生病时互动场景 ========= */

.page-play[data-life-state="sick"] #playStage::after{
  background:
    linear-gradient(
      to bottom,
      rgba(80,92,86,.10),
      rgba(80,88,84,.05) 40%,
      rgba(24,29,27,.35)
    ) !important;
}

.page-play[data-life-state="dead"] #playStage::after{
  background:
    linear-gradient(
      to bottom,
      rgba(75,78,76,.17),
      rgba(65,67,66,.09) 45%,
      rgba(24,25,25,.48)
    ) !important;
}


/* ========= 死亡后的按钮 ========= */

#v80DeadAction{
  position:absolute;
  z-index:24;

  left:50%;
  bottom:calc(145px + env(safe-area-inset-bottom));

  transform:translateX(-50%);

  height:42px;
  padding:0 17px;

  border:1px solid rgba(255,255,255,.45);
  border-radius:999px;

  background:rgba(48,48,47,.76);
  color:white;

  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);

  box-shadow:0 9px 24px rgba(20,20,20,.16);

  font-size:12px;
  font-weight:750;

  white-space:nowrap;
}


/* ========= 我的页面健康状态 ========= */

.v80-health-chip{
  height:27px;
  padding:0 9px;

  display:flex;
  align-items:center;
  gap:4px;

  border-radius:999px;

  background:#edf3ed;
  color:#557063;

  font-size:10px;
  font-weight:700;
}

.v80-health-chip.low{
  background:#f5e7df;
  color:#965f50;
}


/* ========= 状态详情 ========= */

.v80-life-detail{
  margin-top:15px;

  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.v80-life-stat{
  padding:14px 7px;

  border-radius:18px;

  background:#fff;

  border:1px solid rgba(70,60,50,.07);

  text-align:center;
}

.v80-life-stat span,
.v80-life-stat b,
.v80-life-stat small{
  display:block;
}

.v80-life-stat span{
  font-size:22px;
}

.v80-life-stat b{
  margin-top:5px;
  font-size:18px;
}

.v80-life-stat small{
  margin-top:2px;
  font-size:9px;
  color:#9a9289;
}

.v80-life-tip{
  margin-top:12px;
  padding:12px 13px;

  border-radius:16px;

  background:#f3efe9;

  color:#70665e;

  font-size:11px;
  line-height:1.65;
}


/* 死亡状态动作、喂食入口稍微降低 */
.page-play[data-life-state="dead"] .play-v71-tools{
  opacity:.52;
}


@media(max-height:760px){

  #v80LifeBadge{
    top:calc(env(safe-area-inset-top) + 92px);
  }

  #v80DeadAction{
    bottom:calc(136px + env(safe-area-inset-bottom));
  }

}
