body {
    font-family: arial, Roboto, Tahoma, serif !important;
}

@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url(font/MaterialIcons-Regular.eot); /* For IE6-8 */
    src: local('Material Icons'),
    local('MaterialIcons-Regular'),
    url(font/MaterialIcons-Regular.woff2) format('woff2'),
    url(font/MaterialIcons-Regular.woff) format('woff'),
    url(font/MaterialIcons-Regular.ttf) format('truetype');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px; /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;

    /* Support for all WebKit browsers. */
    -webkit-font-smoothing: antialiased;
    /* Support for Safari and Chrome. */
    text-rendering: optimizeLegibility;

    /* Support for Firefox. */
    -moz-osx-font-smoothing: grayscale;

    /* Support for IE. */
    font-feature-settings: 'liga';
}

/* Rules for sizing the icon. */
.material-icons.md-18 {
    font-size: 18px;
}

.material-icons.md-24 {
    font-size: 24px;
}

.material-icons.md-36 {
    font-size: 36px;
}

.material-icons.md-48 {
    font-size: 48px;
}

/* Rules for using icons as black on a light background. */
.material-icons.md-dark {
    color: rgba(0, 0, 0, 0.54);
}

.material-icons.md-dark.md-inactive {
    color: rgba(0, 0, 0, 0.26);
}

/* Rules for using icons as white on a dark background. */
.material-icons.md-light {
    color: rgba(255, 255, 255, 1);
}

.material-icons.md-light.md-inactive {
    color: rgba(255, 255, 255, 0.3);
}

.material-icons.md-dark {
    color: rgba(0, 0, 0, 0.54);
}

.material-icons.md-dark.md-inactive {
    color: rgba(0, 0, 0, 0.26);
}

.material-icons.md-light {
    color: rgba(255, 255, 255, 1);
}

.material-icons.md-light.md-inactive {
    color: rgba(255, 255, 255, 0.3);
}

.fix-dis > a {
    display: flex;
    align-items: center;
}

.fix-dis > a > i {
    padding-right: 10px;
}

#stream_page code {
    color: #545454;
    font-size: .95rem;
}

#stream_page li {
    word-break: break-all;
}

#stream_page .pn-heading {
    color: #a1a1a1;
    padding-left: 16px;
}

#stream_page .pn-heading a {
    color: #a1a1a1;
}

#stream_page .pn-heading > i {
    vertical-align: middle !important;
}

#stream_page .material-icons.inline-valigned, #photo .material-icons.inline-valigned {
    font-size: 18px;
    line-height: inherit;
    vertical-align: middle;
    height: auto;
    width: auto;
    margin-bottom: 0.15em;
    padding-left: 6px;
    color: azure;
}

#stream_page form .btn {
    font-size: 15px;
}

.vjs-playlist-item {
    height: 50px;
}

li.vjs-playlist-item.vjs-selected > div {
    background-color: #515969;
}

.vjs-playlist-item.vjs-selected, .vjs-playlist-item.vjs-up-next {
    height: 100px;
}

.dir-item > div, .file-item > div {
    width: 100%;
}

.url-play-all {
    color: red;
    float: right;
}

.url-playlist {
    color: orange;
    float: right;
}

/*.url-direct-link {*/
/*float: right;*/
/*padding-left: 5px;*/
/*font-size: 14px;*/
/*}*/

/*.url-playable {*/
/*color: green;*/
/*float: right;*/
/*}*/

.text-red {
    color: red !important;
}

.text-red a {
    color: red !important;
}

.text-orange {
    color: darkorange !important;
}

.text-orange a {
    color: darkorange !important;
}

div.header-menu {
    padding-top: 5px;
    padding-bottom: 5px;
}
div.header-menu p {
    margin: 0;
}

#youtube-page .container {
    width: 100%;
    max-width: 100%;
}
#youtube-iframe, #iframe-api-container {
    border-radius: 12px;
}

div#recommended-videos-container {
    padding-left: 5px !important;
}

ul#recommended-videos.list-group {
    overflow-x: hidden;
    /*max-height: 416px;*/
    height: 60vh;
    min-height: 200px;
}

#youtube-iframe-container iframe {
    height: 60vh;
    min-height: 200px;
}

/* video player pop-up in cardview */
.video-popup {
    position: fixed !important; /* Giữ vị trí cố định trên màn hình */
    bottom: 65px;    /* Cách đáy 20px */
    right: 20px;     /* Cách phải 20px */
    width: 320px !important;    /* Chiều rộng của popup */
    height: 180px;   /* Chiều cao của popup (tỷ lệ 16:9) */
    background-color: #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;   /* Đảm bảo nó nằm trên các phần tử khác */
    opacity: 0;      /* Ẩn ban đầu */
    visibility: hidden; /* Ẩn ban đầu */
    transform: translateY(100px); /* Dịch chuyển xuống dưới để tạo hiệu ứng trượt */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0.3s ease-in-out; /* Hiệu ứng chuyển động */
}

.video-popup.active {
    opacity: 1;      /* Hiển thị khi có class 'active' */
    visibility: visible; /* Hiển thị khi có class 'active' */
    transform: translateY(0); /* Trượt lên vị trí ban đầu */
}

div#youtube-iframe-container.video-popup > #player-btn-function {
    display: none;
}

div#youtube-iframe-container.video-popup.active iframe {
    height: 180px !important;
    padding-top: 0;
    min-height: 180px;
}

#comment-card ul {
    width: 100%;
}

@media only screen and (max-width: 990px) {
    #youtube-page #main-div {
        padding-left: 5px;
        padding-right: 5px;
    }

    .media-overview {
        height: 55px;
    }
}
@media screen and (max-width: 767px) {
    .playing-btn {
        padding-bottom: 5px;
    }
    #youtube-video-title {
        margin-bottom: .1rem;
    }
    #youtube-iframe-container iframe {
        max-height: 50vh;
    }
}

@media only screen and (max-width: 640px) {
    h3 {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .row {
        padding-left: 5px;
        padding-right: 5px;
        margin-left: 5px;
        margin-right: 5px;
    }

    #title-row {
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 0;
        padding-right: 0;
    }

    .dir-item .row, .playable-item .row {
        margin: 0;
    }

    .dir-item, .file-item {
        padding: 5px !important;
    }

    .col-sm-10 {
        width: 80%;
        padding: 0;
    }

    .col-sm-2 {
        width: 20%;
        padding: 0 5px 0 5px;
    }

    .dir-item .col-sm-10 {
        width: 75%;
    }

    .dir-item .col-sm-2 {
        width: 25%;
        text-align: right;
    }

    .notifyjs-corner {
        max-width: 320px;
        overflow-wrap: break-word;
        width: 300px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    #form-search, #form-new-folder {
        padding-bottom: 10px;
    }

    .pn-heading span {
        display: none;
    }

    #stream_page .pn-heading {
        font-size: 16px;
        padding-left: 0 !important;
    }

    #detail-form > form > div.row.pt-2 {
        padding: 0;
    }

    #detail-form > form > div > div.col-md-12 {
        padding: 0;
    }
    #stream_page > div > div.col-md-12 > ul > li > div > div.col-md-9.col-sm-9 {
        padding: .3rem;
    }
    .menu-force-show-title span {
        display: inline;
    }
}

@media only screen and (max-width: 575px) {
    .col-sm-6.history-div {
        width: 50%;
    }
    ul#recommended-videos > .youtube-video-item div.col-sm-7 {
        padding-top: 5px !important;
    }
}

@media only screen and (max-width: 520px) {
    .vjs-playlist-item.vjs-selected, .vjs-playlist-item.vjs-up-next {
        height: 40px;
    }
}

@media only screen and (max-width: 482px) {
    .custom-control.custom-switch.col-sm-2 > label {
        width: 40px;
    }
    #youtube-page.modal-open #detailModal, #youtube-page.modal-open #commentModal {
        width: 99% !important;
    }
}

@media only screen and (max-width: 400px) {
    .col-md-3.col-sm-3 {
        display: inline;
    }

    .main-menu-list > .list-group-item {
        padding-right: 5px;
        padding-left: 10px;
    }
    div.container {
        max-width: 98%;
        padding-left: 5px;
        padding-right: 5px;
    }
    div.container > .col-sm-12 {
        padding-left: 5px;
        padding-right: 5px;
    }
    #refreshChannelModal > .modal-dialog > .modal-content > .modal-body {
        padding-left: 15px;
    }
    #refreshChannelModal > .modal-dialog {
        max-width: 395px;
    }
}

@media (min-width: 1900px) {
    #youtube-page #main-div {
        padding-left: 5px;
        padding-right: 0;
    }
    #youtube-page #main-div .container-fluid {
        padding-left: 5px;
        padding-right: 5px;
    }
    #youtube-page .row {
        margin-right: 0;
        margin-left: -5px;
    }
    #youtube-page .header-menu .col-sm-12 {
        padding-right: 5px;
        padding-left: 5px;
    }

    div#main-div {
        max-width: 100%;
    }
    body#stream_page div#main-div {
        max-width: 75%;
    }
    div#youtube-iframe-container.col-md-12 {
        flex-basis: 100%;
        max-width: 100%;
    }
    div#youtube-iframe-container {
        flex-basis: unset;
        max-width: unset;
        width: 1529px;
    }
    #youtube-iframe-container.card-view {
        padding-bottom: 5px !important;
    }
    div#recommended-videos-container {
        flex-basis: unset;
        max-width: unset;
        width: 381px;
    }
    iframe#youtube-iframe {
        height: 790px !important;
    }
    iframe#iframe-api-container {
        height: 790px !important;
    }
    ul#recommended-videos.list-group {
        height: 790px !important;
        max-height: 790px;
    }

    div.header-menu {
        padding: 5px 5px 0 5px;
    }
    div.header-menu p {
        margin-bottom: 3px;
    }
    ul#recommended-videos .container-fluid {
        max-width: 100%;
    }
    div.list-btn {
        padding-top: 20px;
    }
    div#youtube-iframe-container.search-box-hide iframe{
        height: 860px !important;
    }
    div#recommended-videos-container.search-box-hide ul#recommended-videos{
        height: 860px !important;
        max-height: 860px;
    }
    div#youtube-iframe-container.search-box-hide.card-view{
        flex-basis: 100%;
        max-width: 100%;
    }
    div#recommended-videos-container {
        height: 899px !important;
    }
    .youtube-video-item.card-view {
        width: 23rem !important;
    }
    .card-view > .card-youtube-image {
        max-height: 200px !important;
        object-fit: cover;
        width: 100%;
        height: 204px !important;
        object-position: center 40%;
    }
    /*#player-container {*/
    /*    padding-top: 5px;*/
    /*}*/
    #card-ajax-footer {
        padding-right: 5px;
    }
    #recommended-videos-container-card {
        padding-top: 8px;
    }
}

@media (min-width: 1900px) and (-webkit-min-device-pixel-ratio:0) {
    /* only for chromium browser */
    div#recommended-videos-container {
        width: 365px;
    }
}

@media (min-width: 1920px) {
    div#youtube-iframe-container {
        width: 80%;
    }
    div#recommended-videos-container {
        width: 20%;
    }
}

#playlist-btn {
    padding-bottom: 10px;
    font-size: 16px;
}

#playlist-btn i {
    font-size: 20px !important;
}

#playlist-btn a {
    color: gray;
}

.btn-color-green {
    color: green !important;
}

.btn-color-green > i.material-icons.inline-valigned {
    color: green !important;
}

#rename-form {
    height: auto;
}

#rename-form > form textarea {
    font-size: 15px;
}
#rename-form > form > div.form-group > label {
    padding-top: 16px;
}
#rename-form > form > div.button-group {
    padding-top: inherit;
}

#group-tv-show-form {
    height: auto;
}

#delete-form {
    height: auto;
}

#update-form {
    height: auto;
}

#open-with-form {
    height: auto;
}

#open-with-form ul {
    width: 100%;
}

#create-folder-model {
    height: auto;
}

#share-folder-model {
    height: auto;
    min-width: 600px;
}

@media screen and (max-width: 650px) {
    #share-folder-model {
        height: auto;
        min-width: auto;
    }
    #detail-task-status {
        padding-top: 15px;
    }
}

@media screen and (max-width: 600px) {
    div.pn-heading > .extra-menu {
        display: none;
    }
}

#media-title {
    font-weight: bold;
    word-break: break-all;
}

#detail-form {
    height: auto;
}

#metadata-form {
    height: auto;
}

#metadata-form > form textarea, #match-media-form > form textarea, #detail-form > form textarea {
    font-size: 15px;
}

#metadata-media-type, #metadata-ignore-media, #match-media-item-name, #match-media-manual-id, #delete-item-name, #group_option {
    font-size: 15px;
}

#detail-form textarea {
    height: 100px;
}

.detail-info {
    font-weight: bold;
    color: #545454;
    padding: 1px 5px 1px 5px;
}

#old-name {
    color: #2c2e3b;
    word-break: break-all;
}

#delete-item-name {
    color: red;
    word-break: break-all;
    min-height: 60px;
}

.button-group {
    padding-top: 10px;
}

.you-not-see-me {
    opacity: 0;
}

.cut-items {
    opacity: .5;
}

.with-context-menu.copy-items {
    color: #cd9438;
}

#paste-items {
    text-align: center;
    color: #a1a1a1;
    font-weight: bold;
}

#paste-items a {
    color: #a96e83;
}

#create-new-folder {
    float: right;
}

#favorite-content {
    padding-top: 20px;
}

#clear-favorites-items, .remove-favorite-item {
    font-size: 12px;
    color: gray;
}

.remove-favorite-item {
    text-align: right;
}

.remove-favorite-item a {
    color: grey !important;
}

#folder-buttons {
    display: flex;
    flex-direction: row-reverse;
}

#folder-buttons .btn-group {
    padding-left: 3px;
}

#folder-buttons a {
    padding: 2px;
    height: 30px;
}

.item-parent-path {
    font-size: 12px;
    color: #a5a5a5;
}

/*Dark theme*/
html, body {
    background-color: #1f1f1f !important;
}

li {
    background-color: #505050 !important;
}

a:hover {
    color: white !important;
}

h1, h2, h3, h4, h5 {
    color: darkgray;
}

input, select {
    background-color: #b5b5b5 !important;
}

.disk-info {
    min-width: 52px;
}

.context-menu-list, .context-menu-item {
    background: darkgray !important;
}

.context-menu-list > .context-menu-item {
    font-size: 15px;
}

.modal {
    overflow: initial;
    box-shadow: 0 0 10px #a7a7a7 !important;
    background-color: darkgray !important;
}

/* custom close button of modal */
.modal a.close-modal[class*="icon-"] {
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5gMRBQkyvBIwNwAABKRJREFUaIHdm81rG0cYhx/JwgFD8KHEjemlt5Bb0UrbGNzWwZcYAgUfDDYUByS5f4BLbu2lN7cmuQZJEF9q8CFQUkgOVuM0BmPZPYfcK9lVTsYQsDF2D++sKsn7Je3MSs4DA/Z+vPP7sauZdz42sbS0hCFGgEnAAm6pchO4rgrAsSqHwDtV/ga2gQ8mRKU0xxsDFoBZ4EtgOOD6T1T5HLjTcvwU2AWeAb8BDV0Ck5rifA08B2rAI+Args36MaxiPFIxn6s6IhPV8F3gDfAauI/+NwYV876q4w0wFSVYr4bHkVftT+R3GheTwCtV93gvAXoxPAO8BeZ7qVAT80rDTLc3dmt4GfgDGO22IgOMIlqWu7kprOFrwFPg1y7uiYMkoukpojHUDUHcQH43iz3LMs8iovFG0IVBhq8BvwMTGkSZZgLR6vukgww/4WqYdZhANHviZ3iZwX6NvVjEpyHzMjwDrBiREw8reHRZbobHgXWPc1eFJOLhUnLiZmqVwehnozKKeGmj0/AU/c2gdDNPR+7dafjn2KTER5unVsPfEO9AIC4mEW9Au+Ef4tcSG01vjuEx4F5/tMTCPcRjc8C+gKbB+9zcHNPT0wAUi0X29/e7uj+TyVAoFACoVCpsbGzokJVCPD52nvCsjqhA0yxAoVDAtu3Q99q23TTbGUsDsyCv9Agy4WaEXC4XyrRt2+RyOVMyQDyOJJFWLMqEWxvFYvHSsSDTXmbdYkVgGJgcsixrDtD27tTrdRqNBul0uu14Op2m0WhQq9XajnuZLZfL7O3t6ZLl8HbIsqw88IXOqLVaLZRpP7PValWnJId/UsiKgHYcwZ2GWv+P2SzArRSy/GGEMKZbMWwW4GaS/9d5jFCtVimXy4HXxWAW4LpxwxBsOiazoAzHwsXFRU/ndJNEliuNks1myefznufz+TzZbNa0DIBj44Zt2/Y165DP57tKQ3vkOIksRhvBq58tlUqUSqVLx8OmoRE4TCGr7neCruwWP7NOBpVIJDy7LEON2Lshy7JuozG1hPDpYtiMTCMbQ5ZljQDf6YqYyWRcf7NeXY+f6cPDQ+r1ui5pACtJZAPJqa6IreNZh6B+1qufdosVgVNgO4nsltnVGbmVsElF2IwsArvAByfxeKYraqVSaf5dLBa7anyq1WrbGHhzc1OXLFAeE2qf1hiyW8bEppRB4Az4DGg4T7gBvOyfHuO8RO31as2lf+mPllhoems1/BfSYn9sbCPegMtrSz/FqyUWfmz9p9PwK2Rd9WNhHdhqPeA2Hl4GjuJQY5gjXLY+uBk+QNZVz00rMsg54uGg84TXjMcL4KFJRYZ5iHi4hN8UzyqwZkSOWdZw2ergEDSn9T2wo1WOWXYQzZ4EGT4BvuVqmN5BtJ74XRRm1vI9shF8kF/vNUTj+6ALw07TngAPkK0Dg9R6nyOaHhDwZB26nZdeRbbjD0I/fYRo8Wyg3OhlIv4FcJv+ZmTrSoNr1+NHrysPB8ieibvEO+DYVnUu4JJUhCHqUssW8rnNFLId/yxiPDfOVOwpVddWlGC6Zjheq/IpktKF/VDLC2Mfaume0vkXeKzKQH6K9x9Jp2Mql5/GjgAAAABJRU5ErkJggg==);
}

.modal h1, .modal h2, .modal h3, .modal h4, .modal h5 {
    color: #9b9696 !important;
    font-weight: bold;
}

.jquery-modal > .modal {
    padding: 12px;
}
.modal > form {
    font-size: 15px;
    line-height: 18px;
}

.modal > form p {
    margin-top: 8px;
    margin-bottom: 8px;
}

.vlc-playable, .mxp-playable, .url-playable, .url-direct-link, .url-vlc-playable {
    font-weight: bold;
    padding-right: 5px;
}

.vlc-playable, .url-vlc-playable {
    color: darkorange;
}

.mxp-playable {
    color: lightblue;
}

.url-playable {
    color: green;
}

.url-direct-link {
    color: blue;
}

.media-action {
    text-align: right;
}

.icon-green {
    color: #23bd34;
}

.icon-blue {
    color: #52abff;
}

.with-context-menu {
    color: azure;
}

#stream_page .list-group {
    font-size: 15px;
}

.list-group.stream-root > li > a {
    color: azure;
}

li.list-group-item.fix-dis > .row {
    margin-left: 0;
}

li.list-group-item.fix-dis > .row > .media-action{
    padding-left: 0;
    padding-right: 0;
}

li.list-group-item.fix-dis > a, li.list-group-item .non-stream > a {
    color: azure;
}

#favorite-content > ul > * > div > div.col-md-10.col-sm-10 > a {
    color: #d0d2b4;
}

/* Image tooltip with popover */
.popover {
    max-width: 600px;
}

.media-thumbnail {
    max-width: 560px;
    max-height: 560px;
}

.themoviedb-content {
    padding-top: 5px;
}

.themoviedb-content img {
    max-height: 450px;
}

.themoviedb-content ul {
    color: white;
}

.movie-detail {
    padding-left: 20px;
    word-break: normal;
}

.movie-detail h4 {
    word-break: normal;
}

.movie-overview {
    font-style: italic;
    color: white;
    word-break: normal;
}

.movie-toggle {
    display: contents;
    cursor: pointer;
}

.movie-thumbnail {
    padding-top: 10px;
}

.modal-poster {
    max-height: 90px;
}

#match-media-form {
    height: auto;
}

input[type=radio] {
    width: 18px;
    height: 18px;
}

.movie-rating-score {
    color: yellow;
    font-weight: bold;
}

.material-icons {
    opacity: 0.5;
}

.material-icons:hover {
    opacity: 1;
}

.inline-poster {
    height: 25px;
    width: 25px;
    object-fit: cover;
    border-radius: 50%;
}

/*#search-file-name {*/
/*    word-break: break-all;*/
/*}*/

.poster-container {
    padding-bottom: 2px;
}

.addition-stream-items {
    color: white;
    opacity: .7;
}

.addition-stream-items > a {
    color: azure;
}

li.list-group-item.dir-item:hover, li.list-group-item.file-item:hover {
    background-color: #555555 !important;
}

/* Image zoom */

.mfp-with-zoom .mfp-container,
.mfp-with-zoom.mfp-bg {
    opacity: 0;
    -webkit-backface-visibility: hidden;
    /* ideally, transition speed should match zoom duration */
    -webkit-transition: all 0.3s ease-out;
    -moz-transition: all 0.3s ease-out;
    -o-transition: all 0.3s ease-out;
    transition: all 0.3s ease-out;
}

.mfp-with-zoom.mfp-ready .mfp-container {
    opacity: 1;
}

.mfp-with-zoom.mfp-ready.mfp-bg {
    opacity: 0.8;
}

.mfp-with-zoom.mfp-removing .mfp-container,
.mfp-with-zoom.mfp-removing.mfp-bg {
    opacity: 0;
}

.popup-img {
    cursor: zoom-in;
}

/* padding-bottom and top for image */
.mfp-no-margins img.mfp-img {
    padding: 0;
}

/* position of shadow behind the image */
.mfp-no-margins .mfp-figure:after {
    top: 0;
    bottom: 0;
}

/* padding for main container */
.mfp-no-margins .mfp-container {
    padding: 0;
}

/* end image zoom */

span#config-alternative {
    display: inline !important;
}

/* Media page */

@media (min-width: 992px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 991px) {
    #youtube-iframe-container .playing-btn {
        padding-top: 0!important;
    }
}

@media (max-width: 420px) {
    .search-media {
        padding: 5px;
        text-align: center;
        display: inline !important;
    }

    .card {
        padding-right: 5px;
    }

    #main-div {
        max-width: 100%;
    }

    .no-mobile {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .media-action {
        display: block !important;
        padding-top: 5px;
    }
}

@media (max-width: 990px) {
    .truncate-overflow {
        --max-lines: 8 !important;
    }
    .card-view > .card-body {
        height: auto !important;
    }
    .container {
        max-width: 90%;
    }

    #main-div {
        max-width: 100%;
    }

    #recommended-videos-container, #youtube-iframe-container, .youtube-video-item {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .col-md-8 {
        padding: inherit;
    }

    #youtube-page.modal-open, #youtube-page.modal-open #detailModal, #youtube-page.modal-open #commentModal,
    #youtube-page.modal-open #saveQueueAsModal, #youtube-page.modal-open #refreshChannelModal {
        padding-right: 0 !important;
    }

    #commentModal, #detailModal, #saveQueueAsModal, #refreshChannelModal {
        padding-left: 0 !important;
    }
    #commentModal .modal-dialog, #detailModal .modal-dialog, #saveQueueAsModal .modal-dialog,
    #refreshChannelModal .modal-dialog {
        margin-right: 0;
        margin-left: 0;
    }

}

@media (max-width: 760px) {
    .truncate-overflow {
        --max-lines: 10 !important;
    }
    #youtube-iframe {
        height: 100%;
        min-height: 320px;
    }
    #recommended-videos-container {
        padding-top: 25px;
    }

    #youtube-iframe.iframe-mt-hide {
        margin-top: 0;
    }
    #history-container {
        padding-top: 25px;
    }
    #main-div {
        max-width: 100%;
    }
    .media-action {
        min-width: 180px;
    }
    .col-sm-9 {
        max-width: 70%;
    }
}

@media (max-width: 696px) {
    #stream_page > .container > div > ul > li > div.row {
        width: 100%;
    }
    #stream_page > .container > div > ul > li > div > div {
        width: 100%;
        position: relative;
    }
    #stream_page > .container > div > ul > li > div > div.media-action {
        text-align: right;
    }
}

@media (max-width: 640px) {
    .card {
        max-width: 96% !important;
    }
    .truncate-overflow {
        --max-lines: 10 !important;
    }
    #match-media-form {
        padding: 15px 5px;
    }

    #recommended-videos > li > div {
        padding: 0;
    }
    #youtube-iframe {
        max-height: 300px;
    }
    #main-div {
        max-width: 100%;
    }
    form .row {
        padding-right: 0 !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    form .row .col-sm-12, form .row .col-sm-9, form .row .col-sm-3 {
        padding-left: 0;
        padding-right: 0;
    }
    form .row .col-sm-3 {
        width: 40%;
    }
    form .row .col-sm-9 {
        width: 60%;
    }
}

@media only screen and (max-width: 592px) and (min-width: 573px) {
    .youtube-video-item.card-view {
        width: 14rem !important;
    }
}

@media (max-width: 380px) {
    .card {
        max-width: 96% !important;
    }
    .truncate-overflow {
        --max-lines: 10 !important;
    }
    .match-search {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .match-search  div {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    .empty-dir-title {
        font-size: 18px !important;
    }
    #main-div, #main-div div {
        padding-right: 0;
        padding-left: 0;
    }
    .jump-to-card {
        padding-right: 38px !important;
    }
    .youtube-video-item .col-sm-10.col-md-10 {
        padding-left: 5px !important;
    }
    #youtube-iframe {
        max-height: 240px;
    }

    #youtube-page div.container, .row, #youtube-page div.container-fluid, #youtube-iframe-container,
    #recommended-videos-container, .col-md-6, .col-md-12, .col-sm-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    #youtube-iframe-container, #history-container, #recent-container, .input-group, .col-md-12.header-menu {
        padding: 5px !important;
    }
    .custom-control-label {
        word-break: break-all;
    }
    #main-div div.modal-dialog,#main-div div.modal-dialog div {
        padding-right: inherit;
        padding-left: inherit;
    }
    #title-row {
        margin-left: 5px !important;
    }
}

#app {
    color: azure;
}

:root {
    --lh: 1.2rem;
}

.card {
    background-color: #1b1717;
    border: none;
    padding: 5px;
    margin: 5px;
    max-width: 48%;
    line-height: var(--lh);
}

.truncate-overflow {
  --max-lines: 6;
  position: relative;
  max-height: calc(var(--lh) * var(--max-lines));
  overflow: hidden;
  padding-right: 1rem; /* space for ellipsis */
}

.card-body {
    color: #aaaaaa;
    padding-top: 2px;
}

.media-page.card-body {
    position: relative;
    padding-bottom: 5px;
}

.ellipsis {
    text-overflow: ellipsis;

    /* Required for text-overflow to do anything */
    white-space: nowrap;
    overflow: hidden;
}

.card-img-top {
    width: auto;
    max-height: 120px;
}

.card-header {
    text-align: center;
}

.media-row {
    padding-top: 2px;
}

.media-row div {
    padding-left: 5px;
    padding-right: 5px;
}

.card-body-btn {
    text-align: center;
}

.media-rating {
    color: #353535;
    font-weight: bold;
}

.card-body {
    height: 120px;
}

#recommended-videos-container-card .card-body, #recommended-videos-container .card-body {
    height: auto !important;
}

#recommended-videos-container-card > .row > h5 {
    padding-left: 5px;
}

.btn-sort {
    color: orange;
    opacity: .7;
}

.header-menu > .btn-sort {
    color: orange !important;
    opacity: .7;
}

.btn-reload-cache {
    color: #997637;
    opacity: .7;
    padding-left: 2px;
}

.btn-sort:hover, .btn-reload-cache:hover {
    text-decoration: underline;
    cursor: pointer;
    opacity: 1;
}

.card-text {
    font-size: 0.85rem;
    line-height: 1.3;
}
.card-body > a {
    color: currentColor;
    text-decoration: none;
}

.card-footer > a, .list-item-footer > a, .card-footer > span > a, .list-item-footer > span > a {
    color: rgb(124, 102, 102);
    text-decoration: none;
}

.clear-queue, .save-queue-as {
    color: #b5b5b5;
    text-decoration: none;
}

.card-body > a > h5 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-block-end: 0;
    opacity: 0.8;
}

#app-footer {
    padding-top: 20px;
}

#app-view {
    padding-top: 10px;
    margin-left: 0;
    margin-right: 0;
}

.dir-info {
    background-color: #353535;
}

.card:hover .card-title {
    opacity: 1;
    color: #ff3445;
}

.card-title:hover {
    cursor: pointer;
}

.card:hover {
    box-shadow: 1px 2px 4px rgba(48, 90, 110, 0.5);
}

.card-footer {
    padding: 5px;
}

nav {
    background-color: #1f1f1f !important;
}
#navbarSupportedContent > ul > li {
    background-color: unset !important;
}

.dropdown-menu {
    background-color: #969696;
}

.dropdown-menu a:hover {
    background-color: #242424;
    cursor: pointer;
}

.nav-link:hover {
    cursor: pointer;
}

.page-link {
    color: #2f2d31 !important;
}

.page-link:hover {
    cursor: pointer;
    background-color: #565656 !important;
}

.page-input {
    max-width: 75px;
    text-align: center;
    background-color: #c5c5c5 !important;
}

#match-media-manual-id {
    background-color: #FFFFFF !important;
}

#match-media-item-name {
    background-color: #FFFFFF !important;
}

.empty-dir {
    text-align: center;
    padding-top: 30px;
    padding-bottom: 30px;
}

.empty-dir div {
    display: inherit;
}

.empty-dir-icon > i{
    font-size: 36px;
 }

.empty-dir-title {
    font-size: 24px;
    color: #0b0b0b !important;
}

.page-num {
    font-weight: bold;
    color: #525252;
    font-size: 18px;
}

.movie-id-active > a {
    color: green !important;
}

.alert.alert-primary {
    word-break: break-all;
}

.as-poster-label {
    font-size: 14px;
}

.scan-info {
    margin-left: 30px;
    font-size: 11px;
    font-weight: normal;
    opacity: .9;
    display: block;
    margin-top: -1px;
    width: fit-content;
    line-height: 0.9;
}

.btn-group-xs > .btn, .btn-xs {
    padding: .25rem .4rem;
    font-size: .875rem;
    line-height: .5;
    border-radius: .2rem;
}

ul.download-recent, ul.history-recent {
    line-height: 11px;
    font-size: 14px;
}

.btn-match-media {
    line-height: .8;
    font-size: 11px;
}

.dir-item, .file-item {
    padding: .3rem 0 .3rem 0;
}

.root-item {
    padding: 10px;
}

.non-stream a:hover {
    text-decoration: none;
    cursor: default;
}

#recommended-videos {
    font-size: 14px;
    /*border-radius: 12px;*/
}

.iframe-mt-hide {
    margin-top: 37px;
}

.recent-history-url, .recent-download-url {
    font-size: 12px;
    color: #6c757d!important;
    cursor: pointer;
    line-height: 20px;
}
.recent-history-url:hover, .recent-download-url:hover {
    text-decoration: underline;
}
.video-focus {
    border: 1px solid #bd7f41 !important;
    z-index: 100;
}

#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 101;
}

.history-item, .recent-item, .ignore-channel-item, .subscribe-channel-item {
    color: #9d9d9d;
}
.youtube-video-item.card-view {
    width: 23rem;
    font-size: 14px;
}

.youtube-video-item.card-view > .card-youtube-image {
    height: 204px;
}
.card-view > .card-youtube-image {
    max-height: 200px;
    object-fit: cover;
    width: 100%;
    /*height: 138px;*/
    object-position: center 40%;
}

.card-view > .card-body {
    padding: .15rem;
}

ul.main-menu-list > li {
    min-width: 215px;
}

div.comment-section {
    border-radius: 0.5rem;
    border: 1px solid #999999;
    /*overflow-y: scroll;*/
    /*max-height: 500px;*/
    overflow-x: hidden;
    margin-top: 5px;
}

div.comment-section > div.row {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}
div.comment-section ul {
    padding-left: 10px;
    padding-right: 2px;
    list-style-type: none;
}
div.comment-section, div.comment-section li {
    background-color: #999999 !important;
}

div.comment-section .cm-avatar-con {
    width: 42px;
    flex: unset;
}

div.comment-section .cm-image {
    width: 32px;
}

div.comment-section .cm-message {
    display: block;
    margin-right: 10px;
    word-break: break-word;
}

div.comment-section .cm-message > a {
    color: #404041;
}

div.comment-section li {
    border-top: 1px solid #5d5d5d;
}

div.comment-section .cm-odd {
    background-color: #a9a9a9 !important;
}

div.comment-section .cm-author {
    font-weight: bold;
    color: #373737;
}

div.comment-section .row {
    padding-top: 2px;
    /*padding-bottom: 3px;*/
}

#commentModal, #detailModal, #saveQueueAsModal, #refreshChannelModal, #share-form {
    background-color: unset !important;
}

#commentModal .modal-content, #detailModal .modal-content, #saveQueueAsModal .modal-content,
#refreshChannelModal .modal-content, #share-form .modal-content {
    background-color: #2d2d2d;
}

#commentModal .modal-footer, #detailModal .modal-footer, #saveQueueAsModal .modal-footer,
#refreshChannelModal .modal-footer, #share-form .modal-footer {
    border-top: 1px solid #555555;
}

#commentModal .modal-header, #detailModal .modal-header, #saveQueueAsModal .modal-header,
#refreshChannelModal .modal-header, #share-form .modal-header {
    border-bottom: 1px solid #555555;
}

#commentModal .modal-body, #detailModal .modal-body, #saveQueueAsModal .modal-body,
#refreshChannelModal .modal-body, #share-form .modal-body {
    font-size: 14px;
}

#detailModal .modal-body, #saveQueueAsModal .modal-body, #refreshChannelModal .modal-body, #share-form .modal-body {
    background-color: #999999 !important;
}

a.load-detail {
    color: #919191;
}
a.load-detail:hover {
    text-decoration: none;
}

#detailModal #video-detail li {
    background-color: #999999 !important;
}

#detailModal .modal-body {
    padding: 0;
}

#video-detail > ul {
    padding-left: 30px;
    padding-right: 20px;
    padding-top: 10px;
}

li > span.detail-label {
    font-weight: 600;
}

/*.card-row {*/
/*    background-color: #1b1717*/
/*}*/
.video-image {
    border-radius: 5px;
    cursor: zoom-in;
}

#channel-rcm-ignore-list, #channel-rcm-subscribe-list {
    max-height: 250px;
    overflow-y: scroll;
}
#channel-rcm-ignore-list > li.list-group-item, #channel-rcm-subscribe-list > li.list-group-item {
    background-color: #737373 !important;
}

a.switch-yt-mode {
    color: antiquewhite;
}

.jump-to-card {
    color: grey;
    font-size: 14px;
    padding-left: 5px !important;
    padding-right: 5px;
}

.jump-to-card a {
    text-decoration: none;
    color: grey;
}

#youtube-iframe-container .playing-btn {
    padding-right: 5px!important;
    display: ruby;
}

#youtube-iframe-container.card-view h5 {
    margin-bottom: 0;
}
.truncate-text {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.truncate-reverse {
    direction: rtl;
    text-align: right;
    unicode-bidi: normal;
}

div.card-view iframe {
    padding-top: 5px;
}

div.card-view .jump-to-card {
    padding-top: 5px;
}

@media only screen and (min-width: 573px) {
    .col-md-8 {
        padding: 5px;
    }

    #youtube-iframe-container.video-popup.active {
        padding: 0 !important;
    }
}

@media only screen and (max-width: 572px) {
    span#config-alternative {
        display: none !important;
    }
    span#toggle-card {
        display: none !important;
    }
    span.btn-extra-header {
        display: none;
    }
    .row {
        padding-right: 0 ;
        padding-left: 0;
        margin-left: 0;
        margin-right: 0;
    }

    #title-row {
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 0;
        padding-right: 0;
    }

    div.justify-content-center > .youtube-video-item.card-view {
        width: 100%;
    }
    .youtube-video-item.card-view > img {
        max-height: 400px;
    }
    .col-sm-3, .col-sm-9 {
        max-width: 100%;
    }

    #youtube-page div.container, .row, #youtube-page div.container-fluid, #youtube-iframe-container,
    #recommended-videos-container, .col-md-6, .col-md-12, .col-sm-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    div.row .pr-3 .history-div {
        padding-left: inherit;
        padding-right: inherit;
    }
    #history-container, #recent-container, .input-group, .col-md-12.header-menu,
    #recommended-videos-container, #recommended-videos-container-card h5 {
        padding: 8px !important;
    }

    #youtube-iframe-container {
        padding: 8px 8px 0 8px !important;
    }

    #youtube-iframe-container.video-popup.active {
        padding: 0 !important;
    }

    .custom-control-label {
        word-break: break-all;
    }
    .btn-group {
        padding-right: 8px;
    }
    #search-box {
        padding-left: 8px !important;
    }
    #main-div div.modal-dialog,#main-div div.modal-dialog div {
        padding-right: inherit;
        padding-left: inherit;
    }
    #main-div div.modal-dialog div.modal-header, #main-div div.modal-dialog div.modal-body,
    #main-div div.modal-dialog div.modal-footer {
        padding-right: 5px;
        padding-left: 5px;
    }

    div#dl-form {
        padding-right: 5px;
        padding-left: 5px;
    }
    div#search-box {
        padding-left: 0 !important;
    }
    div#search-box .col-md-8 {
        padding-left: 5px;
    }
    div#recommended-videos-container-card h5 {
        margin-bottom: 0;
        padding-bottom: 0 !important;
    }
    p.jump-to-card {
        display: block;
    }
    .jump-to-card {
        padding-left: 10px!important;
    }
    div.card-view .card-text {
        font-size: .95rem;
    }
    div.card-view .card-footer > a.card-action-alt {
        padding-left: .65rem !important;
    }
    div.card-view .card-footer > a.card-link.float-right {
        padding-right: 2px;
    }
    div.card-view .card-footer > a.card-link.badge {
        margin-left: 2px;
    }
    div.card-view .card-subtitle {
        padding-left: 2px;
    }

    .card-view > .card-youtube-image {
        object-fit: contain;
        height: 100% !important;
    }

    #recommended-videos .container-fluid .card-body {
        padding-top: 5px !important;
    }

    #youtube-page div.container-fluid.save-queue-list {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}

#recommended-videos li.list-group-item, li.history-item, li.recent-item, ul#channel-rcm-ignore-list li.ignore-channel-item, ul#channel-rcm-subscribe-list li.subscribe-channel-item {
    background-color: #1b1717 !important;
    border: 1px solid rgba(136, 136, 136, 0.13);
    margin-right: 3px;
}

#youtube-page.modal-open #detailModal, #youtube-page.modal-open #commentModal {
    width: 100%;
}

::-webkit-scrollbar {
    background: #232324;
    color: #aba499;
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #454a4d;
    -webkit-border-radius: 1ex;
    -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);
}

::-webkit-scrollbar-corner {
    background: #181a1b;
}

.subscribe, .subscribed {
    cursor: pointer;
}
.subscribe:hover {
    opacity: 1;
    color: #ffd01c;
}

.subscribed:hover {
    color: #fadd97;
}

.subscribe {
    opacity: .5;
}

.subscribed {
    color: #ffd01c;
}

.ignored-video {
    opacity: .3;
}

#cache-time, #ignored-videos {
    font-size: 12px;
    color: grey;
}

.rebuild-now {
    font-size: 12px;
    color: green;
}

.localization-now {
    font-size: 12px;
    color: #9c9cd1;
}

#paste-youtube-url:hover {
    color: orange;
    cursor: pointer;
}

.media-overview {
    overflow: hidden;
    height: 70px;
}

.feature-badges {
    bottom: 3px;
    position: absolute;
    font-size: 13px;
    width: 100%;
}

a.watched-video {
    opacity: .7;
}

a.watched-video > i {
    color: #735814;
}

span.history-info {
    opacity: .7;
}
span.history-info > i {
    color: #735814;
}

span.history-info:hover {
    cursor: pointer;
    opacity: 1;
}

a.watched-video:hover > i {
    color: #b08715;
}

.lds-dual-ring {
    /* change color here */
    color: #757472
}
.lds-dual-ring,
.lds-dual-ring:after {
    box-sizing: border-box;
}
.lds-dual-ring {
    display: inline-block;
    width: 20px;
    height: 20px;
}
.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 16px;
    height: 16px;
    margin: 2px;
    border-radius: 50%;
    border: 1.6px solid currentColor;
    border-color: currentColor transparent currentColor transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

span.item-size {
    color: #9f9f9f;
    font-size: 12px;
}

.save-queue-as {
    color: #65c765;
}

#queue-item-list span {
    cursor: pointer;
    opacity: .5;
}

#queue-item-list span:hover {
    opacity: 1;
}

span.video-duration {
    font-weight: normal;
    opacity: .7;
}

span.channel-info {
    cursor: pointer;
}

span.channel-info:hover {
    opacity: 1;
    text-decoration: underline;
}

a.play-random {
    color: green;
}
.ignore-video-list {
    min-height: 180px;
}
.ignore-video-list code, .ignore-video-list a {
    color: black;
}

.jump-to-card a#btn-close-player {
    border: solid 2px gray;
    border-radius: 30%;
    margin-left: 8px;
    padding-left: 3px;
    padding-right: 3px;
}

.jump-to-card a#btn-close-player:hover {
    border: solid 2px white;
}
span#play-status, span#history-status{
    color: green;
    font-weight: bold
}
a.item-in-queue {
    color: #7c6666;
}
a.btn-save-queue {
    padding-left: 2px;
}

a.queue-text-success {
    color: #19692c!important;
}

a.queue-text-success:hover {
    color: #29c851 !important
}

.thumb-label {
    position: absolute; bottom: 8px; right: 16px;
    font-size: 12px;
    font-weight: bold;
    opacity: .7;
    max-width: 80%;
}

.thumb-label > span {
    background-color: white;
}

.youtube-comment-reply {
    padding-left: 30px !important;
    opacity: .9;
}

.lds-dual-ring-loading,
.lds-dual-ring-loading:after {
    box-sizing: border-box;
}
.lds-dual-ring-loading {
    display: inline-block;
    width: 14px;
    height: 14px;
}
.lds-dual-ring-loading:after {
    content: " ";
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.6px solid currentColor;
    border-color: currentColor transparent currentColor transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

.menu-active {
    color: #d9d9d9 !important;
}

a.share-item:hover {
    color: inherit !important;
}