* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: black;
}

.container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 80vw;
    height: 80vw;
}

.square {
    background-size: cover;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    animation: weirdMove 5s infinite ease-in-out;
}

/* Add random transformations for each square */
@keyframes weirdMove {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) scale(1.2) rotate(45deg);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.8) rotate(-45deg);
    }
    75% {
        transform: translate(30px, 30px) scale(1.1) rotate(90deg);
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

.square:nth-child(odd) {
    animation: weirdMove 7s infinite ease-in-out;
}

.square:nth-child(3n) {
    animation: weirdMove 9s infinite ease-in-out;
}

.square:hover {
    transform: translate(50px, 50px) scale(1.5) rotate(180deg);
}
