body {
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    background-color: hotpink;
    color: lime;
    font-family: "Comic Sans MS", "Courier New", cursive;
    text-align: center;
}

.blink {
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0% { visibility: hidden; }
    50% { visibility: visible; }
    100% { visibility: hidden; }
}

h1, h2, h3 {
    animation: rainbow 3s infinite;
    font-weight: bold;
    text-shadow: 2px 2px yellow;
}

@keyframes rainbow {
    0% { color: red; }
    20% { color: orange; }
    40% { color: yellow; }
    60% { color: green; }
    80% { color: blue; }
    100% { color: purple; }
}

div, section, article {
    border: 5px dashed yellow;
    margin: 10px;
    padding: 10px;
    background-color: cyan;
}

a {
    color: red;
    background-color: yellow;
    font-weight: bold;
    text-decoration: underline;
}

a:hover {
    color: white;
    background-color: black;
    font-size: 1.2em;
}

table {
    border: 10px ridge magenta;
    background-color: lime;
}

td {
    border: 3px dotted blue;
    padding: 10px;
}

.marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    font-size: 24px;
    font-weight: bold;
    padding: 10px;

    /* Combine BOTH animations */
    animation: 
        scroll-left 10s linear infinite,
        flash-colors 0.5s infinite;
}

/* Scrolling animation */
@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Flashing colours */
@keyframes flash-colors {
    0% {
        background: red;
        color: yellow;
    }
    25% {
        background: yellow;
        color: red;
    }
    50% {
        background: lime;
        color: blue;
    }
    75% {
        background: blue;
        color: white;
    }
    100% {
        background: magenta;
        color: cyan;
    }
}

button {
    background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta);
    border: 4px outset white;
    font-size: 18px;
    padding: 10px;
    cursor: pointer;
}

button:active {
    border: 4px inset white;
}

.counter {
    font-family: "Courier New", monospace;
    background: black;
    color: lime;
    padding: 5px;
    display: inline-block;
    border: 3px inset gray;
}

.psychedelic-btn {
    font-size: 20px;
    font-weight: bold;
    padding: 15px 25px;
    cursor: pointer;
    border: 4px outset white;
    text-transform: uppercase;

    background: linear-gradient(
        270deg,
        red, orange, yellow, lime, cyan, blue, magenta, red
    );
    background-size: 1000% 100%;

    animation: 
        rainbowShift 5s linear infinite,
        pulse 0.8s infinite,
        spin 3s linear infinite;

    color: white;
    text-shadow: 2px 2px black;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

.psychedelic-btn:active {
    border: 4px inset white;
    transform: scale(0.9) rotate(-5deg);
}
