/* --- BỐ CỤC TIỆM TẠP HÓA --- */
.grocery-arena {
    height: 220px;
    background: linear-gradient(180deg, #ffe082 0%, #ffca28 100%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
    position: relative; 
    overflow: hidden;
}

/* Nền tường sọc caro */
.grocery-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.2) 75%, rgba(255,255,255,0.2)),
        linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.2) 75%, rgba(255,255,255,0.2));
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    z-index: 1;
}

/* Quầy thanh toán & Cân */
.grocery-counter {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 80px;
    background: #795548;
    border-top: 5px solid #4e342e;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Cân đồng hồ */
.weighing-scale {
    position: absolute;
    bottom: 70px; /* Nằm trên quầy */
    left: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Đĩa cân */
.scale-plate {
    width: 80px;
    height: 15px;
    background: #cfd8dc;
    border: 2px solid #90a4ae;
    border-radius: 5px 5px 0 0;
    position: relative;
    z-index: 4;
}

/* Đồ vật trên đĩa cân */
.food-item {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    animation: drop-food 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes drop-food {
    0% { transform: translate(-50%, -100px) scale(0); }
    100% { transform: translate(-50%, 0) scale(1); }
}

/* Thân cân */
.scale-body {
    width: 70px;
    height: 70px;
    background: #ef5350; /* Cân màu đỏ đặc trưng */
    border: 3px solid #b71c1c;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 10px rgba(0,0,0,0.4);
    z-index: 3;
    margin-top: -5px;
}

/* Mặt đồng hồ cân */
.scale-dial {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    position: relative;
}

/* Kim cân */
.scale-needle {
    width: 2px;
    height: 25px;
    background: #000;
    position: absolute;
    bottom: 50%; left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-45deg);
    transition: transform 0.5s ease-out;
}

/* Hiệu ứng kim cân nhảy khi trả lời đúng */
.needle-move {
    animation: spin-needle 1s ease-out forwards;
}
@keyframes spin-needle {
    0% { transform: translateX(-50%) rotate(-45deg); }
    50% { transform: translateX(-50%) rotate(180deg); }
    100% { transform: translateX(-50%) rotate(45deg); } /* Dừng ở số ngẫu nhiên */
}

/* Nhân vật Gấu */
.bear-char {
    position: absolute;
    bottom: 30px;
    left: 15%;
    font-size: 4.5rem;
    z-index: 5;
    filter: drop-shadow(3px 5px 4px rgba(0,0,0,0.5));
}

/* Nhảy mừng */
.happy-jump {
    animation: build-jump 0.8s ease-out forwards !important;
}
@keyframes build-jump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-30px) scale(1.1); }
    100% { transform: translateY(0); }
}

/* Rung lắc khi sai */
.shake-error { animation: shake-char 0.4s !important; }
@keyframes shake-char {
    0% { transform: translateX(0); }
    25% { transform: translateX(-15px) rotate(-10deg); }
    50% { transform: translateX(15px) rotate(10deg); }
    75% { transform: translateX(-15px) rotate(-10deg); }
    100% { transform: translateX(0); }
}

.min-h-75 { min-height: 85px; }