#app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    gap: 20px;
}

@media screen and (max-width: 1024px) {
    #app {
        gap: 10px;
    }
}

#title {
    margin-bottom: 12px;
    margin-top: 20px;
    position: relative;
    transition: 0.5s;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

#title i {
    margin: 0 8px;
    display: inline-block;
    font-style: normal;
    animation: shake 3s infinite both;
}

#title i:last-child {
    animation-delay: -1s;
    animation-duration: 2s;
}

@keyframes shake {
    0% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(-10deg);
    }
}

#title::after {
    content: "";
    position: absolute;
    background-color: #008cff99;
    z-index: -1;
    width: 110%;
    bottom: 0;
    left: -5%;
    height: 0;
    opacity: 0;
    transition: 0.5s;
}

#title:hover {
    color: #fffe;
}

#title:hover::after {
    height: 100%;
    opacity: 1;
}

.container {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
    box-sizing: content-box;
    border-radius: 50%;
    z-index: -99;
}

.container canvas {
    z-index: 99;
}

.container.recording {
    animation: beats 1s infinite alternate both;
}

@keyframes beats {
    0% {
        box-shadow: 0 0 0 0 transparent;
    }

    33% {
        box-shadow: 0 0 0 10vmax var(--primary-color-transparent, #0095ff08), 0 0 0 20vmax var(--primary-color-transparent, #0095ff08), 0 0 0 30vmax var(--primary-color-transparent, #0095ff08), 0 0 0 50vmax var(--primary-color-transparent, #0095ff08);
    }

    66% {
        box-shadow: 0 0 0 40px var(--primary-color-transparent, #0095ff08), 0 0 0 80px var(--primary-color-transparent, #0095ff08), 0 0 0 120px var(--primary-color-transparent, #0095ff08), 0 0 0 160px var(--primary-color-transparent, #0095ff08);
    }

    100% {
        box-shadow: 0 0 0 10vmax var(--primary-color-transparent, #0095ff08), 0 0 0 20vmax var(--primary-color-transparent, #0095ff08), 0 0 0 30vmax var(--primary-color-transparent, #0095ff08), 0 0 0 50vmax var(--primary-color-transparent, #0095ff08);
    }
}

.container::before {
    content: "";
    position: absolute;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    top: 5px;
    left: 5px;
    z-index: 0;
    border-radius: 50%;
    transition: .5s;
    background:
        repeating-conic-gradient(var(--bg, #f6f6f6) 0 25%, var(--bg-dark, #fff) 0 50%) 0 0 / 25px 25px,
        repeating-conic-gradient(var(--bg, #f6f6f6) 0 25%, var(--bg-dark, #fff) 0 50%) 0 0 / 25px 25px;
}

.container.recording::before {
    animation: run 30s infinite linear forwards;
}

@keyframes run {
    100% {
        background-position: 100% 0;
    }
}

.container::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: 50%;
    left: 50%;
    z-index: -4;
    transform-origin: left top;
    opacity: 0;
    transition: 3s;
}

.container.recording::after {
    opacity: 1;
    animation: rotate 10s linear infinite both;
    background: linear-gradient(90deg, var(--primary-color, #0095ff) 0%, #9900ff 33%, #00ff73 66%, var(--primary-color, #0095ff) 100%);
    background-size: 200% 200%;
}

@keyframes rotate {
    0% {
        transform: rotate(var(--start-degree, 0deg));
        opacity: 1;
        background-position: 0% 0%;
    }

    100% {
        transform: rotate(calc(var(--start-degree, 0deg) + 360deg));
        opacity: 0.7;
        background-position: 100% 100%;
    }
}

.controls {
    display: flex;
    gap: min(100px, 20vw);
    align-items: center;
    margin-bottom: 32px;
    margin-top: 8px;
    user-select: none;
}

.controls button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    width: 40px;
}

#record svg,
#stop svg {
    width: 36px;
    height: 36px;
}

#remake {
    margin-right: 6px;
}