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


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

body {
    --c1: #6b6bd6;
    --c2: #e74f4f;
    --c3: #fc921f;
    --c4: #149ece;
    --c5: #8114c0;

    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #222;
    background-color: #fff;
    padding-block: 2rem 3rem;
}

main {
    max-width: 90%;
    margin-inline: auto;
    text-align: center;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.25rem;
    margin-block-end: 3rem;
}

.charts {
    display: flex;
    place-content: center;
    flex-flow: wrap;
    gap: 2rem;
}

.pie {
    flex: 1 0 225px;
    max-width: 325px;
    aspect-ratio: 1;
    border-radius: 50%;
    /* border: 1px solid; */

    background-image: conic-gradient(
            from 0deg,
            var(--c1) 40%,
            var(--c2) 0 65%,
            var(--c3) 0 85%,
            var(--c4) 0
    );
}

.donut.spin {
    /*width: 100px;*/
    /*height: 100px;*/
    background-color: #0CB1C4;
    animation-name: spin;
    animation-duration: 200ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    /* transform: rotate(3deg); */
    /* transform: rotate(0.3rad);/ */
    /* transform: rotate(3grad); */
    /* transform: rotate(.03turn);  */
}

.donut {
    background-image: radial-gradient(white 40%, transparent 0 70%, white 0),
    conic-gradient(
            from 0deg,
            var(--c1) 20%,
            var(--c2) 0 40%,
            var(--c3) 0 60%,
            var(--c4) 0 80%,
            var(--c5) 0 100%
    );
}

.legends {
    margin-block-end: 2rem;
    font-size: 0.9rem;
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: wrap;
    gap: 1rem;
}

.legends span {
    position: relative;
    padding-inline-start: 1.25rem;
}

.legends span::before {
    position: absolute;
    top: 0.4rem;
    left: 0;
    content: "";
    width: 0.8rem;
    aspect-ratio: 1;
    border-radius: 50%;
}

.legends span:nth-child(1)::before {
    background-color: var(--c1);
}

.legends span:nth-child(2)::before {
    background-color: var(--c2);
}

.legends span:nth-child(3)::before {
    background-color: var(--c3);
}

.legends span:nth-child(4)::before {
    background-color: var(--c4);
}

.legends span:nth-child(5)::before {
    background-color: var(--c5);
}

.legends span:nth-child(5)::before {
    background-color: var(--c4);
}

.charts{
    position: relative;
    width: 320px;
    margin: auto;
}
.charts a{
    text-decoration: none;
    color: #fff;
    background-color: #9f1239;
    border-radius: 100%;
    width: 50% ;
    height: 50%;
    top: 25%;
    left: 25%;
    position: absolute;
    padding-top: 20%   ;
    display: block;
}.charts a.hidden{
    display: none;
}
.charts #message{
    text-decoration: none;
    color: #fff;
    background-color: #9f1239;
    border-radius: 100%;
    width: 50% ;
    height: 50%;
    top: 25%;
    left: 25%;
    position: absolute;
    padding-top: 20%   ;
    /*display: none;*/
    opacity: 0;
    font-size: 25px;
    line-height: 6.8;
}


.charts #message.finish{
    transition: all 2s ease-in-out;


    text-decoration: none;
    color: #fff;
    background-color: #9f1239;
    border-radius: 100%;
    width: 100% ;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 20%   ;
    opacity: 1;
    /*display: block;*/

}
