* {
    font-family: sans-serif;
}

.player {
    background-color: #000 !important;
    display: grid;
    grid-template-columns: 1fr min-content;
    grid-template-rows: max-content 1fr max-content max-content max-content;
    gap: 0 0;
    width: 100%;
    height: 100%;
}

.player * {
    color: #fff;
    box-sizing: content-box;
}

.player.embed, video.embed {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.player * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.player > video {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 0;
    grid-area: 1 / 1 / 6 / 3;
}

.player.hide-controls > .player-title,
.player.hide-controls > .player-controls,
.player.hide-controls > .player-playback-bar-container,
.player.hide-controls > .player-menu {
    display: none !important;
}

.player-title {
    grid-area: 1 / 1 / 2 / 3;
    color: white;
    z-index: 2;
    font-size: 27px;
    background-image: linear-gradient(180deg, #0007 0%, #0000 100%);
    padding: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.player-controls {
    padding-top: 4px;
    color: #ddd !important;
    width: 100%;
    height: min-content;
    position: relative;
    bottom: 0;
    z-index: 2;
    background-image: linear-gradient(0deg, #0007 0%, #0007 80%, #0000 100%);
    grid-area: 5 / 1 / 6 / 3;
}

.player-controls {
    display: flex;
}

.player-controls > span {
    line-height: 48px;
    height: 48px;
    font-size: 109%;
}

.player-controls-padding {
    width: 12px;
}

.player-button {
    cursor: pointer;
    display: flex;
    flex-direction: row;
    transition: width ease-in 250ms;
    width: 48px;
    height: 48px;
    font-size: 36px;
    text-align: center;
    line-height: 48px;
}

.player-button, .player-button * {
    color: #dddddd !important;
    text-decoration: none;
}

.player-button > i {
    min-width: 48px;
}

.player-button:hover, .player-button:hover * {
    color: #fff !important;
}

.player-volume {
    overflow-x: hidden;
}

.player-volume:hover {
    width: 200px;
}

.player-button-divider {
    flex-grow: 1;
}

.player-button-menu {
    flex-direction: column-reverse;
}

.player-menu {
    grid-area: 3 / 2 / 4 / 3;
    z-index: 3;
    position: relative;
    background-color: #000a !important;
    width: 200px;
}

.player-menu > div {
    overflow-y: scroll;
    max-height: 300px;
}

.player-menu-item {
    padding: 4px 8px;
    height: 2rem;
    line-height: 2rem;
    color: white;

    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.player-menu-item > .bi {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.player-menu-item > .bi-::before {
    width: 16px;
    height: 16px;
    content: ""
}

.player-menu-item:hover {
    background-color: #fff3 !important;
}

.player-playback-bar {
    transition: width linear 100ms;
}

.player-playback-bar-container {
    grid-area: 4 / 1 / 5 / 3;
    height: 4px;
    transition: height linear 100ms;
    width: 100%;
    z-index: 2;
}

.player-playback-bar-bg {
    background-color: #fff3 !important;
    width: calc(100% - 24px);
    margin: auto;
    height: 100%;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.player-playback-bar-bg > * {
    grid-area: 1 / 1 / 2 / 2;
}

.player-playback-bar-container:hover {
    height: 8px;
}

.player-playback-bar-buffer {
    background-color: #fffa !important;
    height: 100%;
    width: 0;
    z-index: 3;
}

.player-playback-bar-fg {
    background-color: #f00 !important;
    height: 100%;
    width: 0;
    z-index: 4;
}

.player-playback-bar-hover {
    width: min-content !important;
    padding: 4px;
    position: fixed;
    color: white;
    display: none;
    text-align: center;
}

.player-playback-bar-hover > span {
    background-color: #000 !important;
    padding: 4px;
}

.player-storyboard-image-container {
    background-repeat: no-repeat;
    display: inline-block;
    width: 144px;
    height: 81px;
}

.player-storyboard-image {
    background-repeat: no-repeat;
    display: inline-block;
    width: 48px;
    height: 27px;
    background-position-x: 0;
    background-position-y: 0;
    transform: scale(3);
    position: relative;
    box-sizing: content-box;
    border: 1px solid white;
    top: 10px;
}

.player-buffering {
    grid-area: 1 / 1 / 6 / 3;
    background-color: #000A;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.player-buffering-spinner {
    width: 80px;
    height: 80px;
}