/* --- BỐ CỤC CÔNG TRƯỜNG XÂY DỰNG --- */
.construction-arena {
    height: 240px;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 60%, #8d6e63 100%);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    border: 5px solid #ff9800;
    border-radius: 12px;
}

/* Nền móng tòa nhà */
.building-base {
    position: absolute;
    bottom: 0;
    left: 40%;
    width: 30%;
    height: 100%;
    background: rgba(0,0,0,0.05);
    border-left: 2px dashed #9e9e9e;
    border-right: 2px dashed #9e9e9e;
    z-index: 1;
}

/* Phần tòa nhà được xây lên (Progress) */
.building-progress {
    position: absolute;
    bottom: 0;
    left: 40%;
    width: 30%;
    height: 0%; /* JS sẽ điều khiển */
    background: repeating-linear-gradient(0deg, #ffcc80, #ffcc80 15px, #fb8c00 15px, #fb8c00 18px);
    border-left: 2px solid #ef6c00;
    border-right: 2px solid #ef6c00;
    z-index: 2;
    transition: height 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hiệu ứng chiến thắng tỏa sáng */
.building-shine {
    box-shadow: 0 0 20px 10px rgba(255, 213, 79, 0.8);
    animation: shine-up 1s infinite alternate;
}
@keyframes shine-up {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.3); }
}

/* Cần cẩu (Bên trái) */
.crane-arm {
    position: absolute;
    top: -10px;
    left: 10%;
    width: 45%;
    height: 40px;
    background: repeating-linear-gradient(45deg, #ffb300, #ffb300 10px, #212121 10px, #212121 20px);
    border-radius: 5px;
    z-index: 4;
    transform-origin: left center;
    transition: all 0.5s ease;
}
.crane-line {
    position: absolute;
    right: 10px;
    top: 40px;
    width: 4px;
    height: 60px;
    background-color: #616161;
}

.idle-crane {
    animation: crane-hover 2s infinite alternate ease-in-out;
}
@keyframes crane-hover {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(2deg); }
}

/* Khối bê tông treo trên cần cẩu */
.block-item {
    position: absolute;
    right: -10px;
    top: 95px; /* Nằm dưới sợi dây cáp */
    font-size: 3rem;
    z-index: 5;
}
.dangling {
    animation: block-swing 1s infinite alternate ease-in-out;
    transform-origin: top center;
}
@keyframes block-swing {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* Hoạt ảnh thả vật liệu đúng */
.crane-drop {
    transform: rotate(5deg);
}
.drop-success {
    animation: drop-down 0.8s ease-in forwards;
}
@keyframes drop-down {
    0% { top: 95px; }
    100% { top: 200px; opacity: 0; }
}

/* Hoạt ảnh sai rớt vật liệu */
.shake-error {
    animation: crane-fail 0.4s infinite;
}
@keyframes crane-fail {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
    100% { transform: rotate(0deg); }
}
.drop-fail {
    animation: fail-fall 0.8s ease-in forwards;
}
@keyframes fail-fall {
    0% { top: 95px; right: -10px; transform: rotate(0deg); }
    100% { top: 250px; right: -50px; transform: rotate(90deg); opacity: 0; }
}

.min-h-75 { min-height: 90px; }