body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.container {
    display: grid;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
}

.header h1 {
    margin: 0;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.nav-link {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-link:hover {
    background-color: #218838;
}

#logout-form button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
}

#logout-form button:hover {
    background-color: #c82333;
}

.main-content {
    display: flex;
    margin-top: 20px;
}

.left-side, .right-side {
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.left-side {
    flex: 1;
    max-width: 300px;
    margin-right: 20px;
}

.right-side {
    flex: 2;
    background-color: #d3d3d3;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-top: 10px;
}

input, button, select {
    padding: 10px;
    margin-top: 5px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

input[type="file"] {
    padding: 0;
}

button:hover, select:hover, input[type="file"]:hover {
    background-color: #0056b3;
}

h1, h2, h3 {
    margin: 0;
}

#search-channel {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    color: #222;
    background: #fff;
}

.channel-list-container {
    display: flex;
    flex-wrap: wrap;
}

#channel-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==========================
   MELHORIAS VISUAIS DAS LINHAS
   ========================== */
#channel-list li {
    flex: 1 1 calc(50% - 20px);
    margin: 10px;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    gap: 8px;
    transition: background 0.2s;
    box-sizing: border-box;
}
#channel-list li:nth-child(even) {
    background: #e7f0ff;
}
#channel-list li:hover {
    background: #d6e8ff;
}

/* Alinhar melhor o logo do canal */
#channel-list li img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

/* Inputs nas linhas */
#channel-list li input[type="text"] {
    margin-right: 8px;
    border-radius: 3px;
    border: 1px solid #bbb;
    padding: 3px 6px;
    font-size: 16px;
    min-width: 120px;
    color: #222;
    background: #fff;
}

/* Botões na linha */
#channel-list button {
    margin-left: 3px;
    padding: 6px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, color 0.2s;
}

#channel-list button[onclick*="moveChannelUp"],
#channel-list button[onclick*="moveChannelDown"] {
    background: #e0e0e0;
    color: #222;
}
#channel-list button[onclick*="moveChannelUp"]:hover,
#channel-list button[onclick*="moveChannelDown"]:hover {
    background: #bababa;
}

#channel-list button[onclick*="removeChannel"] {
    background: #f66;
    color: #fff;
}
#channel-list button[onclick*="removeChannel"]:hover {
    background: #d22;
}

#channel-list button[onclick*="openPlayer"] {
    background: #3a7;
    color: #fff;
}
#channel-list button[onclick*="openPlayer"]:hover {
    background: #276;
}

/* Fim dos estilos de linha */

pre {
    background: #eaeaea;
    padding: 10px;
    overflow-x: auto;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 90px;
    border-radius: 5px;
    color: #222;
}

/* Estilos para a div player */
#player {
    position: fixed;
    top: 50%;
    left: 50%;
    background-color: black;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#player button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1100;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

#player button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

#video {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.channel-number {
    font-weight: bold;
    margin-right: 12px;
    color: #007bff;
    min-width: 24px;
    text-align: right;
    display: inline-block;
}