/* GLOBAL */
:root {
    /* Colors */
    --bg-dark-color: #000000;
    --bg-dark-alt-color: #222222;
    --bg-dark-button-border-color: #333333;
    --bg-light-color: #ffffff;
    --text-dark-color: #ffffff;
    --text-light-color: #000000;
    --brand-twitch-color: #9148fF;

    /* Fonts */
    --font-family: 'Lexend', sans-serif;

    /* Player */
    --player-width: 400px;
    --player-height: 300px;

    /* Breakpoints */
    --breakpoint-xs: 320px;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark-alt-color);
    -ms-overflow-style: none;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 400px;
    line-height: 1.5;
}

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

iframe {
    border: none;
    width: 100%;
    height: 100%;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bg-dark-button-border-color);
    outline: none;
    background: var(--bg-dark-alt-color);
    color: var(--text-dark-color);
    cursor: pointer;
    position: relative;
    background-image: none;
    position: relative;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
}

.row {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}

.hidden {
    display: none;
}

/* Icons */

i {
    font-size: 14px;
}

@media (min-width: 768px) {
    i {
        font-size: 20px;
    }
}

.fa-comment-dots {
    font-size: 16px;
}

@media (min-width: 768px) {
    .fa-comment-dots {
        font-size: 18px;
    }
}

.fa-right-to-bracket {
    font-size: 16px;
}

@media (min-width: 768px) {
    .fa-right-to-bracket {
        font-size: 18px;
    }
}

.fa-arrows-up-down-left-right {
    font-size: 16px;
}

@media (min-width: 768px) {
    .fa-right-to-bracket {
        font-size: 18px;
    }
}

.fa-shuffle {
    font-size: 16px;
}

@media (min-width: 768px) {
    .fa-shuffle {
        font-size: 18px;
    }
}

.fa-question {
    font-size: 17px;
}

@media (min-width: 768px) {
    .fa-question {
        font-size: 18px;
    }
}

/* #header */

#header {
    background: var(--bg-dark-color);
    color: var(--text-dark-color);
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    #header {
        padding: 10px 20px;
    }
}

#header h1 {
    margin: 0;
    text-transform: uppercase;
    font-size: 18px;
    letter-spacing: 4px;
}

@media (min-width: 768px) {
    #header h1 {
        font-size: 22px;
    }
}

#header h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 6px;
    line-height: 0;
    color: var(--brand-twitch-color);
}

@media (min-width: 768px) {
    #header h2 {
        font-size: 14px;
    }
}









#header #logo {
    text-align: center;
    width: 30%;
    display: flex;
}

@media (min-width: 768px) {
    #header #logo {
        width: 70%;
        gap: 10px;
    }
}

#header #stats {
    width: 70%;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
}

@media (min-width: 768px) {
    #header #stats {
        width: 30%;
    }
}

#header #stats i {
    color: var(--brand-twitch-color);
}




#header #logo h1 span:first-of-type,
#header #logo h2 span:first-of-type {
    display: none;
}

@media (min-width: 768px) {
    #header #logo h1 span:first-of-type {
        display: unset;
    }
}

@media (min-width: 1200px) {
    #header #logo h2 span:first-of-type {
        display: unset;
    }
}

@media (min-width: 768px) {
    #header #logo h1 span:last-of-type {
        display: none;
    }
}

@media (min-width: 1200px) {
    #header #logo h2 span:last-of-type {
        display: none;
    }
}

#header #streams-online-count,
#header #streams-viewers-count {
    font-weight: 600;
}

@media (min-width: 768px) {

    #header #streams-online-count,
    #header #streams-viewers-count {
        font-size: 20px;
    }
}

/* #nav */
#nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-dark-color);
    padding: 0 10px 10px 10px;
}

@media (min-width: 768px) {
    #nav {
        padding: 0px 20px 10px 20px;
        justify-content: flex-start;
        gap: 20px;
    }
}

#nav>div {
    width: 100%;
    ;
}

@media (min-width: 768px) {
    #nav>div {
        width: auto;
    }
}

@media (min-width: 768px) {
    #nav .spacer {
        margin-left: auto;
    }
}

#nav button,
#nav .button {
    background: none;
    outline: none;
    color: var(--text-dark-color);
    text-decoration: none;
    text-align: center;
    background: var(--bg-dark-alt-color);
    border: 1px solid var(--bg-dark-button-border-color);
    width: 100%;
    height: 40px;
    display: table-cell;
    vertical-align: middle;
    padding: 0 18px;
}

@media (min-width: 768px) {

    #nav button,
    #nav .button {
        font-size: 18px;
    }
}

#nav button.active i {
    color: var(--brand-twitch-color);
}

#nav .text {
    display: none;
}

@media (min-width: 768px) {
    #nav .text {
        display: unset;
    }
}


/* CONTENT */


#main {
    display: flex;
    flex: 1;
    flex-direction: column-reverse;
    max-width: 100%;
    padding: 0;
    gap: 0;
    justify-content: space-around;
    position: relative;
    overflow-x: hidden;
    min-height: var(--player-container-height);
}

@media (min-width: 768px) {
    #main {
        flex-direction: row;
    }
}

#main #content {
    width: 100%;
    padding: 10px 0;
}

@media (min-width: 768px) {
    #main #content {
        padding: 10px;
    }
}

#main #players {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    height: 100%;
    gap: 10px;
}

#main #players .player {
    border: 1px solid #000;
    box-sizing: border-box;
    width: calc(var(--player-width) - 25px);
    height: calc(var(--player-height) - 25px);
    min-width: 402px;
    min-height: 302px;
}

#main #players .player.offline {
    display: none;
}



#main #players .player.online:not(.hidden) {
    display: unset;
}

#main #players .player iframe {
    background: var(--bg-dark-color);
}





/* .sidebar */
.sidebar {
    background: var(--bg-dark-color);
    padding: 0 10px;
    transition: 0.3s ease;
    padding-bottom: 10px;
}

@media (min-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 330px;
        padding: 0 20px 0 20px;
    }
}

.sidebar.hidden {
    position: absolute !important;
    margin-top: -150vw !important;
}

@media (min-width: 768px) {
    .sidebar.hidden {
        position: absolute !important;
        margin-right: -150vw !important;
    }
}

.sidebar .sidebar-container {
    margin-top: 0;
    transition: 0.3s ease;
}

.sidebar .sidebar-container.scroll {
    margin-top: 0;
    padding-top: 10px;
}

@media (min-width: 768px) {
    .sidebar .sidebar-container.scroll {
        margin-top: var(--page-scroll-height);
        padding-top: 10px;
    }
}

.sidebar h3 {
    margin: 0;
    line-height: 1;
    font-weight: normal;
}

/* #sidebar-chat */





#sidebar-chat .sidebar-container #twitch-chat-embed {
    height: calc(var(--player-container-height) - 60px);
    margin-top: 10px;
}

/* #sidebar-filters */

#sidebar-filters {
    color: var(--text-dark-color);
    font-size: 13px;
}

#sidebar-filters .sidebar-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#sidebar-filters .filter-controls {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
}

.filter-item label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

@media (min-width: 768px) {
    .filter-item label {
        max-width: unset;
    }
}





input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border: 2px solid var(--bg-dark-button-border-color);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: var(--brand-twitch-color);
}

input[type="checkbox"]:checked::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #fff;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}









#sidebar-filters .filter-list .filter-item input[type="checkbox"] {
    margin-right: 5px;
}

#sidebar-filters .filter-controls .btn {
    color: #fff;
    border-bottom: 1px solid;
    padding: 0 0 2px 0;
    background: none;
    font-size: 11px;
}

/* Accordion Header Styles */
/* General Filter Styles */
.filter {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.filter-header {
    cursor: pointer;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-dark-alt-color);
    border: 1px solid var(--bg-dark-button-border-color);
    border-bottom: 0;
}

.filter-content {
    max-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    transition: max-height 0.3s ease;
    background-color: var(--bg-dark-alt-color);
    padding: 10px;
    border: 1px solid var(--bg-dark-button-border-color);
    scrollbar-width: none;
    /* Hide scrollbar in Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar in Internet Explorer 10+ */
}

.filter-content::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar in WebKit browsers (Chrome, Safari, Edge) */
}

.filter-content.hidden {
    display: none;
}

.filter-content.active {
    display: block;
    max-height: 500px;
}

/* Toggle Icon Styles */
.toggle-icon i {
    font-size: 10px;
    color: white;
}

.filter-header .toggle-icon i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.filter-header.active .toggle-icon i.fa-chevron-down {
    transform: rotate(180deg);
    /* Flip the arrow up */
}



#footer {
    background: var(--bg-dark-color);
    color: var(--text-dark-color);
    padding: 10px 20px;
    display: flex;
    gap: 5px;
    flex-direction: row;
    justify-content: space-between;
}

#footer p {
    margin: 0;
}

#footer a {
    color: #ffffff;
    text-decoration: none;
}

#footer i {
    font-size: 14px;
}

#footer #credits {
    display: flex;
    row-gap: 5px;
    column-gap: 15px;
    flex-wrap: wrap;
}

#footer .row {
    gap: 5px;
    flex-direction: row;
}

@media (min-width: 768px) {
    #footer #credits {
        display: flex;
        gap: 15px;
    }
}

/* .loader {
    display: inline-block;
    font-size: 14px;
    color: #ffffff;
}

.loader::after {
    content: ' ';
    animation: dots 1s infinite;
}

@keyframes dots {
    0%, 20% {
        content: ' .';
    }

    40% {
        content: ' ..';
    }

    60% {
        content: ' ...';
    }

    80%, 100% {
        content: ' ....';
    }
} */

/* Error Pages */
.error-page main {
    text-align: center;
    color: var(--text-dark-color);
    font-size: 400%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
}

.error-page main h1 {
    margin: 0;
}

.error-page main p {
    margin: 0;
}

@keyframes subtle-wiggle {
    0%, 100% {
        transform: rotate(-1deg);
    }

    50% {
        transform: rotate(1deg);
    }
}

.player {
    position: relative;
    transition: transform 0.2s;
}

.player .drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark-color);
    opacity: 0.5;
    z-index: 10;
    display: none;
}

.player.draggable-active {
    cursor: move;
    animation: subtle-wiggle 0.5s infinite;
}

.player.dragging {
    opacity: 0.5;
    animation: none;
}

.player.draggable-active .drag-overlay {
    display: block;
}

.player.target-drop .drag-overlay {
    background: var(--brand-twitch-color);
    opacity: 0.5;
}

.player.selected {
    opacity: 0.8;
}

.player.selected .drag-overlay {
    background: var(--brand-twitch-color);
}


/* Modal*/
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    padding-top: 30px;
}

.modal-content {
    background-color: var(--bg-dark-alt-color);
    margin: auto;
    padding: 20px 40px;
    border: 1px solid var(--bg-dark-button-border-color);
    width: 80%;
    max-width: 960px;
    color: #fff;
    margin-bottom: 80px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-header .close:hover,
.modal-header .close:focus {
    color: #fff;
    text-decoration: none;
}

.modal a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid;
}