:root {
    --poster-aspect: 1.7777778;
}
body, button {
    font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
}

body {
    --accent: #fbdf46;
--bg-1: #161616;
--bg-1-overlay: rgba(22, 22, 22, .85);
--bg-2: #262626;
--bg-3: #333;
--bg-mg: #444;
--checkerboard: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDY0IDY0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgICAgICAgPHJlY3QgZmlsbD0iIzI2MjYyNiIgaGVpZ2h0PSIzMiIgd2lkdGg9IjMyIiB4PSIwIiB5PSIwIi8+CiAgICAgICAgICA8cmVjdCBmaWxsPSIjMjYyNjI2IiBoZWlnaHQ9IjMyIiB3aWR0aD0iMzIiIHg9IjMyIiB5PSIzMiIvPgogICAgICAgICAgPHJlY3QgZmlsbD0iIzMzMyIgaGVpZ2h0PSIzMiIgd2lkdGg9IjMyIiB4PSIwIiB5PSIzMiIvPgogICAgICAgICAgPHJlY3QgZmlsbD0iIzMzMyIgaGVpZ2h0PSIzMiIgd2lkdGg9IjMyIiB4PSIzMiIgeT0iMCIvPgogICAgICA8L3N2Zz4KICA=");
--danger-bg: hsl(350, 55%, 40.5%);
--danger-fg: var(--fg-1);
--danger-mg: hsl(350, 55%, 50.5%);
--fg-1: #fff;
--fg-2: #c9c9c9;
--fg-3: #b2b2b2;
--fg-mg: #989898;
--mg: #888;

}
body.light {
    --accent: #9f2e02;
--bg-1: #fff;
--bg-1-overlay: rgba(255, 255, 255, .85);
--bg-2: #eee;
--bg-3: #ddd;
--bg-mg: #ccc;
--checkerboard: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDY0IDY0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgICAgICAgPHJlY3QgZmlsbD0iI2VlZSIgaGVpZ2h0PSIzMiIgd2lkdGg9IjMyIiB4PSIwIiB5PSIwIi8+CiAgICAgICAgICA8cmVjdCBmaWxsPSIjZWVlIiBoZWlnaHQ9IjMyIiB3aWR0aD0iMzIiIHg9IjMyIiB5PSIzMiIvPgogICAgICAgICAgPHJlY3QgZmlsbD0iI2RkZCIgaGVpZ2h0PSIzMiIgd2lkdGg9IjMyIiB4PSIwIiB5PSIzMiIvPgogICAgICAgICAgPHJlY3QgZmlsbD0iI2RkZCIgaGVpZ2h0PSIzMiIgd2lkdGg9IjMyIiB4PSIzMiIgeT0iMCIvPgogICAgICA8L3N2Zz4KICA=");
--danger-bg: hsl(350, 55%, 40.5%);
--danger-fg: var(--bg-1);
--danger-mg: hsl(350, 55%, 50.5%);
--fg-1: #000;
--fg-2: #272727;
--fg-3: #444;
--fg-mg: #666;
--mg: #888;

}
body.light #toggle-light,
body:not(.light) #toggle-dark {
    display: none;
}
.theme_toggle {
    align-items: center;
    background: none;
    border: none;
    border-radius: .9rem;
    color: var(--fg-mg);
    cursor: pointer;
    display: inline-flex;
    height: 1.8rem;
    justify-content: center;
    padding: 0;
    width: 1.8rem;
}
.theme_toggle svg {
    height: 1.2rem;
    width: 1.2rem;
}
.theme_toggle:focus-visible { outline: .2rem solid var(--fg-1); }
.theme_toggle:focus-visible,
.theme_toggle:hover {
    color: var(--fg-1);
}

:root {
    --letterbox: #000;
}
a {
    color: var(--fg-1);
    text-decoration: none;
}
.actions button {
    align-items: center;
    background: var(--bg-2);
    border: none;
    border-radius: .2rem;
    color: var(--fg-1);
    column-gap: .3rem;
    cursor: pointer;
    display: flex;
    padding: .2rem .5rem .2rem .4rem;
}
.actions button:focus-visible,
.actions button:hover {
    background-color: var(--fg-1);
    color: var(--bg-1);
}
/* TODO: Temporarily hidden - unhide in an upcoming version when we figured out
         layout questions around banner. */
.banner { display: none; }
body {
    background-color: var(--bg-1);
    color: var(--fg-2);
    margin: 0;
}
button {
    color: var(--fg-2);
    font-size: 1rem;
}
.caption {
    font-weight: 500;
    margin-top: .4rem;
}
.center {
    margin: 0 auto;
    max-width: 64rem;
    padding: 0 1rem 4rem;
}
.center .banner {
    border-radius: .5rem;
    max-width: 32rem;
}
.center .description a {
    text-decoration: underline;
    text-underline-offset: .3rem;
}
.center .description a:hover { text-decoration: none; }
#copy-link::after {
    color: var(--fg-2);
    padding-left: .5rem;
}
#copy-link.confirmed::after { content: var(--t-copied); }
#copy-link.failed::after { content: var(--t-failed); }
.current { background-color: var(--bg-3); }
dialog {
    background-color: var(--bg-1);
    border: 1px solid var(--bg-2);
    border-radius: .2rem;
    width: min(calc(100vw - 2rem), 20rem);
}
dialog::backdrop {
    /* This is not yet working in some browsers as of April 2024, but will, gradually.
       see https://stackoverflow.com/questions/58818299/css-variables-not-working-in-dialogbackdrop) 
       (TODO: This note can be removed ~2025 or so probably) */
    background-color: var(--bg-1-overlay);
}
.flex { display: flex; }
.flex.align { align-items: center; }
.flex.apart { justify-content: space-between; }
.flex.space { column-gap: .3rem; }
footer {
    align-items: center;
    background-color: var(--bg-1);
    column-gap: .7rem;
    display: flex;
    font-size: .9rem;
    height: 2rem;
    justify-content: flex-end;
    padding: .5rem 1rem;
}
h1 {
    color: var(--fg-1);
    font-size: 1.5rem;
    font-weight: 500;
}
h2 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-top: 3rem;
}
header {
    align-items: center;
    background-color: var(--bg-1);
    column-gap: .7rem;
    display: flex;
    font-size: .9rem;
    height: 2rem;
    left: 0;
    padding: .5rem 1rem;
    position: absolute;
    right: 0;
    top: 0;
}
header a {
    border-bottom: .2rem solid transparent;
    color: var(--fg-1);
    outline: none;
    padding: .3rem 0;
}
header a:focus-visible,
header a:hover {
    border-bottom-color: var(--fg-1);
}
img {
    display: block;
    max-width: 100%;
}
.large_font { font-size: 1.6rem; }
.layout {
    display: flex;
    flex-direction: column;
    height: 100dvh;
}
.layout .growing { flex-grow: 1; }
.link {
    align-items: center;
    border: 1px solid var(--fg-1);
    border-radius: .2rem;
    color: var(--fg-1);
    column-gap: .3rem;
    display: inline-flex;
    padding: .2rem .5rem .2rem .4rem;
}
.link:focus-visible,
.link:hover {
    background-color: var(--fg-1);
    color: var(--bg-1);
}
.links {
    column-gap: .5rem;
    display: flex;
    margin: 1rem 0;
    row-gap: .5rem;
}
.logo {
    background-color: var(--fg-2);
    color: var(--bg-1);
    font-weight: 500;
    padding: .5rem;
}
.medium_font { font-size: 1.2rem; }
/*.outline {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
}
.outline > a {
    border: 1px solid var(--bg-2);
    border-radius: .6rem;
    position: relative;
}
.outline > a > img,
.outline > a > .placeholder {
    border-radius: .6rem;
}
.outline > a > .placeholder {
    background-color: var(--bg-2);
    height: 12rem;
}
.outline .text {
    background-color: var(--bg-1-overlay);
    border-bottom-left-radius: .6rem;
    border-bottom-right-radius: .6rem;
    bottom: 0;
    left: 0;
    padding: 1rem;
    position: absolute;
    right: 0;
}*/
.parents {
    font-size: .9rem;
    margin-top: .2rem;
}
.player_controls {
    bottom: 0;
    display: flex;
    flex-direction: column;
    position: absolute;
    width: 100%;
}
.player_controls button { padding: .6rem; }
.player_controls button svg {
    height: 1.4rem;
    width: 1.4rem;
}
.player_controls .control_pane {
    background-color: var(--bg-1-overlay);
    display: flex;
    font-size: .85rem;
    justify-content: space-between;
}
.player_controls .control_pane button { font-size: .85rem; }
.player_controls .control_pane > div {
    align-items: center;
    display: flex;
}
.player_controls .control_pane input {
    opacity: 0;
    position: absolute;
    width: 100%;
}
.player_controls #select_subtitles {
    align-items: center;
    column-gap: .3rem;
    display: flex;
}
.player_controls .timeline {
    height: .8rem;
    position: relative;
}
.player_controls .timeline * { cursor: pointer; }
.player_controls .timeline .bar {
    bottom: 0;
    height: .3rem;
    position: absolute;
}
.player_controls .timeline:hover .bar { height: .35rem; }
.player_controls .timeline .bar.backdrop {
    background-color: var(--bg-mg);
    width: 100%;
    z-index: 1;
}
.player_controls .timeline .bar.outline {
    width: 100%;
    z-index: 3;
}
.player_controls .timeline input:focus-visible + .bar.outline { outline: 1px solid var(--fg-1); }
.player_controls .timeline .bar.progress {
    background-color: var(--fg-1);
    width: 0;
    z-index: 2;
}
.player_controls .timeline input {
    appearance: none;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 3;
}
.player_intro,
.player_outro {
    align-items: center;
    background-color: var(--bg-1-overlay);
    bottom: 2.9rem;
    display: flex;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}
.player_intro .versions_ring {
    aspect-ratio: 1;
    color: var(--fg-3);
    height: min(20rem, 100%);
    width: auto;
}
.player_intro .versions_ring path { fill: currentColor; }
.player_intro .versions_ring g { cursor: pointer; }
.player_intro .versions_ring g:focus-visible,
.player_intro .versions_ring g:hover {
    color: var(--fg-1);
    outline: none;
}
.player_intro .versions_ring text {
    fill: currentColor;
    font-size: 1.3rem;
}
.player_intro .versions_ring text.size { font-size: 1rem; }
.player_intro .versions_ring g:not(:focus-visible):not(:hover) text { color: var(--fg-2); }
.player_intro .versions_ring g:not(:focus-visible):not(:hover) text.size { color: var(--mg); }
.player_outro { column-gap: 2rem; }
.player_outro:not(.active) { display: none; }
.player_wrapper { position: relative; }
.player_wrapper button {
    background: none;
    border: none;
    cursor: pointer;
}
.player_wrapper button:hover { color: var(--fg-1); }
.playlist {
    display: flex;
    flex-direction: column;
}
.playlist > a > div { flex-shrink: 0; }
.playlist > * {
    align-items: center;
    border-radius: .5rem;
    column-gap: 1rem;
    display: flex;
    outline: none;
    padding: .5rem;
}
.playlist > *:focus-visible,
.playlist > *:hover { background-color: var(--bg-2); }
.playlist .description {
    align-items: center;
    color: var(--fg-1);
    display: flex;
    flex-grow: 1;
}

.playlist_context {
    border: 1px solid var(--bg-2);
    border-radius: .5rem;
    /* TODO: Shadows only in light mode or different strategy between both color schemes */
    box-shadow: 0 0 12rem #0001;
}
.playlist_context > a {
    display: flex;
    outline: none;
    position: relative;
}
.playlist_context > a:first-child {
    border-top-left-radius: .4rem;
    border-top-right-radius: .4rem;
}
.playlist_context > a:first-child img { border-top-left-radius: .4rem }
.playlist_context > a:last-child {
    border-bottom-left-radius: .4rem;
    border-bottom-right-radius: .4rem;
}
.playlist_context > a:last-child img { border-bottom-left-radius: .4rem }
.playlist_context > a:focus-visible,
.playlist_context > a:hover { background-color: var(--bg-2); }
.playlist_context > a:not(:last-child) {
    border-bottom: 1px solid var(--bg-1);
}
.playlist_context .current { background-color: var(--bg-3); }
.playlist_context .description {
    align-items: flex-start;
    color: var(--fg-1);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    padding: .2rem .8rem;
}
.playlist_context .details { font-size: .8rem; }
.playlist_context .duration { color: var(--fg-3); }
.playlist_context .label {
    font-size: .9rem;
    max-width: 15rem; /* TODO: Resolve this hack, need dynamic fitting into max-width */
    overflow-x: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.playlist_context .more {
    align-items: center;
    display: flex;
    height: 4rem;
    justify-content: center;
}
.playlist_context .number {
    background-color: var(--bg-1);
    border-bottom-left-radius: .2rem;
    color: var(--fg-3);
    font-size: .8rem;
    padding: 0 .4rem 0 .5rem;
    position: absolute;
    right: 0;
    top: 0;
}
.playlist_context img {
    aspect-ratio: var(--poster-aspect);
    background-color: var(--letterbox);
    border-radius: 0;
    display: block;
    flex-shrink: 0;
    height: 4rem;
    object-fit: contain;
}
.playlist_header {
    background-color: var(--bg-1);
    padding: .8rem;
}
.playlist_header .duration { color: var(--fg-3); }
.playlist_header .title {
    color: var(--fg-1);
    display: block;
}
.release_date {
    color: var(--fg-3);
    display: inline-block;
    margin-top: .2rem;
}
.sidebar {
    display: flex;
    flex-direction: column;
}
.site_title {
    color: var(--fg-2);
    font-size: 1.17rem;
}
.split {
    display: flex;
    row-gap: 1rem;
}
svg {
    fill: currentColor;
    display: block;
    height: 1rem;
    width: 1rem;
}
.system_info { display: none; }
/*.system_info {
    align-items: center;
    color: var(--fg-3);
    column-gap: .4rem;
    display: flex;
    font-size: .8rem;
}
.system_info:focus-visible,
.system_info:hover {
    text-decoration: underline;
    text-underline-offset: .3rem;
}*/
.thumbnail {
    aspect-ratio: var(--poster-aspect);
    background-color: var(--letterbox);
    border-radius: .5rem;
    flex-shrink: 0;
    object-fit: contain;
}
.thumbnail_wrapper { position: relative; }
.thumbnail_wrapper .duration {
    background-color: var(--bg-1-overlay);
    border-radius: .2rem;
    bottom: calc(var(--poster-aspect) * 3%);
    color: var(--fg-1);
    font-size: .8rem;
    padding: .1rem .3rem;
    position: absolute;
    right: 3%;
}
#toggle_speed { font-weight: 500; }
.unlisted_badge {
    background-color: var(--bg-2);
    border-radius: .2rem;
    padding: .3rem;
}
video {
    border-radius: .5rem;
    display: block;
    width: 100%;
}
.video {
    color: var(--fg-2);
    display: flex;
    flex-direction: column;
}
.video_title {
    color: var(--fg-1);
    margin: 0;
}
.videos {
    column-gap: 1rem;
    display: flex;
    flex-flow: row wrap;
    row-gap: 1rem;
}
.videos_grid {
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    margin: 1rem 0;
}
.videos_grid .number {
    background-color: var(--fg-3);
    border-radius: .2rem;
    color: var(--bg-1);
    font-size: .8rem;
    padding: .1rem .3rem .1rem .3rem;
}
.videos_grid .release_date { font-size: .9rem; }
.videos_grid .thumbnail { height: auto; }

@media (max-width: 33.999rem) {
    .playlist > a > div { width: 50%; }
    .playlist .thumbnail { height: auto; }
}
@media (min-width: 34rem) {
    .playlist .thumbnail {
        height: 8rem;
        width: auto;
    }
}

@media (min-width: 30rem) {
    .videos_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 44rem) {
    .videos_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 58rem) {
    .videos_grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 79.999rem) {
    footer { margin-top: 2rem; }
}
@media (min-width: 80rem) {
    footer {
        bottom: 0;
        left: 0;
        position: fixed;
        right: 0;
    }
    header { position: fixed; }
    /* .layout.with_sidebar { width: calc(100vw - 28rem); } width + padding of .outline */
    /* .outline {
        max-height: calc(100dvh - 4rem);
        overflow-y: auto;
        position: absolute;
        right: 2rem;
        top: 2rem;
        width: 24rem;
    }*/
}
@media (max-width: 99.999rem) {
    .player_wrapper { margin-top: 4rem; }
}
@media (min-width: 100rem) {
    .center { max-width: 64vw; }
    .player_wrapper { margin-top: calc(50dvh - 50% / var(--poster-aspect) - 6rem); }
}
@media (min-width: 110rem) {
    .videos_grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 134rem) {
    .videos_grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

