
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

#loginform > .form-group {
    margin-right: 5px;
}

.center {
    text-align: center;
}

.messagebox > p {
    margin-top: 20px;
}

.vertical-spacer {
    margin-top: 10px;
}

#messagebuffer {
    width: auto;
    padding-left: 5px;
    padding-right: 5px;
}

#usercount {
    white-space: nowrap;
    flex-grow: 2;
}

#userlist {
    width: 120px;
    float: left;
    border-right: 0;
    font-size: 9pt;
    list-style: none outside none;
    padding: 0;
}

#messagebuffer, #userlist {
    height: 329px;
    overflow-x: hidden;
    overflow-y: scroll;
    margin-bottom: 0;
}

#chatline, #guestlogin > input, #guestlogin > .input-group-addon {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.linewrap, .linewrap code {
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: -o-pre-wrap; /* Opera 7 */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
}

#from-url, #from-search {
    margin-top: 3px;
}

.clear {
    clear: both;
}

.chat-timestamp {
    font-size: 8pt;
}

.chat-name {
    font-weight: bold;
}

#customembed > .input-group {
    margin-top: 5px;
}

.drink {
    margin: 10px 10px;
    padding: 10px 0px;
    border: 2px solid;
}

#drinkcount {

    text-align: center;
    font-weight: bold;
}

#chatheader {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

#chatheader > p, #videowrap-header {
    margin: 0;
}

.pointer {
    cursor: pointer;
}

#chatwrap, #videowrap {
    margin-bottom: 10px;
}

.embed-responsive-chat {
    padding-bottom: 78.75%;
}

#userpl_list {
    list-style: none outside none;
    margin-left: 0;
    max-height: 500px;
    overflow-y: scroll;
}

/*
#userpl_list li {
    display: inline-block;
    line-height: 22px;
    width: 100%;
    clear: both;
    margin: 2px 0 0 auto;
    padding: 2px;
    font-size: 8pt;
}
*/

#customembed_wrap {
    margin: 5px 0;
}

#playlistmanagerwrap {
    margin-top: 10px;
}

#library {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 5px;
}

#library_search, #queue_next, #ce_queue_next {
    border-radius: 0;
}

#plmeta {
    border-radius: 4px;
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.videolist {
    list-style: none outside none;
    margin-left: 0;
    max-height: 500px;
    overflow-y: auto;
}



#pllength {
    float: right;
}

.queue_temp {
    background-image: url(/img/stripe-diagonal.png);
}

.videolist {
    padding: 0;
    margin: 0;
}

#queue > li:last-child {
    border-bottom-width: 0;
    margin-bottom: 0;
}

#userpl_list > li:last-child {
    border-bottom-width: 1px;
}

.videolist > li:first-child {
    border-top-width: 1px;
}

li.ui-sortable-helper, li.ui-sortable-placeholder + li.queue_entry {
    border-top-width: 1px;
}

.qe_btn {
    height: 20px;
    font-family: Monospace;
    padding: 0 5px 0 5px;
    margin: auto;
    overflow: hidden;
}

.qe_buttons, .qe_title {
    float: left;
}

.qe_time {
    float: right;
    font-family: Monospace;
}

.qe_clear {
    clear: both;
}

.clear {
    clear: both;
}

#chatheader .label {
    height: 100%;
    margin-left: 2px;
}

.well hr {
    border-color: #cccccc;
}

#csstext, #jstext {
    font-family: Monospace;
}

#optedit, #permedit, #filteredit, #motdedit, #cssedit, #jsedit,
#banlist, #loginhistory, #channelranks, #chanlog {
    display: none;
}

#chanlog_contents {
    max-height: 400px;
    overflow-y: scroll;
    margin-top: 10px;
}

.server-msg-disconnect {
    border: 1px solid #ff0000;
    line-height: 2;
    margin-top: 5px;
    margin-bottom: 5px;
    color: #ff0000;
    text-align: center;
    background-color: rgba(129, 20, 21, 0.1);
}

.server-msg-reconnect {
    border: 1px solid #009900;
    line-height: 2;
    margin-top: 5px;
    margin-bottom: 5px;
    color: #009900;
    text-align: center;
    background-color: rgba(18, 100, 18, 0.1);
}

.queue_sortable li {
    cursor: row-resize;
}

.poll-notify {
    color: #0000aa;
    font-weight: bold;
    font-size: 14pt;
}

.userlist_item {
    cursor: pointer;
}

.userlist_siteadmin {
    color: #cc0000!important;
    font-weight: bold!important;
}

.userlist_owner {
    color: #0000cc!important;
    font-weight: bold!important;
}

.userlist_op {
    color: #00aa00!important;
}

.userlist_guest {
    color: #888888!important;
}

.bot-tag {
    font-size: 0.75em;
    color: #5bc0de;
    font-weight: normal;
    font-style: normal;
    vertical-align: middle;
    margin-left: 1px;
}

.action {
    font-style: italic;
    color: #888888;
}

.server-whisper {
    font-style: italic;
    color: #888888;
    font-size: 8pt;
}

.spoiler {
    color: #000000;
    background-color: #000000;
}

.spoiler:hover {
    color: #ffffff;
}

.greentext {
    color: #789922; /* Color value directly from 4chan */
}

.shout {
    color: #ff0000;
    font-weight: bold;
    font-size: 18pt;
}

.mono {
    font-family: Monospace;
}

.nick-highlight {
    background-color: #ddffdd;
}

.nick-hover {
    background-color: #ffff99;
}

.timestamp {
    font-size: 8pt;
}

.profile-box {
    z-index: 9999;
    position: fixed;
    border: 1px solid #aaaaaa;
    border-radius: 5px;
    padding: 5px;
    max-width: 200px;
    max-height: 300px;
    overflow-y: hidden;
}

.user-dropdown {
    z-index: 9999;
    position: absolute;
    border: 1px solid #aaaaaa;
    border-radius: 5px;
    color: #000000;
    max-width: 200px;
    padding: 5px;
}

.profile-image {
    max-width: 80px;
    max-height: 80px;
    border: 1px solid #aaaaaa;
    border-radius: 5px;
}

#togglemotd .glyphicon {
    font-size: 10pt;
}

.poll-menu > .btn, .poll-menu > input {
    clear: both;
    margin-bottom: 10px;
}

.poll-menu {
    margin-top: 10px;
}

#search_clear {
    margin-top: 10px;
}

#qualitywrap {
    margin-right: 5px;
}

#guestlogin .input-group-addon {
    min-width: 120px;
}

#channeloptions .modal-header {
    border-bottom: none;
}

#pollwrap > div {
    margin-top: 10px;
}

.option {
    margin-top: 5px;
}

.option-selected {
    font-weight: bold;
}

.option > button {
    margin-right: 15px;
}

.option-selected > button {
    border-width: 3px !important;
    margin-right: 10px;
}

#useroptions .modal-header {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

#useroptions .modal-body {
    padding-top: 0;
    margin-top: 0;
}

.qfalert {
    margin-bottom: 10px;
    padding-left: 0!important;
    padding-right: 0!important;
}

#customembed-content {
    font-family: Monospace;
}

#cs-csstext, #cs-jstext, #cs-motdtext {
    font-family: Monospace;
}

#cs-csssubmit, #cs-motdsubmit, #cs-jssubmit {
    margin-top: 10px;
}

#cs-chatfilters input[type='text'], #cs-chatfilters textarea {
    font-family: monospace;
}

#cs-chatfilters-exporttext {
    margin-top: 5px;
}

#cs-emotes input[type='text'], #cs-emotes textarea {
    font-family: monospace;
}

#cs-emotes-exporttext {
    margin-top: 5px;
}

.pagination {
    margin: 0;
}

#cs-chanlog-filter {
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

#cs-chanlog-text {
    max-height: 300px;
    overflow-y: scroll;
    font-size: 8pt;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.channel-emote {
    max-width: 200px;
    max-height: 200px;
}

#cs-emotes td:nth-child(3) {
    max-width: 300px;
}

#pmbar {
    position: fixed;
    bottom: 0;
    z-index: 10000;
    min-width: 100%;
    pointer-events: none;
}

body.chatOnly .pm-panel, body.chatOnly .pm-panel-placeholder {
    margin-left: 0;
    margin-right: 5px;
    float: right;
}

.pm-panel, .pm-panel-placeholder {
    margin-left: 5px;
    margin-bottom: 20px;
    float: left;
    width: 250px;
    pointer-events: auto;
}

.pm-panel {
    margin-bottom: 0!important;
    border-radius: 0!important;
    border-radius: 0!important;
}

.pm-panel > .panel-heading {
    cursor: pointer;
    border-radius: 0!important;
    border-radius: 0!important;
}

.pm-panel > .panel-body {
    padding: 0;
}

.pm-panel > .panel-body > .pm-buffer {
    height: 200px;
    overflow-y: scroll;
}

.pm-panel > .panel-body > hr {
    margin: 0;
}

.pm-input {
    margin: 0;
    width: 100%;
    border-top-left-radius: 0!important;
    border-top-right-radius: 0!important;
}

.chat-shadow {
    text-decoration: line-through;
}

#chanjs-allow-prompt {
    text-align: center;
}

#chanjs-allow-prompt-buttons {
    margin-top: 10px;
}

#chanjs-allow-prompt-buttons button:first-child {
    margin-right: 5px;
}

@media screen and (min-width: 768px) {
    .modal-dialog {
        min-width: 600px!important;
        max-width: 1200px!important;
        width: auto!important;
    }

    .modal-dialog-nonfluid.modal-dialog {
        max-width: 600px!important;
    }
}

table td {
    max-width: 200px;
    word-wrap: break-word;
}

#cs-chatfilters table .form-group {
    max-width: 25%;
}

#cs-chatfilters table .form-group > input {
    max-width: 100%;
}

#userlisttoggle {
    padding-bottom: 2px;
}

.queue_entry {
    line-height: 22px;
    padding: 2px;
    font-size: 8pt;
    border: 1px solid;
    border-top-width: 0;
}

.emotelist-table { margin: auto; }
.emote-preview-container { width: 60px; height: 60px; float: left; text-align: center; white-space: nowrap; margin: 3px; }
.emote-preview-hax { display: inline-block; vertical-align: middle; height: 100%; }
.emote-preview { max-width: 56px; max-height: 56px; cursor: pointer; }
.emotelist-paginator-container { text-align: center; }

/* Emote browser panel */
#emote-browser {
    display: none;
    position: fixed;
    z-index: 1060;
    width: 340px;
    height: 360px;
    min-width: 260px;
    min-height: 220px;
    max-width: 90vw;
    max-height: 85vh;
    background: #272b30;
    border: 1px solid #555;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,.6);
    padding: 6px;
    --emote-browser-item-size: 52px;
    --emote-browser-image-size: 48px;
}
#emote-browser-search {
    width: 100%;
    margin-bottom: 6px;
    background: #1a1d20;
    color: #c8c8c8;
    border-color: #555;
}
#emote-browser-search:focus { border-color: #888; outline: none; box-shadow: none; }
#emote-browser-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    height: calc(100% - 38px);
    overflow-y: auto;
}
.emote-browser-item {
    width: var(--emote-browser-item-size);
    height: var(--emote-browser-item-size);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 3px;
    flex-shrink: 0;
}
.emote-browser-item:hover { background: #3a3f44; }
.emote-browser-item img { max-width: var(--emote-browser-image-size); max-height: var(--emote-browser-image-size); object-fit: contain; }

.emote-browser-resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(215, 215, 215, 0.65), rgba(150, 150, 150, 0.55));
    border: 1px solid rgba(18, 20, 22, 0.55);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    z-index: 2;
    opacity: 0.85;
    transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}
.emote-browser-resize-handle:hover {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.emote-browser-resize-handle.ne { top: -7px; right: -7px; cursor: nesw-resize; }
.emote-browser-resize-handle.nw { top: -7px; left: -7px; cursor: nwse-resize; }
.emote-browser-resize-handle.se { bottom: -7px; right: -7px; cursor: nwse-resize; }
.emote-browser-resize-handle.sw { bottom: -7px; left: -7px; cursor: nesw-resize; }

#leftcontrols .btn {
    margin-right: 5px;
}

#videowrap .embed-responsive:-webkit-full-screen { width: 100%; }
#videowrap .embed-responsive:-moz-full-screen { width: 100%; }
#videowrap .embed-responsive:-ms-full-screen { width: 100%; }
#videowrap .embed-responsive:-o-full-screen { width: 100%; }
#videowrap .embed-responsive:full-screen { width: 100%; }

li.vjs-menu-item.vjs-selected {
    background-color: #66a8cc !important;
}

.video-js video::-webkit-media-text-track-container {
    bottom: 50px;
}

input#logout[type="submit"] {
    background: none;
    border: none;
    padding: 0;
}

input#logout[type="submit"]:hover {
    text-decoration: underline;
}

#newmessages-indicator {
    position: relative;
    margin-top: -30px;
    line-height: 30px;
    height: 30px;
    text-align: center;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
}

#newmessages-indicator .glyphicon {
    margin-left: 10px;
    margin-right: 10px;
}

#soundcloud-volume-holder {
    position: absolute;
    top: 170px;
    width: 100%;
}

#soundcloud-volume-label {
    margin-left: 2px;
}

#soundcloud-volume {
    margin-top: 5px;
    margin-left: 10px;
    margin-right: 10px;
}

#resize-video-larger, #resize-video-smaller {
    float: right;
}

body.hd #resize-video-larger, body.hd #resize-video-smaller {
    display: none;
}

.userlist-ignored {
    text-decoration: line-through;
}

/* === TV / Big Picture Mode === */

body.tv #mainpage > .container-fluid {
    padding: 0;
}

body.tv #motdrow,
body.tv #announcements,
body.tv #drinkbarwrap {
    display: none;
}

body.tv #main.row {
    position: relative;
    height: calc(100vh - 60px);
    margin: 0;
    overflow: hidden;
}

body.tv #videowrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    padding: 0;
    z-index: 1;
}

body.tv #videowrap-header {
    display: none;
}

body.tv #videowrap .embed-responsive {
    padding-bottom: 0 !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100% !important;
}

body.tv #videowrap .embed-responsive-item,
body.tv #videowrap iframe,
body.tv #videowrap video,
body.tv #videowrap object,
body.tv #videowrap .video-js {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Chat overlay — left side, fully transparent background */
body.tv #chatwrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 460px;
    bottom: 50px;
    background: transparent !important;
    z-index: 10;
    margin: 0;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

body.tv #chatheader {
    display: none;
}

body.tv #userlist {
    display: none;
}

body.tv #messagebuffer {
    background: transparent !important;
    border: none !important;
    overflow: hidden !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0;
    flex: 1 1 auto;
}

body.tv #messagebuffer > * {
    background: rgba(0, 0, 0, 0.18) !important;
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 6px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

body.tv #messagebuffer > *.tv-msg {
    color: #fff;
    opacity: 1;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
    transition: opacity 8s linear;
}

body.tv #messagebuffer > *.tv-msg .timestamp {
    display: none !important;
}

body.tv #messagebuffer > *.tv-msg *,
body.tv #messagebuffer > *.tv-msg .username,
body.tv #messagebuffer > *.tv-msg a {
    color: inherit !important;
}

body.tv #messagebuffer > *.tv-msg .username {
    font-weight: 700;
}

body.tv #messagebuffer > *.tv-msg.tv-msg-fadeout {
    opacity: 0;
}

/* Controls bar — hidden until mouse moves */
#tv-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(0, 0, 0, 0.75);
    z-index: 20;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.tv-controls-visible #tv-controls-bar {
    opacity: 1;
    pointer-events: auto;
}

#tv-controls-bar form {
    flex: 1;
    margin: 0;
}

#tv-controls-bar #chatline {
    border-radius: 4px;
    margin: 0;
    width: 100%;
}

#tv-controls-bar #guestlogin {
    margin: 0;
}

/* Hide cursor when controls are not visible */
body.tv:not(.tv-controls-visible) {
    cursor: none;
}

body.tv #controlsrow,
body.tv #playlistrow {
    display: none;
}

.emote-suggest-item { padding: 3px 8px; cursor: pointer; display: flex; align-items: center; gap: 7px; font-size: 13px; color: #c8c8c8; }
.emote-suggest-item img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.emote-suggest-item:hover, .emote-suggest-item.active { background: #3a3f44; color: #fff; }
