body {
    background: #1a1a1a;
    font: 13px arial, sans-serif;
    margin: 2px;
    color: white;
    overflow-x: hidden;
}

a {
    color: white;
    cursor: pointer;
}

a:hover {
    text-decoration: none;
    cursor: pointer;
}

#wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#streams {
    text-align: center;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    transition: padding 0.2s ease;
    font-size: 0; /* Remove espaçamento entre elementos inline-block */
    line-height: 0;
}

iframe {
    border: 0 none;
}

.stream {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: block;
    pointer-events: auto;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.stream_chat {
    padding: 0;
}

#credits {
    text-align: right;
    font-size: 10px;
    padding-right: 10px;
    margin-top: 15px;
}

#bottom_right_bar {
    height: 1em;
    position: absolute;
    right: 8px;
    bottom: 12px;
}

#change_streams {
    width: 127px;
}

.fullwidth {
    width: 100%;
}

.left {
    float: left;
}

.right {
    float: right;
}

.centering {
    text-align: center;
}

.clear {
    clear: both;
}

.stream-wrapper {
    position: relative;
    display: inline-block;
    margin: 0;
    padding: 0;
    transition: width 0.2s ease, height 0.2s ease;
    overflow: hidden;
    box-sizing: border-box;
    vertical-align: top;
}

.stream-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    pointer-events: none;
}

.hover-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40px;
    z-index: 20;
    background-color: transparent;
    pointer-events: none;
}

.stream-wrapper:hover .hover-layer {
    pointer-events: auto;
}

.stream-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.stream-wrapper:hover .stream-controls {
    opacity: 1;
}

.stream-control-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.stream-control-btn:hover {
    background: rgba(33, 150, 243, 0.8);
}

.stream-control-btn.toggle-volume {
    background: rgba(0, 0, 0, 0.8);
}

.stream-control-btn.toggle-volume[data-muted="true"] {
    color: #ff5252;
}

.stream-control-btn.toggle-volume[data-muted="false"] {
    color: #4CAF50;
}

.stream-control-btn.toggle-volume:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Estilos para os botões de chat com diferentes estados */
.stream-control-btn.toggle-chat.chat-status-unknown {
    color: #aaa;
}

.stream-control-btn.toggle-chat.chat-status-checking {
    color: #FFC107;
}

.stream-control-btn.toggle-chat.chat-available {
    color: #4CAF50;
}

.stream-control-btn.toggle-chat.chat-unavailable {
    color: #F44336;
    cursor: not-allowed;
}

.stream-control-btn.toggle-chat.chat-unavailable:hover {
    background: rgba(0, 0, 0, 0.7);
}

.stream-wrapper:hover {
    transform: scale(1.01);
    z-index: 10;
}

.stream-wrapper:hover .channel-overlay {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, 0) !important;
    pointer-events: none;
}

.viewer-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.viewer-overlay i {
    font-size: 14px;
    color: #2196F3;
}

.channel-overlay {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translate(50%, 20px);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 20px;
    border: 1px solid rgba(33, 150, 243, 0.5);
    z-index: 100;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.channel-overlay.always-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.total-viewers-overlay {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    width: auto;
    min-width: unset;
    max-width: unset;
}

.total-viewers-overlay i {
    color: #ffffff;
    font-size: 14px;
}

#total-viewers-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 5px 0;
    position: relative;
}

#total-viewers-count {
    color: #ffffff;
    font-weight: bold;
}

.viewers-overlay {
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.viewers-overlay i {
    color: #ffffff;
    font-size: 12px;
}

/* Estilos para os modais */
.settings-section {
    margin-bottom: 20px;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2196F3;
}

.settings-info {
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.api-link {
    display: inline-block;
    margin-top: 5px;
    color: #64B5F6;
    text-decoration: none;
    font-weight: bold;
}

.api-link:hover {
    text-decoration: underline;
}

.api-key-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.api-key-container input {
    flex: 1;
    padding: 8px 12px;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}

.api-key-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.api-key-display-container {
    background: #333;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.api-key-display-container span {
    margin-right: 10px;
    font-weight: bold;
    color: #aaa;
}

#api-key-display {
    font-family: monospace;
    color: #64B5F6;
}

.layout-name-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

.layout-name-container input {
    flex: 1;
    padding: 8px 12px;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}

.remove-key-btn {
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: bold;
}

.remove-key-btn:hover {
    background: #b71c1c;
}

/* Opção para mostrar sempre o nome do canal */
.option-group {
    margin: 15px 0;
    padding: 15px;
    background: #252525;
    border-radius: 4px;
    border-left: 3px solid #2196F3;
}

.option-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.option-group input[type="checkbox"] {
    margin-right: 10px;
}

.modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.option-group h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2196F3;
    font-size: 16px;
}

.update-interval-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.update-interval-container input {
    flex: 0 0 100px;
    padding: 8px 12px;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.interval-unit {
    color: #aaa;
}

.interval-display {
    background: #333;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.interval-display span:first-child {
    margin-right: 10px;
    font-weight: bold;
    color: #aaa;
}

#current-interval {
    color: #64B5F6;
    font-family: monospace;
}

/* Estilos para o dropdown de layouts salvos */
.layout-dropdown-container {
  position: relative;
  display: inline-block;
}

.layout-dropdown-container .menu-button {
  width: auto;
  min-width: 100px;
}

.menu-button {
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0 15px;
  height: 40px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 500;
  min-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-button:hover {
  background-color: #1976D2;
}

#saved-layouts-dropdown {
  position: absolute;
  top: 45px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px;
  max-height: 300px;
  overflow-y: auto;
  width: 250px;
  z-index: 1001;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  display: none;
}

.saved-layouts {
    position: relative;
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    top: 100%;
    left: 0;
    right: auto;
}

.saved-layout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #444;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.saved-layout-item:hover {
    background-color: #333;
}

.saved-layout-item:last-child {
    border-bottom: none;
}

.layout-name {
    flex-grow: 1;
    color: #fff;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.delete-layout {
    color: #e74c3c;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    transition: color 0.2s ease;
}

.delete-layout:hover {
    color: #ff6b6b;
}

.no-layouts {
    color: #aaa;
    text-align: center;
    padding: 10px;
    font-style: italic;
}

.export-import-layout {
    background: #252525;
    padding: 10px;
    border-bottom: 1px solid #444;
}

.export-import-container {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.export-import-container .menu-button {
    font-size: 13px;
    padding: 6px 12px;
}

.layout-actions {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.layout-action-btn {
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.layout-action-btn:hover {
    background: #444;
}

.layout-action-btn.export {
    background: #1976D2;
}

.layout-action-btn.export:hover {
    background: #1565C0;
}

.layout-action-btn.delete {
    background: #d32f2f;
}

.layout-action-btn.delete:hover {
    background: #b71c1c;
}

/* Estilos para o sistema de arrastar e soltar */
.stream-wrapper {
    cursor: move;
    position: relative;
    transition: border 0.3s ease, background-color 0.3s ease;
    border: 2px solid transparent;
}

.stream-wrapper .stream,
.stream-wrapper .stream-controls,
.stream-wrapper iframe {
    cursor: default;
}

.stream-wrapper.being-dragged {
    opacity: 0.3;
    border: 2px dashed #666;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

.stream-wrapper.drag-over {
    border: 2px dashed #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.dragging-clone {
    pointer-events: none;
    cursor: grabbing;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #3498db;
    z-index: 9999;
}

.direction-controls {
    position: absolute;
    bottom: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 150;
}

.direction-btn {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.direction-btn:hover {
    background: rgba(33, 150, 243, 0.9);
}

/* Estilos para o modal de chat */
.chat-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 450px; /* Largura mínima padrão */
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 900;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
}

.chat-modal.open {
    transform: translateX(0);
}

.chat-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    cursor: ew-resize;
    z-index: 901;
}

.chat-header {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    position: relative;
    z-index: 20;
}

.chat-title {
    font-weight: bold;
    color: #2196F3;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-expand-btn {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.chat-expand-btn:hover {
    color: #2196F3;
}

.chat-close {
    cursor: pointer;
    color: #aaa;
    font-size: 18px;
    transition: color 0.3s ease;
}

.chat-close:hover {
    color: #2196F3;
}

.chat-tabs-container {
    position: relative;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid #333;
    overflow: hidden;
}

.chat-tabs {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 10;
    max-width: calc(100% - 20px);
    overflow-x: auto;
    background: transparent;
    padding-bottom: 5px;
}

.chat-tabs:hover {
    opacity: 1;
}

.chat-tabs.has-active {
    opacity: 1;
}

.chat-tab {
    padding: 5px 10px;
    background: rgba(33, 150, 243, 0.2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.chat-tab:hover {
    background: rgba(33, 150, 243, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.chat-tab.active {
    background: rgba(33, 150, 243, 0.7);
    font-weight: bold;
    border-color: rgba(255, 255, 255, 0.5);
}

.chat-tab.active:hover {
    background: rgba(33, 150, 243, 1);
}

/* Estilos para o sistema de abas colapsáveis */
.chat-tabs.expanded {
    opacity: 1;
    max-width: 100%;
    overflow-x: auto;
    padding-right: 10px;
}

.chat-tabs.expanded .chat-tab {
    max-width: 150px;
}

.chat-tabs.collapsed .chat-tab:not(.active) {
    max-width: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.chat-tabs.collapsed .chat-tab.active {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.chat-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.chat-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

.chat-iframe.active {
    display: block;
}

body.chat-open #wrapper {
    margin-right: 450px;
    transition: margin-right 0.3s ease;
}

.resizing-chat {
    user-select: none;
    pointer-events: none;
}

.stream-wrapper.is-live .viewer-overlay {
    background-color: rgba(255, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stream-wrapper.is-live .viewer-overlay i {
    color: white;
}

.stream-wrapper.was-live .viewer-overlay {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stream-wrapper.was-live .viewer-overlay i {
    color: #FF9800;
}

.stream-wrapper.player-error {
    background-color: rgba(0, 0, 0, 0.8);
}

.stream-wrapper.player-error .channel-overlay {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    font-weight: bold;
}

/* Ajustes para responsividade em telas menores */
@media (max-width: 768px) {
    .chat-modal {
        width: 320px;
    }
    
    body.chat-open #wrapper {
        margin-right: 320px;
    }
}

@media (max-width: 480px) {
    .chat-modal {
        width: 100%;
    }
    
    body.chat-open #wrapper {
        margin-right: 0;
        width: 100%;
        display: none;
    }
}

#streams.resizing .stream-wrapper {
    transition: none !important;
}

#streams.resizing {
    transition: none !important;
}

/* Estilos para o modo de visualização focada */
.stream-wrapper.focused {
    z-index: 20;
    transform: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.5);
    border: 2px solid #2196F3;
}

.stream-wrapper.unfocused {
    opacity: 0.8;
    transform: none !important;
    transition: all 0.3s ease;
}

.stream-wrapper.unfocused:hover {
    opacity: 1;
    z-index: 15;
}

#unfocused-container {
    display: grid;
    gap: 8px;
    height: 100%;
}

/* Ajusta o botão de foco quando está ativo */
.stream-wrapper.focused .focus-stream {
    background: rgba(33, 150, 243, 0.8);
    color: white;
}

/* Ajustes para responsividade no modo de foco */
@media (max-width: 768px) {
    #streams {
        grid-template-columns: 1fr !important;
    }
    
    .stream-wrapper.focused {
        width: 100% !important;
    }
    
    #unfocused-container {
        width: 100%;
    }
}

/* Estilos para o formulário de salvar layout */
#save-layout-form {
  margin-top: 15px;
  padding: 15px;
  background: rgba(33, 150, 243, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#layout-name {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  border-radius: 4px;
}

#confirm-save-btn {
  min-width: 100px;
}

/* Modal de layout */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal.show {
  display: block;
}

.modal-content {
  background-color: #1a1a1a;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 5px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: #fff;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.button-group .menu-button {
  flex: 1;
  min-width: 120px;
}

#saved-layouts-dropdown {
  margin-top: 15px;
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.saved-layout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #333;
}

.saved-layout-item:last-child {
  border-bottom: none;
}

.saved-layout-item .layout-name {
  flex: 1;
  cursor: pointer;
}

.saved-layout-item .layout-name:hover {
  color: #2196F3;
}

.saved-layout-item .delete-layout {
  color: #ff5252;
  cursor: pointer;
  margin-left: 10px;
}

.saved-layout-item .delete-layout:hover {
  color: #ff8080;
}

/* Estilos para importação de arquivos */
#layout-file-container {
  margin-top: 20px;
  padding: 15px;
  background: rgba(33, 150, 243, 0.05);
  border-radius: 4px;
}

.file-import-box {
  padding: 20px;
  border: 2px dashed #444;
  border-radius: 5px;
  text-align: center;
  margin-bottom: 20px;
  background: rgba(33, 150, 243, 0.05);
  transition: all 0.3s ease;
}

.file-import-box:hover {
  border-color: #2196F3;
  background: rgba(33, 150, 243, 0.1);
}

.file-import-box p {
  margin-bottom: 15px;
  color: #ccc;
  font-size: 16px;
}

.file-import-box i {
  font-size: 24px;
  color: #2196F3;
  margin-right: 10px;
}

.file-import-box input[type="file"] {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: block;
  color: #ccc;
}

.alternative-import {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.alternative-import h3 {
  color: #2196F3;
  margin-bottom: 15px;
  font-size: 16px;
  border-top: 1px solid #333;
  padding-top: 15px;
}

.alternative-import p {
  margin-bottom: 10px;
  color: #aaa;
}

.alternative-import textarea {
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px;
  resize: vertical;
  margin-bottom: 10px;
  display: block;
  width: 100%;
  min-height: 100px;
}

.alternative-import button {
  margin-top: 10px;
  display: block;
  width: 100%;
  max-width: 200px;
  background-color: #2196F3;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.alternative-import button:hover {
  background-color: #0d8aee;
}

.layout-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.layout-buttons button {
  flex: 1;
  min-width: 180px;
  padding: 10px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layout-buttons button i {
  margin-right: 8px;
}

.layout-buttons button:hover {
  background-color: #0d8aee;
}

#load-autosave-btn {
  background-color: #4CAF50;
  min-width: 120px;
}

#load-autosave-btn:hover {
  background-color: #3e8e41;
}

/* Estilos para o contador de espectadores */
.viewers-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.total-viewers-overlay {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    width: auto;
    min-width: unset;
    max-width: unset;
}

.total-viewers-overlay i {
    color: #ffffff;
    font-size: 14px;
}

/* Estilos para o toast de mensagens */
#toast-container {
    position: fixed;
    top: 70px;
    left: 20px;
    z-index: 9999;
    max-width: 350px;
    transition: left 0.3s ease;
}

/* Ajuste do toast quando o menu lateral está aberto */
body.sidebar-open #toast-container {
    left: 270px; /* Ajuste baseado na largura do menu lateral */
}

.toast {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    padding: 0;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    display: none;
    overflow: hidden;
    max-width: 100%;
    word-wrap: break-word;
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    font-weight: bold;
}

.toast-body {
    padding: 12px;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.toast-close:hover {
    color: #f1f1f1;
}

/* Responsividade para o toast */
@media screen and (max-width: 768px) {
    #toast-container {
        top: 60px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
    
    .toast {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    #toast-container {
        top: 50px;
    }
    
    .toast-header {
        padding: 6px 10px;
    }
    
    .toast-body {
        padding: 10px;
        font-size: 14px;
    }
}

/* Para dispositivos muito pequenos */
@media screen and (max-width: 320px) {
    #toast-container {
        top: 40px;
        left: 5px;
        right: 5px;
        max-width: calc(100% - 10px);
    }
}

/* Estilos para o sistema de notificações em camada */
.notification-layer {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 12px 20px;
    color: white;
    font-weight: 500;
    text-align: center;
    z-index: 9999;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    width: auto;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.6);
}

.notification-layer.show {
    transform: translateX(-50%) translateY(0);
}

.notification-layer.success {
    background-color: rgba(46, 204, 113, 0.6);
}

.notification-layer.error {
    background-color: rgba(231, 76, 60, 0.6);
}

.notification-layer.warning {
    background-color: rgba(241, 196, 15, 0.6);
}

.notification-layer.info {
    background-color: rgba(52, 152, 219, 0.6);
}

/* Responsividade para o sistema de notificações */
@media screen and (max-width: 768px) {
    .notification-layer {
        top: 60px;
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .notification-layer {
        top: 50px;
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* Estilos responsivos para o dropdown de layouts */
@media screen and (max-width: 768px) {
    #saved-layouts-dropdown {
        width: 80%;
        max-width: 300px;
    }
}

@media screen and (max-width: 480px) {
    #saved-layouts-dropdown {
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
}

.stream-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
}

.stream-form input[type="text"] {
  padding: 10px 15px;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #333;
  color: white;
  font-size: 15px;
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  flex: 1;
  min-width: 500px;
}

.stream-form input[type="text"]:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3);
}

#clipboard-monitor-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #2196F3;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: help;
}

#clipboard-monitor-indicator.active {
  opacity: 1;
}

#clipboard-monitor-indicator:hover {
  color: #64B5F6;
}

/* Estilos para o menu superior */
.top-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.stream-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 1200px;
}

.stream-form input[type="text"] {
    flex: 1;
    max-width: 500px;
}

.menu-button, .settings-button {
    white-space: nowrap;
}

/* Seletor de idioma */
.language-selector {
    margin-left: 10px;
}

.language-selector select {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background-color: #444;
    border-color: #2196F3;
}

.language-selector select:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3);
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.language-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.language-options input[type="radio"] {
    margin-right: 8px;
}

/* Notificação */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2196F3;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para os botões de ação nos layouts salvos */
#saved-layouts-list {
    margin-top: 15px;
}

.saved-layout-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 5px;
    background-color: #2a2a2a;
    cursor: pointer;
    transition: background-color 0.2s;
}

.saved-layout-item:hover {
    background-color: #3a3a3a;
}

.layout-name {
    flex-grow: 1;
    font-size: 14px;
}

.load-layout, .delete-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-layout {
    background-color: #28a745;
    color: white;
}

.load-layout:hover {
    background-color: #218838;
}

.delete-layout {
    background-color: #dc3545;
    color: white;
}

.delete-layout:hover {
    background-color: #c82333;
}

.no-layouts {
    padding: 10px;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Estilos específicos para a lista de layouts no modal */
#saved-layouts-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background-color: #222;
    border-radius: 5px;
}

#saved-layouts-list .saved-layout-item {
    margin-bottom: 8px;
    padding: 10px;
    background-color: #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

#saved-layouts-list .layout-name {
    flex-grow: 1;
    font-size: 14px;
    color: #fff;
}

#saved-layouts-list .load-layout,
#saved-layouts-list .delete-layout {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#saved-layouts-list .load-layout {
    background-color: #28a745;
    color: white;
}

#saved-layouts-list .load-layout:hover {
    background-color: #218838;
}

#saved-layouts-list .delete-layout {
    background-color: #dc3545;
    color: white;
}

#saved-layouts-list .delete-layout:hover {
    background-color: #c82333;
}

#saved-layouts-container h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #fff;
    font-size: 16px;
}

/* Estilos para opções de rotatividade de áudio */
.audio-rotation-options {
  margin-top: 10px;
  padding-left: 25px;
}

.rotation-interval-container {
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.rotation-interval-container input[type="number"] {
  width: 60px;
  margin: 0 10px;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: #333;
  color: #fff;
}

/* Indicador de áudio ativo */
.audio-active-indicator {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 0;
  bottom: 0;
  border: 3px solid transparent;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
  display: none;
}

.audio-active-indicator.active {
  display: block;
  border-color: #2196F3;
  box-shadow: 0 0 10px #2196F3, 0 0 15px rgba(33, 150, 243, 0.5);
  animation: glow-pulse 1.5s infinite;
}

@keyframes glow-pulse {
  0% {
    box-shadow: 0 0 5px #2196F3, 0 0 10px rgba(33, 150, 243, 0.5);
  }
  50% {
    box-shadow: 0 0 10px #2196F3, 0 0 20px rgba(33, 150, 243, 0.7);
  }
  100% {
    box-shadow: 0 0 5px #2196F3, 0 0 10px rgba(33, 150, 243, 0.5);
  }
}