.word-pool {
    min-height: 50px;
    border: 2px dashed #4a90e2; /* Viền xanh dương nhạt, nét đứt */
    padding: 10px;
    margin-bottom: 20px;
    background-color: #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center; /* Các từ nằm trên cùng và căn giữa */
    gap: 5px;
    border-radius: 10px; /* Bo tròn viền */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Bóng nhẹ */
}

.droppable-column {
    border: 2px dashed #ff6f61; /* Viền đỏ cam nhạt, nét đứt */
    padding: 10px;
    margin-bottom: 20px;
    background-color: transparent; /* Nền trong suốt */
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start; /* Các từ nằm trên cùng */
    justify-content: center; /* Căn giữa các từ theo chiều ngang */
    gap: 5px;
    min-height: 50px;
    height: auto;
    position: relative;
    overflow: visible;
    z-index: 0; /* Cột ở mức thấp hơn từ */
    border-radius: 10px; /* Bo tròn viền */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Bóng nhẹ */
}

.draggable-word {
    padding: 4px 10px; /* Padding phù hợp với chữ 28px */
    margin: 5px;
    background-color: #007bff;
    color: white;
    cursor: move;
    border-radius: 5px;
    font-size: 28px; /* Cỡ chữ 28px */
    line-height: 1.1;
    display: inline-block;
    position: static; /* Giữ static để tuân theo flexbox */
    z-index: 10; /* Tất cả từ đều ở lớp trên cùng */
}

.correct-word {
    background-color: #28a745 !important;
}

.incorrect-word {
    background-color: #dc3545 !important;
}

.repositioned-correct {
    background-color: #ff8c00 !important;
}

.ui-state-highlight {
    background-color: #ffeb3b !important;
}
#result {
    font-size: 1.2em;
    font-weight: bold;
}

/* Căn giữa, tô đậm và đổi màu tiêu đề chủ đề */
#topic1, #topic2, #topic3 {
    text-align: center;
    font-weight: bold; /* Tô đậm */
    color: #007bff; /* Màu xanh dương */
}

#score, #correctCount, #totalCount {
    font-size: 1.5em;
    color: #28a745;
}

/* Định dạng nút chọn tệp */
#excelFile {
    background-color: #4a90e2; /* Nền xanh dương nhạt */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px; /* Bo tròn */
    cursor: pointer;
    transition: background-color 0.3s ease; /* Hiệu ứng chuyển màu */
}

#excelFile:hover {
    background-color: #357abd; /* Đậm hơn khi hover */
}

/* Định dạng nút Tải file mẫu */
#downloadSampleBtn {
    margin-left: auto; /* Đẩy nút sang bên phải */
}

/* Tăng khoảng cách giữa hai nút Kiểm tra và Làm lại */
.d-flex.justify-content-center.gap-2 {
    gap: 30px; /* Tăng khoảng cách giữa hai nút lên 30px */
}

/* Media Queries cho thiết bị nhỏ */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 1rem;
    }

    .draggable-word {
        padding: 3px 8px;
        font-size: 20px;
        line-height: 1.1;
        margin: 3px;
    }

    .droppable-column {
        padding: 8px;
        min-height: 40px;
    }

    .word-pool {
        padding: 8px;
        min-height: 40px;
    }

    #score, #correctCount, #totalCount {
        font-size: 1.2em;
    }

    #result {
        font-size: 1em;
    }

    .btn {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    #excelFile {
        padding: 6px 12px;
    }

    .d-flex.justify-content-center.gap-2 {
        gap: 20px; /* Giảm khoảng cách trên màn hình nhỏ */
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    h4 {
        font-size: 0.9rem;
    }

    .draggable-word {
        padding: 2px 6px;
        font-size: 16px;
        line-height: 1.1;
        margin: 2px;
    }

    .droppable-column {
        padding: 6px;
        min-height: 30px;
    }

    .word-pool {
        padding: 6px;
        min-height: 30px;
    }

    #score, #correctCount, #totalCount {
        font-size: 1em;
    }

    #result {
        font-size: 0.9em;
    }

    .btn {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    #excelFile {
        padding: 5px 10px;
    }

    .d-flex.justify-content-center.gap-2 {
        gap: 15px; /* Giảm thêm khoảng cách trên màn hình rất nhỏ */
    }
}