/* Style cho thanh đếm ngược thời gian */
#timer-bar-wrapper {
    width: 100%;
    max-width: 300px; /* Cùng chiều rộng với ảnh */
    height: 15px;
    background-color: #e9ecef;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 10px; /* Tạo khoảng cách */
}

#timer-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
    background-size: 200% 100%;
    border-radius: 50px;
}
/* CSS for Word Builder Game */
#game-screen{display:flex;flex-direction:column;align-items:center;gap:20px}
#game-image-wrapper{width:100%;max-width:300px;aspect-ratio:4/3;background-color:#f0f4f8;border-radius:15px;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;min-height:200px}
#game-image-wrapper img{width:100%;height:auto;display:block}
#answer-slots-container{display:flex;gap:10px;min-height:70px;flex-wrap:wrap;justify-content:center}
.answer-slot{width:60px;height:60px;background-color:rgba(255,255,255,.7);border:2px dashed #a2d2ff;border-radius:10px;transition:all .3s ease}
.answer-slot.hover{border-style:solid;border-color:#007bff;background-color:#e7f1ff}
.answer-slot.filled{border-style:solid;border-color:#28a745}
#letter-blocks-container{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;padding:10px;min-height:80px}
.letter-block{width:60px;height:60px;font-size:2em;font-weight:700;font-family:'Fredoka One',cursive;color:#333;background-color:#fff;border:2px solid #ddd;border-radius:10px;cursor:grab;user-select:none;display:flex;justify-content:center;align-items:center;box-shadow:0 4px 10px rgba(0,0,0,.1);transition:opacity .3s,transform .3s}
.letter-block.dragging{opacity:.4;cursor:grabbing}
.letter-block.hidden{opacity:0;pointer-events:none}
@media (max-width:480px){.answer-slot,.letter-block{width:50px;height:50px;font-size:1.8em}}
.instruction {
    text-align: center;
    color: #666;
    font-size: 1rem;
    margin: 10px 0;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 5px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-loading {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
}