/* Container chung */
.ahodownload-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    /* **SỬA**: Thay đổi để các nút xếp hàng ngang và tự xuống dòng */
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px; /* Giữ khoảng cách giữa các nút */
    padding: 20px;
}

/* Wrapper cho từng nút */
.ahodownload-wrapper {
    position: relative;
    width: auto;
    display: inline-block;
}

/* Nút download ban đầu */
.ahodownload-btn {
    width: auto; 
    display: inline-block;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 25px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ahodownload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ahodownload-btn i {
    margin-right: 8px;
}

/* Thanh tiến trình giữ nguyên độ rộng tối đa */
.ahodownload-progress-bar {
    max-width: 400px;
    width: 100%;
    background-color: #e9ecef;
    border-radius: 50px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ... các style còn lại giữ nguyên ... */
.ahodownload-progress-inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 50px;
    transition: width 0.5s ease-in-out;
}
.ahodownload-progress-inner.creating {
    background-color: #0d6efd;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 30px 30px;
    animation: progress-bar-stripes 0.8s linear infinite;
}
.ahodownload-progress-inner.scanning {
    background-color: #198754;
    position: relative;
    overflow: hidden;
}
.ahodownload-progress-inner.scanning::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: scanner-effect 2s infinite linear;
}
@keyframes progress-bar-stripes {
    from { background-position-x: 30px; }
    to { background-position-x: 0; }
}
@keyframes scanner-effect {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}
.ahodownload-progress-text {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
}
.ahodownload-progress-text .timer {
    display: inline-block;
    margin-left: 8px;
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 5px;
    min-width: 35px;
    text-align: center;
}
.ahodownload-final-btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 15px;
    background: linear-gradient(145deg, #dc3545, #b02a37);
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.25);
}
.ahodownload-final-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
}
.ahodownload-final-btn i {
    margin-right: 8px;
}