:root {
    --bg-color: #1e1e1e;
    --text-color: #d4d4d4;
    --primary-color: #0e639c;
    --secondary-color: #3a3d41;
    --border-color: #4a4a4a;
    --input-bg: #2a2d31;
    --success-color: #4CAF50;
    --error-color: #F44336;
}

/* Die gesamte Scrollbar */
::-webkit-scrollbar {
  width: 12px; /* Breite der Scrollbar */
}

/* Der "Track" (Hintergrund) */
::-webkit-scrollbar-track {
  background: #3e3e3e;
  border-radius: 6px;
}

/* Der "Thumb" (Schieberegler) */
::-webkit-scrollbar-thumb {
  background: #1e1e1e;
  border-radius: 6px;
}

/* Beim Hover */
::-webkit-scrollbar-thumb:hover {
  background: #1e1e1e;
}

body {
  background-color: #3e3e3e;
  color: white;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

input:focus {
  outline: none;
}

.header {
  height: 60px;
  background-color: #2c2c2c;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 18px;
  font-weight: bold;
  border-bottom: 1px solid #444;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.header .logo {
  height: 28px;
  margin-right: 10px;
}

.serial-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.serial-controls select,
.serial-controls button, 
#connectBtn {
    background-color: #3a3d41;
    color: #d4d4d4;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 14px;
}

.serial-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.serial-controls button {
    cursor: pointer;
}

main {
  margin-left: 200px;
  margin-top: 60px;
  padding: 20px;
}

.sidenav {
  width: 200px;
  height: 100vh;
  background-color: #2c2c2c;
  display: flex;
  flex-direction: column;
  padding-top: 70px;
  position: fixed;
  top: 0;
}

.sidenav .item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #ccc;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  border-left: 4px solid transparent;
}

.sidenav .item:hover {
  background-color: #3a3a3a;
  color: #fff;
}

.sidenav .item.active {
  background-color: #ffc107;
  color: #000;
  font-weight: bold;
  border-left: 4px solid #fff;
}

.sidenav .item i {
  margin-right: 10px;
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.channel {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  background-color: #222;
  padding: 4px;
  width: 700px;
}

.label {
  width: 100px;
  font-weight: bold;
  color: #ccc;
}

.bar-container {
  flex-grow: 1;
  background-color: #444;
  height: 20px;
  margin: 0 10px;
  position: relative;
  overflow: hidden;
}

.bar {
  height: 100%;
  transition: width 0.2s ease;
}

.value {
  width: 50px;
  text-align: right;
}

.settings-reciver-channel-map {
  margin-left: 47%;
  position: absolute;
}

.channel-map {
  background-color: #f2b809;
  text-align: center;
  padding: 0px 240px;
  border-radius: 3px;
}

.channel-map-input {
  background-color: transparent;
  color: #fff;
  border: 1px solid white;
  border-radius: 5px;
  width: 100%;
}

.channel-map-input-div {
  margin-top: -3%;
  background-color: #2c2c2c;
  padding: 10px 0px;
}

.settings-reciver-stick-low-threshold {
  position: absolute;
  margin-left: 47%;
  margin-top: 6%;
}

.stick-low-threshold, .stick-center, .stick-high-threshold {
  background-color: #f2b809;
  text-align: center;
  padding: 0px 20px;
  border-radius: 3px;
}

.settings-reciver-stick-center {
  position: absolute;
  margin-left: 59.5%;
  margin-top: 6%;
}

.settings-reciver-stick-high-threshold {
  position: absolute;
  margin-left: 72%;
  margin-top: 6%;
}

.refresh-btn, .save-btn {
  position: absolute;
  margin-top: 40%;
  margin-left: 75%;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
}

.save-btn {
  margin-left: 80%;
}

button:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.stick-low-threshold-input-div, .stick-center-input-div, .stick-high-threshold-map-input-div {
  margin-top: -8%;
  background-color: #2c2c2c;
  padding: 10px 0px;
}

:root{
      --gap: 10px;
      --accent: #0b6efd;
      --card: #ffffff;
      --muted: #666;
      --mono: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    }
    .container{
      max-width:1200px; margin:22px auto; padding:18px;
    }
    .card{
      background:var(--card); border-radius:8px; box-shadow:0 2px 8px rgba(235, 235, 236, 0.344); padding:14px;
    }
    header { margin-bottom:12px; }
    .row{display:flex; gap:var(--gap); align-items:center; flex-wrap:wrap;}
    .col{flex:1;}
    label{display:block; font-size:13px; color:var(--muted); margin-bottom:6px;}
    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: auto; margin: 0; }
    textarea{min-height:70px; resize:vertical;}
    .top-controls{display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap;}
    .table-wrap{margin-top:12px; overflow:auto;}
    table{width:100%; border-collapse:collapse; min-width:980px;}
    th, td{padding:8px 10px; border-bottom:1px solid #eef1f4; text-align:left; vertical-align:middle; font-size:13px;}
    th{background:#333; font-weight:600; color:#fff; position:sticky; top:0; z-index:2;}
    .readonly{color:#222; font-weight:600;}
    .small{width:84px;}
    .tiny{width:60px;}
    .center{text-align:center;}
    .subtrim-wrap{display:flex; gap:8px; align-items:center;}
    .subtrim-wrap input[type="range"]{flex:1;}
    .units{font-size:12px; color:var(--muted); margin-left:6px;}
    .controls{display:flex; gap:8px; margin-left:auto;}
    button{padding:8px 10px; border-radius:6px; border:1px solid #c7d1e8; cursor:pointer; font-size:13px;}
    button.primary{color:#fff; border-color:transparent;}
    .footer-actions{display:flex; gap:8px; margin-top:12px;}
    .note{font-size:12px; color:var(--muted); margin-top:6px;}
    .error{color:#a00; font-size:12px;}
    @media (max-width:900px){
      .small{width:110px;}
      .tiny{width:80px;}
      table{min-width:900px;}
    }

.apply-btn {
  position: absolute;
  margin-left: 66%;
  margin-top: 37.5%;
}

#connect:focus {
  outline: none;
}

.connect-btn {
  font-size: 1.25rem;
  position: absolute;
  margin-left: 93%;
}

.apply-btn-channel-mixer {
  position: absolute;
  margin-left: 79%;
  margin-top: 8.5%;
}

.row-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.row-progress-container label {
    flex: 0 0 50px;
    text-align: right;
    font-size: 0.9em;
    color: #ccc;
}

.progress-bar-container {
    flex-grow: 1;
    height: 13px;
    background-color: #333;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 50%;
    background-color: #007bff;
    transition: width 0.1s linear;
}

.progress-bar-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

#channelsTable {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    font-size: 14px;
}

#channelsTable td, #channelsTable th {
    vertical-align: middle;
    padding: 6px;
    text-align: left;
}

#channelsTable th {
    font-weight: bold;
    background-color: transparent;
    border-bottom: 1px solid #666;
}

.col-delete       { width: 4%; }
.col-output       { width: 6%; padding-left: 10px; }
.col-pin          { width: 13%; }
.col-channel      { width: 8%; }
.col-checkbox     { width: 6%; text-align: center; }
.col-subtrim      { width: 25%; }
.col-subtrim-mode { width: 10%; }
.col-minmax       { width: 9%; }

#channelsTable input[type="number"],
#channelsTable select {
    width: 100%;
    padding: 4px;
    box-sizing: border-box;
    font-size: inherit;
}

#channelsTable td .center {
    display: block;
    margin: 0 auto;
    width: 16px;
    height: 16px;
    transform: scale(0.9);
}

.subtrim-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtrim-container input[type="number"] {
    width: 55px;
    flex-shrink: 0;
}

.subtrim-container input[type="range"] {
    flex-grow: 1;
    width: auto;
    min-width: 0;
}

#channelsTable td {
    border-bottom: none;
}
#channelsTable tr:nth-child(3n) td {
    border-bottom: 2px solid #555; 
}

.delete-btn {
    background: transparent;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    line-height: 1;
}

.delete-btn:hover {
    color: #e03131;
}

.btn-fixed {
    background-color: rgb(59, 61, 65) !important;
    color: #D4D4CB !important;
    border-color: #1e1e1e !important;
}

.donatebtn input[type="image"] {
  width: 150px; /* Größe anpassen */
  height: auto;
  margin-left: 43%;
}

.aetr-modi {
  margin-left: 32%;
  padding: 0px 60px;
}

.output-area-container {
  width: 100%;
}

#exit {
  margin-top: 54.4vh;
  background-color: rgb(213, 0, 0);
}

#exit:hover {
  background-color: rgb(255, 0, 0);
}