body {
    font-family: Arial;
}

section {
    margin: 40px 0;
}

/* ========= BÀI 1 ========= */
.marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    background: #eee;
}

.marquee p {
    display: inline-block;
    animation: moveText 10s linear infinite;
}

@keyframes moveText {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

/* ========= BÀI 2 ========= */
.rotate-box {
    width: 100px;
    height: 100px;
    background: blue;
    margin: auto;
    animation: rotateBox 3s linear infinite;
}

@keyframes rotateBox {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========= BÀI 3 ========= */
.fade-container img {
    opacity: 0;
    animation: fadeIn 2s ease forwards;
}

.fade-container img:nth-child(1) {
    animation-delay: 0s;
}
.fade-container img:nth-child(2) {
    animation-delay: 0.5s;
}
.fade-container img:nth-child(3) {
    animation-delay: 1s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========= BÀI 4 ========= */
.cta {
    padding: 15px 30px;
    font-size: 18px;
    color: white;
    background: red;
    border: none;
    cursor: pointer;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    from {
        background: red;
        transform: scale(1);
    }
    to {
        background: orange;
        transform: scale(1.05);
    }
}

/* ========= BÀI 5 ========= */
.slider {
    width: 400px;
    overflow: hidden;
}

.slides {
    display: flex;
    animation: slide 15s infinite;
}

.slides img {
    width: 400px;
}

@keyframes slide {
    0%   { transform: translateX(0); }
    33%  { transform: translateX(-400px); }
    66%  { transform: translateX(-800px); }
    100% { transform: translateX(0); }
}