@import url('https://fonts.googleapis.com/css2?family=Bitcount+Grid+Single:wght@100..900&family=Inconsolata:wght@200..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');

:root {
    --size: 40px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    user-select: none;
}

body {
    background-color: #212021;
    background-color: #202020;
    background-color: #1c1c1c;
    background-color: #282828;
    /* color: #eee; */
}

h1 {
    font-family: "Inconsolata", monospace;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings:
        "wdth" 200;
    text-align: center;
    /* transform: rotate(-5deg); */
    padding: 20px;
    font-family: "Permanent Marker", cursive;
    font-weight: 400;
    font-style: normal;
    /* color: orange; */
    color: #333;
    /* color: #f8e3bb; */
    /* background: #000; */
    /* background-color: #4f62b3; */
    width: fit-content;
    margin: 0 auto;
}

h1 img {
    width: 100px;
}

input {
    cursor: pointer;
}

.scroll-handler,
.move-loop-handler {
    padding-block: 20px;
}

.scroll-handler label,
.move-loop-handler label {
    width: fit-content;
    display: block;
    margin-block: 10px;
    font-size: 12px;
    padding: 10px;
    color: #b8b8b8;
}

.timeline {
    margin: 30px auto;
    /* width: 900px; */
    /* width: fit-content; */
    height: 125px;
    position: relative;
    /* border: 10px solid orange; */
    overflow: scroll;
    will-change: scroll-position;
}

.audio {
    /* width: 10500px; */
    /* Arbitrary width - will be set by JS */
    width: 100%;
    height: 100%;

    position: relative;
    background: #333;
    background: #303030;
    /* background-color: #202020; */
    /* border-left: 10px solid green; */
    /* border-right: 10px solid #ffe546; */
}

.loop {
    width: 300px;
    height: 100%;
    height: calc(100% - 20px);
    background: #ddd;
    /* background-color: oklch(0.95 0.19 105.79 / 0.69); */
    /* background-color: oklch(0.95 0.19 105.79 / 0.8); */
    background-color: oklch(0.68 0.13 105.71 / 0.8);
    position: absolute;
    /* left: 100px; */
    user-select: none;
}

.loop.active {
    background-color: #afbb27;
    background-color: red;
    background-color: #ffee00;
    background-color: #efe65e;
    background-color: #cccd3a;
}

.loop-label {
    position: absolute;
    top: 10px;
    left: calc(50% - 2ch);
}

.handler {
    width: var(--size);
    height: var(--size);
    border: 1px solid;
    border-radius: 50%;
    position: absolute;
    top: calc(50% - (var(--size) / 2));
    background-color: #c0b826;
    transition: all .2s;
    display: grid;
    place-items: center;
    user-select: none;
}

.handler:hover {
    background-color: rgb(239, 123, 14);
    background-color: oklch(0.76 0.15 84.21);
}

.left-handler {
    left: calc(0% - (var(--size) / 2));
    cursor: ew-resize;
}

.middle-handler {
    left: calc(50% - (var(--size) / 2));
    cursor: move;
}

.right-handler {
    right: calc(0% - (var(--size) / 2));
    cursor: ew-resize;
}

.time {
    /* width: 10500px; */
    width: 100%;
    /* same width as audio element - will be set by JS */
    height: 20px;
    background-color: #3d3d3d;
    position: absolute;
    bottom: 0;
    color: #77d31e;
}

.second{
    height: 100%;
}

::-webkit-scrollbar {
    display: none;
}

.timeline::-webkit-scrollbar-thumb {
    background: red;
    width: 400px;
}

input[type='range']::-webkit-slider-runnable-track {
    background-color: #303030;
}

input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    background-color: #c3752b;
    color: #831036;
    background: #434343;
    /* width: 10px; */
    /* height: 10px; */
    background: #434343;
    /* box-shadow: -80px 0 0 80px #43e5f7; */
}


input[type='range']::-webkit-slider-runnable-track {
    /* height: 10px; */
    -webkit-appearance: none;
    color: #13bba4;
    /* margin-top: -1px; */
}

input[type='range']::-webkit-slider-thumb {
    /* width: 10px; */
    -webkit-appearance: none;
    /* height: 10px; */
    cursor: ew-resize;
    background: #434343;
    /* box-shadow: -80px 0 0 80px #43e5f7; */
}

/** FF*/
input[type="range"]::-moz-range-progress {
    background-color: #43e5f7;
}

input[type="range"]::-moz-range-track {
    background-color: #9a905d;
}

/* IE*/
input[type="range"]::-ms-fill-lower {
    background-color: #43e5f7;
}

input[type="range"]::-ms-fill-upper {
    background-color: #9a905d;
}

.loop-handler,
.timeline-handler {
    width: 100%;
}

.message {
    /* text-align: center; */
    display: grid;
    place-items: center;
    /* padding-block: 40px; */
    font-family: monospace;
}

.container {
    overflow: scroll;
    will-change: scroll-position;
    width: auto;
    max-width: 100vw;
}

.bookmarks {
    width: 100%;
    /* font-size: large; */
    height: 20px;
    /* background-color: grey; */
    border-bottom: 1px solid #454744;
    border-bottom: 1px solid #323232;
    margin-top: 1px;
    background-color: #202020;
    color: #eee;
    position: relative;
    text-wrap: nowrap;
    overflow-x: auto;
}

.bookmark {
    position: absolute;
    bottom: 0;
    width: fit-content;
    /* border-inline: 1px solid; */
    padding-inline: 5px;
    border-left: 3px solid #cf4f6d;
    font-family: monospace;
}

.user-input,
.controls {
    /* width: 700px; */
    margin: 50px auto;
    /* border: 1px solid; */
    text-align: center;
}

.user-input label {
    border: 1px solid;
    padding: 10px;
    cursor: pointer;
    transition: all .1s;
    display: block;
    width: fit-content;
    margin: 0 auto;
    margin-bottom: 20px;
    color: #5c5c5c;
    color: #979797;
    opacity: .7;
}

.user-input label:hover {
    /* background-color: #333; */
    /* background-color: #3f3bff; */
    color: #ddd;
    opacity: 1;
}

input[type="file"] {
    display: none;
}

.controls {
    /* display: flex; */
    justify-content: center;
    align-items: center;
    gap: 10px;
}

button {
    /* width: fit-content; */
    /* height: 50px; */
    /* border: 1px solid; */
    padding: 10px 15px;
    cursor: pointer;
    font-size: 12px;
    /* background-color: #2d353b; */
    background-color: #1f1f1f;
    color: #65a5ff;
    /* color: #77d31e; */
    border: 1px solid #505050;
    border-radius: 3px;
    outline: none;
    /* border: 1px solid #4a4949; */
    /* border-inline: 1px solid; */
    /* border: none; */
    font-family: monospace;
    opacity: .7;
    margin-left: 3px;
    transition: all .2s;
    /* box-shadow: 1px 1px 1px 1px  currentColor; */
}

button:hover {
    opacity: 1;
    /* box-shadow: 1px 1px 1px 1px  currentColor; */
    /* border-bottom: 1px solid; */
}

#loopOnOff.active {
    /* background-color: #efe20e; */
    color: #efe20e;
    opacity: 1;
}

.file-metadata {
    /* border: 1px solid; */
    width: fit-content;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 50px;
    font-size: 14px;
    color: #eee;
}

.file-metadata * {
    font-family: monospace;
    color: #4a4a4a;
    color: #979797;
}

.info {
    /* width: fit-content; */
    width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-evenly;
    gap: 50px;
    /* border: 1px solid #363535; */
    padding: 10px;
    /* font-family: monospace; */
    /* text-align: center; */
    color: #eee;
    /* color: #77d31e; */
}

.info span {
    /* width: fit-content;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 50px; */
    font-size: 14px;
    font-family: monospace;
    text-align: center;
    color: #979797;
}

.info-duration,
.info-remainingTime {
    color: #77d31e;
    /* color: #4a4a4a; */
}

#durationDisplay,
#remainingTimeDisplay {
    color: #77d31e;
}

/* .label{
    font-weight: bold;
} */

/* .metadata{
    font-family: monospace;
} */

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid oklch(0.76 0 0);
    border-bottom-color: transparent;
    border-radius: 50%;
    /* display: inline-block; */
    /* display: none; */
    box-sizing: border-box;
    animation: load 1s linear infinite;
    margin: 50px auto;
    /* position: absolute;
    top: calc(30% - 24px);
    left: calc(50% - 24px); */
}

.hidden {
    display: none;
}

@keyframes load {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.waveform {
    position: relative;
    height: 100px;
    border: 1px solid;
    width: auto;
    background-color: #494f4f;
    background-color: #333;
    background-color: #2e282c;
    /* background: #bdc3c7; */
    /* background: -webkit-linear-gradient(to right, #2c3e50, #bdc3c7); */
    /* background: linear-gradient(to right, #2c3e50, #bdc3c7); */
    /* background: #4a4f4f; */
    /* background: linear-gradient(90deg, rgba(74, 79, 79, 1) 0%, rgba(2, 3, 2, 1) 50%, rgba(207, 204, 198, 1) 100%); */
    /* background: linear-gradient(31deg, rgb(162 153 162) 0%, rgb(206 192 70) 50%, rgb(11 11 11) 100%); */

}

.bar {
    position: absolute;
    /* left: 0; */
    /* top: calc(50% - 25px); */
    /* width: 50px; */
    /* height: 50px; */
    background-color: fuchsia;
}

.playhead {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    /* height: 100%; */
    width: 6px;
    background-color: #333;
    background-color: #ddd;
    background-color: #2ba7c3;
    z-index: 10;
    will-change: transform;
    transform: translateX(0);
}

.playhead::after {
    content: attr(data-songtime);
    position: absolute;
    top: calc(50% - 6px);
    left: 0;
    width: 5ch;
    background-color: #000;
    color: #fff;
    font-size: 10px;
    font-family: monospace;
    padding: 3px;
}

canvas {
    height: 100%;
    display: block;
}

.loop-overlay {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: grey;
    opacity: .5;
}

.app-logo {
    /* width: 500px; */
    margin: 0 auto;
}

.app-logo img {
    width: 100%;
    display: block;
    margin: 0 auto;
}

.credits {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.credits span {
    font-family: monospace;
    /* padding-block: 20px 50px; */
    padding: 20px;
    text-align: center;
    display: block;
}

.credits img {
    width: 50px;
}

.social-media img {
    width: 20px;
}

.social-media a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: #333;
    font-family: monospace;
    font-size: 12px;
}

.social-media a:hover {
    color: #4063b1;
}