body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    padding: 20px;
    box-sizing: border-box;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* max-width: 800px; */
    width: 100%;
}

#matrix {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.cell {
    width: 50px;
    height: 50px;
    background-color: #ddd;
    border: 2px solid #999;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s, opacity 0.3s;
}

.cell.active {
    background-color: #4CAF50;
}

.cell.wrong {
    background-color: #FF5722;
}

.cell.distraction {
    background-color: #FF5722;
}

.cell.glow {
    animation: glowing 1s infinite alternate;
}

.cell.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@keyframes glowing {
    0% {
        box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #ff00de, 0 0 35px #ff00de, 0 0 40px #ff00de, 0 0 50px #ff00de, 0 0 75px #ff00de;
    }

    100% {
        box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #ff00de, 0 0 70px #ff00de, 0 0 80px #ff00de, 0 0 100px #ff00de, 0 0 150px #ff00de;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

#message {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

#timer {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #2196F3;
}

#start-button,
#how-to-play-button {
    font-size: 18px;
    padding: 10px 20px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 10px;
}

#start-button:hover,
#how-to-play-button:hover {
    background-color: #1976D2;
}

#score-display {
    font-size: 24px;
    margin-top: 20px;
    font-weight: bold;
    color: #4CAF50;
}

#level-display {
    font-size: 24px;
    margin-top: 10px;
    font-weight: bold;
    color: #FF9800;
}

#final-result {
    font-size: 28px;
    margin-top: 20px;
    font-weight: bold;
    color: #673AB7;
}

#how-to-play {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    max-width: 600px;
    width: 100%;
}

#how-to-play h2 {
    color: #2196F3;
    margin-top: 0;
}

#how-to-play ul {
    padding-left: 20px;
}

#how-to-play li {
    margin-bottom: 10px;
}

.hidden {
    display: none;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    padding: 20px;
    box-sizing: border-box;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    width: 100%;
}

#matrix {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.cell {
    width: 50px;
    height: 50px;
    background-color: #ddd;
    border: 2px solid #999;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s, opacity 0.3s;
}

.cell.active {
    background-color: #4caf50;
}

.cell.clicked {
    background-color: #2196f3;
    /* User's click feedback */
}

.cell.wrong {
    background-color: #ff5722;
}

.cell.distraction {
    background-color: #ff5722;
}

#matrix.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.cell.glow {
    background-color: #ff00de;
    box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #ff00de;
}