@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
* {
    margin: 0;
    color: white;
    font-family: "Poppins", sans-serif;
    a {
        text-decoration: none;
    }
    h1,
    h2,
    h3,
    h4 {
        font-weight: 200;
    }
}
:root {
    --blue: rgb(66, 73, 211);
}
body {
    background: rgb(10, 10, 10);
    overflow-x: hidden;
    div.landing {
        background: rgba(255, 255, 255, 0.1);
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        div.box {
            text-align: center;
        }
        div.scrollanim {
            position: absolute;
            top: calc(95% - 80px);
            left: 50%;
            width: 100px;
            height: 80px;
            transform: translateX(-50%);
            display: flex;
            justify-content: center;
            flex-direction: column;
            align-items: center;
            > div {
                margin: 5px;
                width: 80px;
                height: 20px;
                display: flex;
                justify-content: center;
                align-items: center;
                &:nth-child(2) span {
                    animation-delay: 0.2s;
                }
                &:nth-child(3) span {
                    animation-delay: 0.4s;
                }
                > span {
                    width: 30px;
                    height: 5px;
                    display: block;
                    position: relative;
                    background: rgb(255, 255, 255);
                    animation: scrollanim 0.6s linear infinite alternate;
                    &:first-child {
                        transform: rotate(20deg) translateX(2px);
                    }
                    &:last-child {
                        transform: rotate(-20deg) translateX(-2px);
                    }
                }
            }
        }
    }

    > div.controls {
        margin: 20px;
        > div.heading {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100px;
        }
        div.inputfield {
            width: 100%;
            height: 200px;
            div.wavepreview {
                width: 100%;
                height: 100%;
                display: flex;
                justify-content: center;
                align-items: center;
                overflow-x: scroll;
                overflow: hidden;
                div.previewsettings {
                    position: absolute;
                    width: 200px;
                    height: 30px;
                    right: 20px;
                    display: flex;
                    transform: translateY(-85px);
                    user-select: none;
                    > span {
                        width: 40px;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        cursor: pointer;
                        margin: 5px;
                        border-radius: 3px;
                        font-size: 1.2em;
                        &:hover {
                            background-color: rgba(255, 255, 255, 0.1);
                        }
                    }
                }
                canvas {
                    width: calc(100vw - 57px);
                    height: 200px;
                    position: absolute;
                    transform: translateY(8px);
                    pointer-events: none;
                }
                div.datafile {
                    outline: none;
                    label.datafilelabel {
                        width: 200px;
                        height: 80px;
                        border: 1px solid white;
                        box-shadow: 0 0 1px 1px white;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        z-index: 1;
                        cursor: pointer;
                    }
                    input[type="file"] {
                        display: none;
                    }
                }
                div.play {
                    position: absolute;
                    left: 20px;
                    width: 50px;
                    height: 50px;
                    transform: translateY(-75px);
                    cursor: pointer;
                    span.bar {
                        position: absolute;
                        display: block;
                        width: 5px;
                        background-color: white;
                        transition: all 0.3s ease-in-out;
                    }
                    &.playing > span {
                        &:first-child {
                            height: 40px;
                            transform: translate(15px, 5px);
                            border-radius: 2px;
                        }
                        &:nth-child(2) {
                            height: 30px;
                            transform: translate(27px, 1px) rotate(-50deg);
                            border-radius: 0 0 2px 2px;
                        }
                        &:last-child {
                            height: 30px;
                            transform: translate(27px, 18px) rotate(50deg);
                            border-radius: 0 0 2px 2px;
                        }
                    }
                    &.pausing > span {
                        &:first-child {
                            height: 30px;
                            transform: translate(15px, 10px);
                            border-radius: 2px;
                        }
                        &:last-child {
                            opacity: 0;
                        }
                        &:nth-child(2) {
                            transform: translate(30px, 10px);
                            height: 30px;
                        }
                    }
                }
                div.progress {
                    position: absolute;
                    height: 200px;
                    width: 1px;
                    left: 20px;
                    background: white;
                    opacity: 0;
                    pointer-events: none;
                    z-index: 2;
                }
            }
        }
        div.result {
            width: 100%;
            height: 500px;
            margin-top: 20px;
            canvas#result {
                width: 100%;
                height: 100%;
                outline: 2px solid white;
            }
            div.controls {
                width: 250px;
                height: 30px;
                right: 20px;
                position: absolute;
                display: flex;
                transform: translateY(-507px);
                > span {
                    width: 40px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    cursor: pointer;
                    margin: 5px;
                    border-radius: 3px;
                    font-size: 1.2em;
                    &:hover {
                        background-color: rgba(255, 255, 255, 0.1);
                    }
                }
            }
            div.export {
                position: absolute;
                right: 20px;
                width: 100px;
                height: 40px;
                display: flex;
                justify-content: center;
                align-items: center;
                transform: translateY(-47px);
                cursor: pointer;
                background-color: rgb(10, 10, 10);
                color: white;
                z-index: 1;
                &:hover h2 {
                    background-color: rgba(255, 255, 255, 0.1);
                }
                h2 {
                    padding: 0 8px 0 8px;
                    font-weight: 300;
                }
            }
            div.exportfield {
                position: fixed;
                top: 50%;
                left: 50%;
                height: 50%;
                transform: translate(-50%, -50%);
                height: 500px;
                width: 700px;
                background: rgb(20, 20, 20);
                opacity: 0.9;
                display: none;
                div.box {
                    div.resultcontent {
                        overflow-x: hidden;
                        margin-top: 40px;
                        height: 440px;
                        padding: 10px;
                        white-space: break-spaces;
                    }
                    div.copy,
                    div.close {
                        height: 20px;
                        position: absolute;
                        padding: 10px;
                        top: 0;
                        display: flex;
                        cursor: pointer;
                        &:hover {
                            background-color: rgba(255, 255, 255, 0.3);
                        }
                    }
                    div.close {
                        right: 0;
                    }
                }
            }
        }
        div {
            outline: 1px solid white;
        }
    }
}
@keyframes scrollanim {
    0%,
    50% {
        background: rgb(35, 35, 35);
    }
    100% {
        background: rgb(255, 255, 255);
    }
}
@keyframes progress {
    from {
        left: 20px;
    }
    to {
        left: calc(100vw - 40px);
    }
}
