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

h1 {
    text-align: center;
}

/* -------------------- */
/* TRANSITION EXAMPLE 1 */
/* -------------------- */

.transition-color {
    width: 200px;
    padding: 30px;
    margin: 20px 0;
    background-color: lightblue;
    text-align: center;

    transition: background-color 1s, color 1s;
}

.transition-color:hover {
    background-color: purple;
    color: white;
}


/* -------------------- */
/* TRANSITION EXAMPLE 2 */
/* -------------------- */

.transition-size {
    width: 200px;
    height: 80px;
    background-color: lightgreen;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;

    transition: width 1s, height 1s;
}

.transition-size:hover {
    width: 350px;
    height: 120px;
}


/* -------------------- */
/* ANIMATION EXAMPLE 1 */
/* -------------------- */

.moving-box {
    width: 150px;
    padding: 20px;
    background-color: orange;
    text-align: center;

    animation: moveBox 4s infinite alternate;
}

@keyframes moveBox {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(300px);
    }
}


/* -------------------- */
/* ANIMATION EXAMPLE 2 */
/* -------------------- */

.hover-animation {
    width: 200px;
    padding: 25px;
    background-color: pink;
    text-align: center;
}

.hover-animation:hover {
    animation: spinBox 2s infinite;
}

@keyframes spinBox {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* -------------------- */
/* GRADIENT BACKGROUND */
/* -------------------- */

.gradient-box {
    width: 300px;
    padding: 60px 20px;
    text-align: center;
    color: white;

    background: linear-gradient(to right, blue, purple);
}