#game-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#lawn {
    position: relative;
    background-color: #27ae60;
    cursor: crosshair;
    background-image: 
        linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

.entity {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    flex-direction: column;
}

.hp-bar-bg {
    position: absolute;
    top: -5px;
    width: 80%;
    height: 4px;
    background: #555;
    border-radius: 2px;
}

.hp-bar-fill {
    height: 100%;
    width: 100%;
    background: #e74c3c;
    transition: width 0.2s;
}

.plant .hp-bar-fill { background: #2ecc71; }

.bullet {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #f1c40f;
    border-radius: 50%;
    box-shadow: 0 0 5px orange;
    z-index: 3;
}

.plant-emoji {
    font-size: 36px;
    line-height: 1;
    pointer-events: none;
}

/* ---- 撑杆僵尸跳跃 ---- */
.zombie-jumping {
    z-index: 10;
}

/* ---- 食人花咀嚼 ---- */
.chomper-chewing {
    animation: chomperChew 1.5s ease-in-out infinite;
}
@keyframes chomperChew {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(5deg); }
}

/* ---- 樱桃炸弹引信 ---- */
.cherrybomb-fuse {
    animation: fuseBlink 0.2s ease-in-out infinite alternate;
}
@keyframes fuseBlink {
    from { filter: brightness(1); }
    to { filter: brightness(2) saturate(2); }
}

/* ---- 樱桃炸弹爆炸 ---- */
.cherrybomb-explode {
    animation: explode 0.5s ease-out forwards;
}
@keyframes explode {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(3); opacity: 0.8; }
    100% { transform: scale(4); opacity: 0; }
}

/* ---- 坚果墙 ---- */
.plant-wallnut {
    transition: transform 0.3s, opacity 0.3s;
}

#wave-message {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #e74c3c;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    z-index: 50;
    display: none;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.5s ease;
}
