/* Question 1 */
* {
    box-sizing: border-box;
}
p{
    margin: 0;
}

.Q1 {
    width: 100px;
    height: 100px;
    margin: 10px auto 10px;
    background-color: white;
    border-color: rgb(255, 222, 38);
    border-width: 5px;
    border-style: solid;
    border-radius: 50%;
    border-top-color: transparent;
    position: relative;
    animation-name: rotate;
    animation-duration: 1s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.Q1:hover {
    animation-play-state: paused;
}

.Q1::before {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-color: blue;
    border-width: 5px;
    border-style: solid;
    border-radius: 50%;
    border-right-color: transparent;
}

.Q1::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-color: red;
    border-width: 5px;
    border-style: solid;
    border-radius: 50%;
    border-left-color: transparent;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

/* Question 2 */
.Q2 {
    width: 100px;
    height: 100px;
    margin: 10px auto 10px;
    background-color: white;
    border-color: black;
    border-width: 5px;
    border-style: solid;
    border-radius: 50%;
    border-bottom-color: transparent;
    position: relative;
    animation-name: rotate;
    animation-duration: 2s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-play-state: paused;

}

.Q2:hover,
.Q2:hover::after,
.Q2:hover::before {
    animation-play-state: running;
}

.Q2::before {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    top: 6.5%;
    left: 6.5%;
    /* transform: translate(-50%, -50%); */
    background-color: white;
    border-color: rgb(248, 227, 44);
    border-width: 5px;
    border-style: solid;
    border-radius: 50%;
    border-bottom-color: transparent;
    animation-name: rotate;
    animation-duration: 1.5s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-play-state: paused;

}

.Q2::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    top: 15.5px;
    left: 15.5px;
    /* transform: translate(-50%, -50%); */
    background-color: white;
    border-color: blue;
    border-width: 5px;
    border-style: solid;
    border-radius: 50%;
    border-bottom-color: transparent;
    animation-name: rotate;
    animation-duration: 1s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-play-state: paused;
}

/* Question 3 */
.Q3 {
    margin: 0 auto;
    width: 50px;
    height: 50px;
    background-color: #eee;
    border: 5px solid #000;
    border-bottom-color: transparent;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    animation-name: rotate;
    animation-duration: 1s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Question 4 */
.continer {
    width: 400px;
    height: 300px;
    margin: 0 auto;
    border: 1px solid black;
    display: flex;
    justify-content: center;
    align-items: center;
}

.e_alph {
    width: 80px;
    height: 140px;
    display: grid;
    grid-template-columns: repeat(4, 20px);
    grid-template-rows: repeat(7, 20px);
    margin: 0 10px;
    position: relative;
}

.e_one,
.l_one {
    grid-area: 1 / 1 / 8 / 2;
}

.e_two {
    grid-area: 1 / 2 / 2 / 5;
}

.e_three {
    grid-area: 4 / 2 / 5 / 5;
}

.e_four {
    grid-area: 7 / 2 / 8 / 5;
}

.l_alph {
    width: 80px;
    height: 140px;
    display: grid;
    grid-template-columns: repeat(4, 20px);
    grid-template-rows: repeat(7, 20px);
    margin: 0 10px;
    position: relative;
}

.l_two {
    grid-area: 7 / 2 / 8 / 5;
}

#piece {
    background-color: rgb(15, 15, 15);
}

.squar_e,
.squar_l {
    position: absolute;
    width: 19px;
    height: 20px;
    border: 2px solid rgb(15, 15, 15);
    background-color: yellow;
}

.squar_e {
    right: 0;
    animation-name: move_e;
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-fill-mode: backwards;
}

@keyframes move_e {
    0% {
        transform: translate(0);
    }

    7.33% {
        transform: translate(-60px);
    }

    14.6% {
        transform: translate(-60px, 60px);
    }

    21.62% {
        transform: translate(0, 60px);
    }

    28.63% {
        transform: translate(-60px, 60px);
    }

    35% {
        transform: translate(-60px, 120px);
    }

    42% {
        transform: translate(0, 120px);
    }

    49% {
        transform: translate(-60px, 120px);
    }

    56% {
        transform: translate(-60px, 0);
    }

    63% {
        transform: translate(0);
    }

    100% {
        transform: translate(0);
    }
}

.squar_l {
    position: absolute;
    bottom: 0;
    left: 60px;
    animation-name: move_l;
    animation-duration: 6s;
    animation-delay: 4s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-fill-mode: backwards;
}

@keyframes move_l {
    0% {
        transform: translate(0);
        
        opacity: 0;
    }

    3% {
        transform: translate(0);
        
        opacity: 1;
    }

    8.33% {
        transform: translate(-60px, 0);

    }

    16.66% {
        transform: translate(-60px, -120px);

    }

    24.99% {
        transform: translate(-60px, -120px);
        opacity: 1;
    }

    33.32% {
        transform: translate(-60px, -120px);


        opacity: 0;
    }

    100% {
        transform: translate(-60px, -120px);
        opacity: 0;
    }
}

section {
    margin: 20px auto;
    height: 400px;
    width: 400px;
    background-color: red;
    color: #000;
}

p:first-child {
    color: white;
}

