body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    display: flex;
    height: 100vh; /* Ensure body occupies full height */
    flex-direction: column; /* Adjust flex direction to column */
}

#menu {
    width: 200px;
    background-color: #1e1e1e;
    padding: 20px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

#menu button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #1046b3; /* Updated color */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#menu button:hover {
    background-color: #1e2f8a; /* Updated color */
}

#content {
    margin-left: 220px;
    padding: 20px;
    width: calc(100% - 260px); /* Adjust width to add more padding on the right */
    flex: 1; /* Make content fill the available space */
    margin-right: 40px; /* Increase right margin */
}

#logout-button {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 10px 20px;
    background-color: #1046b3; /* Updated color */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#logout-button:hover {
    background-color: #1e2f8a; /* Updated color */
}

input, select, button {
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
}

input::placeholder, select::placeholder {
    color: #bbb;
}

/* Tabele */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th, table td {
    border: 1px solid #444;
    padding: 10px;
    text-align: left;
}

table th {
    background-color: #333;
    color: #fff;
}

table td button {
    margin-right: 5px;
    padding: 5px 10px;
    background-color: #1046b3; /* Updated color */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

table td button:hover {
    background-color: #1e2f8a; /* Updated color */
}

/* Formulare */
#user-form, #server-form {
    margin: 20px 0;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
}

#user-form h3, #server-form h3 {
    margin-bottom: 15px;
    color: #fff;
}

#user-form input, #server-form input, #user-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
}

#user-form button, #server-form button {
    padding: 10px 20px;
    margin-right: 10px;
    background-color: #1046b3; /* Updated color */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#user-form button:hover, #server-form button:hover {
    background-color: #1e2f8a; /* Updated color */
}

#tabs-container {
    display: flex;
    border-bottom: 1px solid #444;
    width: 100%; /* Ensure tabs container occupies full width */
    flex-wrap: wrap; /* Allow tabs to wrap if they exceed the width */
}

.tab {
    padding: 10px 20px;
    background-color: #2a2a2a;
    color: #fff;
    cursor: pointer;
    border: 1px solid #444;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
}

.tab.active {
    background-color: #2a44bd; /* Updated color */
}

.tab.description {
    padding: 10px 20px;
    background-color: #2a2a2a;
    color: #fff;
    cursor: pointer;
    border: 1px solid #444;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
}

.tab.description.active {
    background-color: #2a44bd; /* Updated color */
}

#tabs-content {
    padding: 20px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 0 4px 4px 4px;
    width: calc(100% - 40px); /* Adjust width to add more padding on the right */
}

.object-box {
    border: 1px solid #444; /* Increase border thickness to 1px */
    border-radius: 8px;
    padding: 5px;
    width: 188px; /* Increase width to 188px */
    height: 60px;
    background-color: #2a2a2a;
    color: #999; /* Updated color */
    font-size: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2; /* Minimize space between lines */
    margin: 0; /* Remove margin */
    text-align: left; /* Ensure text is left-aligned */
}

.object-box.ok {
    border-color: #0ead3e; /* Green border for status 'ok' */
}

.object-box.warn {
    border-color: #bfcc06; /* Updated color for status 'warn' */
}

.object-box.active {
    border-color: #bd0000; /* Dark red border for status 'active' */
}

.object-box.network {
    /* Specific styles for network boxes */
}

.object-box.stream {
    position: relative; /* Ensure the bar is positioned relative to the box */
    /* Specific styles for stream boxes */
}

.stream-bar {
    position: absolute;
    right: 0;
    bottom: 0; /* Start from the bottom */
    width: 10px;
    border-radius: 0 7px 7px 0; /* Match border radius with object box */
    transition: height 0.5s, background-color 0.5s; /* Smooth transition for height and color change */
}

.stream-bar.low {
    background-color: #0ead3e; /* Green for low usage */
}

.stream-bar.medium-low {
    background-color: #a1cc06; /* Light green to yellow for medium-low usage */
}

.stream-bar.medium-high {
    background-color: #ffa500; /* Yellow to orange for medium-high usage */
}

.stream-bar.high {
    background-color: #ff4500; /* Orange to red for high usage */
}

.stream-bar.exceed {
    background-color: #ff0000; /* Red for exceeding bitrate */
    animation: blink 1s infinite; /* Blink animation for exceeding bitrate */
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

.object-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

h3 {
    font-size: 14px;
    margin-top: 20px;
    margin-bottom: 10px;
}

#networks-section, #streams-section {
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
    color: #bbb; /* Slightly lighter color than the background */
    position: relative;
}

.section-header::before,
.section-header::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #444; /* Slightly lighter color than the background */
    margin: 0 10px;
}

.status-box {
    width: calc(100% - 10px); /* Reduce width by 10px */
    padding: 10px;
    background-color: #2a2a2a;
    color: #bbb; /* Lighter gray color */
    border: 1px solid #444;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between; /* Align content to space between */
    font-size: 12px; /* Increase font size by 1 point */
}

.status-box select {
    margin-left: 10px; /* Add margin to the left of the select box */
    margin-right: 0; /* Align to the right */
}

.details-box {
    position: absolute;
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    z-index: 1000;
    max-width: 200px;
    word-wrap: break-word;
}

.tooltip-box {
    position: fixed;
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    z-index: 1000;
    width: 500px; /* Increase width to 500px */
    height: 600px; /* Increase height to 600px */
    overflow-y: auto;
    word-wrap: break-word;
    display: none; /* Initially hidden */
    font-size: 10px; /* Match font size with object box */
}

.tooltip-box.stream-tooltip-box {
    position: fixed;
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    z-index: 1000;
    width: 500px; /* Increase width to 500px */
    height: 600px; /* Increase height to 600px */
    overflow-y: auto;
    word-wrap: break-word;
    display: none; /* Initially hidden */
    font-size: 10px; /* Match font size with object box */
}

.tooltip-box.source-tooltip-box {
    position: fixed;
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    z-index: 1000;
    width: 500px; /* Increase width to 500px */
    height: 600px; /* Increase height to 600px */
    overflow-y: auto;
    word-wrap: break-word;
    display: none; /* Initially hidden */
    font-size: 10px; /* Match font size with object box */
}

.tooltip-box .close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background-color: #ff5f57; /* macOS close button color */
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    line-height: 1;
}

.tooltip-box .close-button:hover {
    background-color: #e5534b; /* Darker shade for hover effect */
}

#menu button, #logout-button, table td button, #user-form button, #server-form button {
    background-color: #1046b3; /* Updated color */
}

#menu button:hover, #logout-button:hover, table td button:hover, #user-form button:hover, #server-form button:hover {
    background-color: #1e2f8a; /* Updated color */
}

.save-button {
    background-color: #00679795; /* Darker green background */
    color: white; /* White text */
    border: 2px solid #484747; /* Even darker green border */
    padding: 6px 15px; /* Reduced padding */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Rounded corners */
    font-size: 14px; /* Font size */
    margin-left: 10px; /* Margin to the left */
}

.save-button:hover {
    background-color: #013d5995; /* Even darker green on hover */
}

.reset-button {
    background-color: #8B0000; /* Dark red background */
    color: white; /* White text */
    border: 2px solid #660000; /* Darker red border */
    padding: 6px 15px; /* Reduced padding */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Rounded corners */
    font-size: 14px; /* Font size */
    margin-left: 10px; /* Margin to the left */
}

.reset-button:hover {
    background-color: #660000; /* Even darker red on hover */
}

.apply-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #00679795; /* Darker green background */
    color: white; /* White text */
    border: 2px solid #484747; /* Even darker green border */
    padding: 6px 15px; /* Reduced padding */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Rounded corners */
    font-size: 14px; /* Font size */
}

.apply-button:hover {
    background-color: #013d5995; /* Even darker green on hover */
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.login-logo {
    width: 400px; /* Ensure the logo is displayed larger */
    margin-bottom: 20px;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #fff;
}

.login-container p {
    color: #bbb;
}

.login-field {
    margin-bottom: 15px;
    text-align: left;
}

.login-field label {
    display: block;
    margin-bottom: 5px;
    color: #bbb;
}

.login-field input {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #444; /* Ensure the background color is gray */
    color: #fff;
}

.login-button {
    width: 100%;
    padding: 10px;
    background-color: #1046b3;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-button:hover {
    background-color: #1e2f8a;
}

.error-message {
    color: red;
    margin-top: 10px;
}

.disclaimer {
    margin-top: 20px;
    font-size: 12px;
    color: #bbb;
}
