@font-face {
    font-family: '0xProto';
    src: url('/fonts/0xProtoNerdFontMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    color: #ddd;
    font-family: '0xProto';
    font-size: max(2dvw, 2.5dvh);
}

body {
    display: flex;
    flex-direction: column;

    gap: 3px;
    place-items: center;
    background-color: #101010;
}

toast, span {
    cursor: pointer;
}

textarea, input, button, toast, snap {
    background-color: #333;
    border-radius: 0.4em;
    border-color: #313131;
    border-width: 0.2rem;
    padding: 0.2em;
    outline: none;
    transition: border-color 0.1s, background-color 0.1s;
}

textarea:focus, input:focus {
    background-color: #222;
    border-color: #444;
}

textarea {
    scrollbar-gutter: stable;
    resize: none;
    overflow: scroll;
}

toast {
    position: absolute;
    display: inline;

    bottom: 16px;
    left: 16px;
    padding: 0.2em;
    border-color: #222;
    border-style: solid;

    background-color: #444;
    color: #eee;
}

.err {
    background-color: rgba(80, 0, 20, 100);
    border-color: rgb(50, 0, 20);
    color: #f5f5f5;
}

toast span {
    display: none;
    background-color: #222;
    font-style: italic;
}

.header {
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    margin: 6px;
}

.header h1 {
    margin: 0;
    padding: 1vw;
    transform: translate(0, calc(-1rem - 4.2vw / 2));
    transition: transform 0.3s ease;
    max-width: 80%;
    cursor: pointer;
}

blockquote {
    background: #333;
    padding: 4px;
    margin: 0;
    overflow: auto;

    border-radius: 1.7vw;
    border-width: 0.8vw;
    border-style: solid;
    border-color: #212121;
}

.header blockquote {
    max-width: 75%;
    opacity: 0;
    margin-bottom: 0.2vw;
    transform: translate(0, calc(1rem + 1.2vw));
    transition: opacity 0.3s ease;
}

ul {
    list-style-type: '> ';
}

.progress-bar {
    position: relative;
    overflow: hidden;
    background-color: #333;
    width: 80%;
    height: 4px;
    cursor: pointer;
}

.progress-bar::before {
    position: absolute;
    content: '';
    width: var(--progress, 0%);
    left: 0;
    height: 100%;
    background-color: #aaa;
}

.progress-bar.infinite::before {
    animation: progress 2s infinite;
    cursor: none;
}

@keyframes progress {
0% {
    left: -20%;
    width: 20%;
}
50% {
    width: 40%;
}
100% {
    left: 100%;
}
}

.disabled {
    background-color: #222;
    color: #aaa;
    border-color: #333;
}


.player {
    display: flex;
    gap: 7px;
    flex-direction: column;
    align-items: center;
}

.hide {
    animation: hide 0.3s forwards;
}

@keyframes hide {
0% {
    transform: scale(1);
    visibility:visible;
    content-visibility: visible;
}
99% {
    transform: scale(0);
}
100% {
    transform: scale(0);
    visibility:collapse;
    content-visibility: hidden;
}
}


