/* --- BỐ CỤC PHÒNG THÍ NGHIỆM --- */
.lab-arena {
    height: 240px;
    background: linear-gradient(180deg, #311b92 0%, #1a237e 100%); /* Màu tím thẫm ma mị */
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
    position: relative; 
    overflow: hidden;
    border-radius: 12px;
}

/* Nền tường gạch tối màu */
.magic-lab-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 2px, transparent 2px);
    background-size: 40px 40px;
    z-index: 1;
}

/* Vạc phép thuật */
.magic-cauldron {
    position: absolute;
    bottom: 20px;
    left: 60%;
    transform: translateX(-50%);
    width: 100px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #424242, #111);
    border-radius: 5px 5px 40px 40px;
    border: 4px solid #000;
    box-shadow: inset -10px -10px 20px rgba(0,0,0,0.8), 0 10px 15px rgba(0,0,0,0.5);
    z-index: 3;
}

/* Viền miệng vạc */
.magic-cauldron::before {
    content: '';
    position: absolute;
    top: -10px; left: -10px;
    width: 112px; height: 15px;
    background: #212121;
    border-radius: 10px;
    border: 3px solid #000;
}

/* Mặt chất lỏng trong vạc */
.cauldron-liquid {
    position: absolute;
    top: -5px; left: 5px;
    width: 82px; height: 10px;
    border-radius: 50%;
    z-index: 4;
    transition: background-color 0.5s ease;
}

/* Bong bóng nổi lên */
.cauldron-bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.8;
    z-index: 2;
    animation: bubble-up 2s infinite ease-in;
}

.b1 { width: 15px; height: 15px; left: 20px; bottom: 80px; animation-duration: 2.5s; }
.b2 { width: 20px; height: 20px; left: 50px; bottom: 80px; animation-duration: 1.8s; animation-delay: 0.5s; }
.b3 { width: 12px; height: 12px; left: 70px; bottom: 80px; animation-duration: 2.2s; animation-delay: 1s; }

@keyframes bubble-up {
    0% { transform: translateY(0) scale(0.5); opacity: 0.8; }
    100% { transform: translateY(-60px) scale(1.5); opacity: 0; }
}

/* Hiệu ứng khi tính đúng (Vạc bừng sáng) */
.potion-success {
    animation: magic-glow 1s ease-out forwards;
}
@keyframes magic-glow {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); filter: brightness(1.5); }
    100% { transform: translateX(-50%) scale(1); filter: brightness(1.2); }
}

/* Hiệu ứng khi tính sai (Nổ rung lắc đỏ) */
.potion-explode {
    animation: explode-red 0.5s forwards;
}
@keyframes explode-red {
    0% { transform: translateX(-50%) scale(1); filter: drop-shadow(0 0 10px #f44336); }
    25% { transform: translateX(-60%) scale(1.2); filter: drop-shadow(0 0 30px #f44336) hue-rotate(-50deg); }
    50% { transform: translateX(-40%) scale(1.2); filter: drop-shadow(0 0 50px #d32f2f) hue-rotate(-50deg); }
    75% { transform: translateX(-60%) scale(1.2); filter: drop-shadow(0 0 30px #f44336) hue-rotate(-50deg); }
    100% { transform: translateX(-50%) scale(1); filter: drop-shadow(0 0 0 transparent); }
}

/* Nhân vật Pháp sư */
.wizard-char {
    position: absolute;
    bottom: 20px;
    left: 15%;
    font-size: 5rem;
    z-index: 5;
    filter: drop-shadow(0 5px 10px 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; }