:root {
    --Q1-color: orange;
    --Q2-color: rgb(22, 119, 139);
}

.Q1 {
    width: 150px;
    padding: 10px 0;
    background-color: var(--Q1-color);
    text-align: center;
    margin: 50px auto;
    font-size: 30px;
    color: white;
    position: relative;
}

.Q1::after {
    content: '';
    width: 150px;
    height: 100%;
    position: absolute;
    background-color: var(--Q1-color);
    transform: skew(10deg, 10deg);
    right: 0;
    top: 0;
    z-index: -1;
}

.Q1::before {
    content: '';
    width: 150px;
    height: 100%;
    position: absolute;
    background-color: var(--Q1-color);
    transform: skew(-10deg, -10deg);
    right: 0;
    top: 0;
    z-index: -1;
}

/* Question 2 */
.Q2 {
    width: 150px;
    padding: 15px;
    background-color: var(--Q2-color);
    text-align: center;
    margin: 50px auto;
    font-size: 30px;
    color: white;
    position: relative;
}

.Q2::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--Q2-color);
    z-index: -1;
    transform: skewX(20deg) translate(-13px);
    -webkit-transform: skewX(20deg) translate(-13px);
    -moz-transform: skewX(20deg) translate(-13px);
    -ms-transform: skewX(20deg) translate(-13px);
    -o-transform: skewX(20deg) translate(-13px);
}

.Q2::before {
    content: '';
    position: absolute;
    width: 10%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--Q2-color);
    z-index: -1;
    transform: skewX(20deg) translate(-40px);
    -webkit-transform: skewX(20deg) translate(-40px);
    -moz-transform: skewX(20deg) translate(-40px);
    -ms-transform: skewX(20deg) translate(-40px);
    -o-transform: skewX(20deg) translate(-40px);
}

/* Question 3 */
.Q3 {
    transform: matrix(3, 0.2679, 0, 3, 20, 100);
    /*(scaleX,skewY,skewX,scaleY,translateX,translateY)*/
}

/* Question 4 */
.Q4 {
    width: 200px;
    height: 200px;
    background-color: #607D8B;
    position: relative;
    box-shadow: black 0 -5px 0 inset;
    margin: 100px auto 0;
}

.Q4::before {
    content: '';
    position: absolute;
    left: 14.5%;
    top: -35.2%;
    width: 70.5%;
    height: 70.5%;
    background-color: #000;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    box-shadow: rgb(255 255 255) -5px -5px 0 inset;
}

.Q4::after {
    padding: 4%;
    content: "Elzero";
    color: white;
    position: absolute;
    left: 0%;
    bottom: 0%;
}

/* Question 5 */
.Q51 {
    width: 200px;
    height: 200px;
    margin: 10px auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s;
    transform-origin: right center;
}

.Q51::after {
    content: "Front";
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 30px;
    color: white;
    backface-visibility: hidden;
    background-color: red;
}

.Q51::before {
    content: "Back";
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 30px;
    color: white;
    background-color: green;
    transform: rotateY(180deg);
}


.Q51:hover {
    transform: translateX(-100%) rotateY(-180deg);
}

.Q52 {
    width: 200px;
    height: 200px;
    margin: 10px auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s;
    transform-origin: right center;
}

.Q52::after {
    content: "Front";
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 30px;
    color: white;
    backface-visibility: hidden;
    background-color: red;
}

.Q52::before {
    content: "Back";
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 30px;
    color: white;
    background-color: green;
    transform: rotateX(-180deg);
}


.Q52:hover {
    transform: rotateX(-180deg);
}