body{
    background-color: #070739;
    width: 800px;
    height: max-content;
    border: 2px solid gray;
    margin: 10px auto;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    body{
        width: 400px;
        border: none;
        padding-right: 180px;
        padding-top: 50px
    }
    .dna{
        text-align: center;
    }
}
.dna{
    background-color: purple;
    width: 50px;
    height: 50px;
    margin: 20px 0 20px 35%;
    border-radius: 50%;
    position: relative;
    /* animation: Tên_Thời gian_Dạng tốc độ_Vòng lặp_Điều hướng  */
    /* Dạng tốc độ:
    - ease: bắt đầu chậm, tăng tốc, kết thúc chậm
    - linear: tốc độ cân bằng từ đầu đến cuối
    - ease-in: chậm lúc đầu
    - ease-out: chậm lúc cuối
    - ease-in-out: chậm khúc đầu & cuối
    */
    /* Điều hướng: 
    - normal: di chuyển bình thường từ đầu đến cuối
    - reverse: di chuyển theo hướng ngược lại
    - alternate: di chuyển hết rồi vòng lại
    - alternate reverse: di chuyển ngược rồi vòng lại
    */
    animation: dna_effect 1s linear infinite alternate;
    transition: 2s;
}

.dna::before{ /* tạo ra 1 phiên bản như bản gốc nhưng nằm cùng hàng */
    background-color: pink;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    content: ""; /* phải có content thì phần before hay after rmới xuất hiện */
    left: 200px; /* cách bản gốc 200px */
    animation: dna_effect_before 1s linear infinite alternate;
}

.dna:nth-child(2),
.dna:nth-child(2):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 0.2s; /* thêm 0.2 giây cho giá trị thứ 2 để tăng thời gian bắt đầu delay lên 2.2s. Giá trị sau sẽ cộng thêm 0.2s nữa ... */
}

.dna:nth-child(3),
.dna:nth-child(3):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 0.4s;
}

.dna:nth-child(4),
.dna:nth-child(4):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 0.6s;
}

.dna:nth-child(5),
.dna:nth-child(5):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 0.8s;
}

.dna:nth-child(6),
.dna:nth-child(6):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 1.0s;
}

.dna:nth-child(7),
.dna:nth-child(7):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 1.2s;
}

.dna:nth-child(8),
.dna:nth-child(8):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 1.4s;
}

.dna:nth-child(9),
.dna:nth-child(9):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 1.6s;
}

.dna:nth-child(10),
.dna:nth-child(10):before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 1.8s;
}

.dna:last-child,
.dna:last-child:before{ /* chọn giá trị dna thứ 2 trong chuỗi dna bên html */
    animation-delay: 2.0s;
}

@keyframes dna_effect{
    0%{
        transform: translate(0,0);
        background-color:purple;
    }
    50%{
        background-color:blueviolet;
    }
    100%{
        transform: translate(200px,0);
        background-color: pink;
    }
}

@keyframes dna_effect_before{
    0%{
        transform: translate(0,0);
        background-color: pink;
    }
    50%{
        background-color:blueviolet;
    }
    100%{
        transform: translate(-400px,0);
        background-color: purple;
    }
}