* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background: #f0f8ff;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    color: #007bff;
    padding: 20px;
}

.game-container {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 0;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
}

.image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: 0.2s;
}

.image.selected {
    border-color: #007bff;
}

.image.matched {
    opacity: 0.5;
    cursor: default;
}

.image.wrong {
    border-color: red;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    color: green;
    margin: 0 0 20px;
}

.close-btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}