/* =========================================================================
   动画与 3D 演出（浅银灰 · 冷亮灰 · 近白系：植物种下 = 平躺卡 翻起立直）
   ========================================================================= */

/* ===== 植物 = 浅色卡（保留翻起立直演出） ===== */
.plant {
  position: absolute; inset: 0;
  perspective: 700px; pointer-events: none;
}
.plant .card-3d {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(55deg) scale(.7); opacity: 0;
  transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .35s;
  border-radius: 10px; overflow: visible;
  background: #FFFFFF;
  border: 1px solid #D4DAE1;
  box-shadow: 0 3px 8px rgba(20,28,40,.14), 0 1px 0 rgba(255,255,255,.7);
  display: flex; flex-direction: column;
}
.plant.placed .card-3d { transform: rotateX(4deg) scale(1); opacity: 1; }

/* 上半：冷亮灰展示窗（图片区 2/5） */
.plant .plant-stage {
  position: relative; flex: 0 0 40%;
  background: linear-gradient(180deg, #F1F4F7 0%, #E4E9EF 100%);
  border-bottom: 1px solid #D4DAE1;
  display: flex; align-items: flex-end; justify-content: center;
  transform-style: preserve-3d; overflow: visible;
}


/* 漂浮的植物角色 */
.plant .plant-3d {
  position: relative; z-index: 3; font-size: clamp(18px, 5vmin, 26px); line-height: 1;
  transform: translateY(-4%) translateZ(10px);
  filter: drop-shadow(0 4px 4px rgba(20,28,40,.25));
  animation: float3d 3s ease-in-out infinite;
}

.plant .plant-shadow {  /* 卡面上的接触阴影 */
  position: absolute; bottom: 6px; left: 50%; width: 34px; height: 8px;
  background: radial-gradient(ellipse, rgba(20,28,40,.3) 0%, transparent 70%);
  border-radius: 50%; transform: translateX(-50%) translateZ(2px); z-index: 2;
  animation: shadow-pulse 3s ease-in-out infinite;
}

/* 下半：白底信息板（文字区 3/5） */
.plant .text-stage {
  flex: 0 0 60%;
  background: #FFFFFF;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2px 3px 1px 3px; gap: 1px; position: relative; overflow: hidden;
}


.plant .text-main {
  font-size: clamp(7px, 2vmin, 9px); font-weight: 800; color: #2C333B;
  letter-spacing: .5px; line-height: 1; position: relative; z-index: 1; white-space: nowrap;
}


.plant .text-sub {
  font-size: clamp(7px, 1.8vmin, 8px); color: #6E7681; font-weight: 600;
  letter-spacing: .2px; line-height: 1.1; position: relative; z-index: 1; text-align: center;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding: 0 2px;
}
.plant .text-sub:empty { display: none; }


/* 植物血条（顶部细条） */
.plant .hpbar {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 56%; height: 5px; background: rgba(44,51,59,.18); border-radius: 3px;
  overflow: hidden; opacity: 0; transition: opacity .2s; z-index: 6;
}
.plant.hurt .hpbar { opacity: 1; }
.plant .hpfill { display: block; height: 100%; width: 100%; background: #5B7E9E; transition: width .15s; }

/* ===== 场上卡牌战斗图标（左上角 / 右上角，纯图标无外框） ===== */
.plant .card-role {
  position: absolute; top: 3px; left: 3px; z-index: 5;
  font-size: clamp(11px, 2.2vmin, 16px); line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}
.plant .card-sub {
  position: absolute; top: 3px; right: 3px; z-index: 5;
  font-size: clamp(11px, 2.2vmin, 16px); line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}

/* 点植物后弹出的解释气泡 */
.concept-bubble {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  margin-bottom: 8px; width: max-content; max-width: 210px;
  background: #FFFFFF; color: #2C333B; border: 1px solid #D4DAE1; border-radius: 10px;
  padding: 8px 11px; box-shadow: 0 6px 20px rgba(20,28,40,.16); z-index: 30;
  text-align: center; pointer-events: none; line-height: 1.35;
  animation: bubbleIn .18s ease-out;
}
.concept-bubble b { display: block; font-size: 12px; color: #5B7E9E; margin-bottom: 3px; }
.concept-bubble span { display: block; font-size: 11px; color: #6E7681; }
.concept-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #D4DAE1;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateX(-50%) translateY(3px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== 关键帧 ===== */
/* 植物在展示窗里漂浮 */
@keyframes float3d {
  0%, 100% { transform: translateY(-4%) translateZ(10px) rotate(-3deg); }
  50%      { transform: translateY(-8%) translateZ(10px) rotate(3deg); }
}

/* 接触阴影脉动 */
@keyframes shadow-pulse {
  0%, 100% { transform: translateX(-50%) translateZ(2px) scaleX(1);   opacity: .7; }
  50%      { transform: translateX(-50%) translateZ(2px) scaleX(.65); opacity: .35; }
}
/* 僵尸行走颠簸 */
@keyframes zwalk {
  0%   { transform: translateY(-2px) rotate(-3deg); }
  100% { transform: translateY(2px) rotate(3deg); }
}
/* 啃食：停止行走，改为低头啃咬（下探 + 挤压） */
.zombie.eating .zemoji { animation: zchomp .38s ease-in-out infinite; }
@keyframes zchomp {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  45%      { transform: translateY(3px) scale(1.1, 0.88); }
  55%      { transform: translateY(3px) scale(1.1, 0.88); }
}
/* 阳光掉落中的呼吸 */
@keyframes sunBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.16); }
}
/* 阳光计数器收到自动收集时的弹跳 */
.stat.bump { animation: statBump .32s ease; }
@keyframes statBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}
