body {
    font-family: Arial, sans-serif;
    padding: 30px;
}

div {
    width: 200px;
    height: 100px;
    margin: 20px;
    padding: 10px;
    text-align: center;
}

/* 1. TRANSITION EXAMPLE */

.transition-box {
    background-color: lightblue;
    border: 2px solid black;
    transition: all 1s ease;
}

.transition-box:hover {
    background-color: darkblue;
    color: white;
    width: 300px;
    border: 6px solid red;
    font-size: 24px;
}


/* 2. CONTINUOUS ANIMATION */

.continuous-box {
    background-color: orange;
    position: relative;
    animation: movingBox 3s infinite alternate;
}

@keyframes movingBox {
    0% {
        left: 0;
        transform: rotate(0deg);
    }

    100% {
        left: 300px;
        transform: rotate(360deg);
    }
}


/* 3. HOVER-TRIGGERED ANIMATION */

.hover-animation {
    background-color: lightgreen;
}

.hover-animation:hover {
    animation: hoverEffect 2s;
}

@keyframes hoverEffect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5) rotate(15deg);
    }

    100% {
        transform: scale(1);
    }
}


/* 4. GRADIENT BACKGROUND */

.gradient-box {
    background: linear-gradient(to right, blue, purple, red);
    color: white;
}