/* lap2 */
      body {
    font-family: Arial, sans-serif;
    margin: 20px;
}

section {
    margin-bottom: 60px;
}

.center {
    text-align: center;
}

/* ===== BÀI 1: MARQUEE ===== */
.marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid #ccc;
}

.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 ===== */
.box {
    width: 100px;
    height: 100px;
    background: steelblue;
    margin: 40px auto;
    animation: rotateBox 3s linear infinite;
}

@keyframes rotateBox {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== BÀI 3: FADE IN ===== */
.fade-container img {
    width: 200px;
    margin-right: 10px;
    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 BUTTON ===== */
.cta {
    padding: 15px 30px;
    font-size: 18px;
    color: white;
    background: red;
    border: none;
    cursor: pointer;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% {
        background: red;
        transform: scale(1);
    }
    50% {
        background: orange;
        transform: scale(1.05);
    }
    100% {
        background: red;
        transform: scale(1);
    }
}

/* ===== BÀI 5: SLIDER ===== */
.slider {
    width: 600px;
    overflow: hidden;
    margin: auto;
}

.slides {
    display: flex;
    animation: slide 15s infinite;
}

.slides img {
    width: 100%;
    flex-shrink: 0;
}

@keyframes slide {
    0% { transform: translateX(0); }
    33% { transform: translateX(-100%); }
    66% { transform: translateX(-200%); }
    100% { transform: translateX(0); }
}