body {
    margin: 0;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

main {
    width: 90%;
    max-width: 680px;
    margin: 20px auto;
}

header {
    padding: 16px;
    background: linear-gradient(to right, purple, yellow);
}

h1 {
    margin: 0 0 8px;
    font-size: 1.8em;
}

h2 {
    margin: 0 0 8px;
    font-size: 1.25em;
}

p {
    margin: 0 0 12px;
}

header p {
    margin: 0;
}

section {
    margin: 24px 0;
}

.stretch,
.slide,
.tilt {
    width: 100px;
    height: 70px;
    color: white;
    text-align: center;
    line-height: 70px;
    font-weight: bold;
}

.stretch,
.tilt {
    display: block;
    text-decoration: none;
}

.stretch {
    background-color: green;
    transition: width 1.5s ease;
}

.stretch:hover,
.stretch:focus {
    width: 180px;
}

.slide-area {
    width: 260px;
    max-width: 100%;
    padding: 12px 0;
    border: 1px solid;
}

.slide {
    width: 70px;
    margin-left: 10px;
    background-color: red;
    animation: slide 4s ease-in-out infinite alternate;
}

@keyframes slide {
    from {
        transform: translateX(0px);
    }
    to {
        transform: translateX(140px);
    }
}

.tilt-area {
    padding: 12px;
}

.tilt {
    background-color: blue;
    animation: tilt 2s ease-in-out infinite;
    animation-play-state: paused;
}

.tilt:hover,
.tilt:focus {
    animation-play-state: running;
}

@keyframes tilt {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-12deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(12deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.stretch:focus,
.tilt:focus {
    outline: 2px solid;
}

.keyboard-note {
    margin-top: 24px;
}
