body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
}


/* shared style for navigation buttons */
.nav-btn {
  background: #1f222b;
  color: #e0e0e0;
  border: none;
  padding: 6px 14px;
  border-radius: 18px;
  cursor: pointer;
  margin-right: 10px;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px #2a2d38;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.nav-btn:hover {
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.7));
  transform: translateY(-1px);
}

/* Disabled state for nav and other buttons */
.nav-btn:disabled,
button:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
  transform: none;
}

    .container {
      padding: 20px;
      position: relative;
    }
    .header {
      display: flex;
      align-items: center;
      margin-bottom: 20px;
      flex-wrap: wrap;
      /* Increase spacing between logo, title and channel to avoid overlaps */
      gap: 20px;
    }
  .logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    /* Add a glowing circular frame around the logo */
    box-shadow: 0 0 8px rgba(252, 92, 125, 0.6), 0 0 12px rgba(106, 130, 251, 0.6);
    /* Offset the logo further down to provide breathing room */
    margin-top: 20px;
  }
    .info {
      margin-left: 20px;
    }
    .info h1 {
      margin: 0;
      color: #ffffff;
      font-weight: 300;
      letter-spacing: 0.5px;
    }
    .info p {
      margin: 2px 0;
      color: #b0b0b0;
      font-size: 14px;
    }

    /* Adjust the UI version label spacing */
    #ui-version {
      margin-top: 6px;
    }
    .channel {
      margin-left: auto;
      text-align: right;
      color: #888888;
      font-size: 12px;
    }
    .file-upload {
      margin-bottom: 20px;
    }
    .file-upload input {
      padding: 4px;
      background-color: #1e1e1e;
      color: #e0e0e0;
      border: 1px solid #333;
      border-radius: 4px;
      width: 100%;
    }
    .edit-labels {
      margin-bottom: 20px;
    }
    .edit-labels input {
      padding: 4px;
      background-color: #1e1e1e;
      color: #e0e0e0;
      border: 1px solid #333;
      border-radius: 4px;
    }

.edit-labels select {
  background-color: #262626;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 2px 4px;
  margin-right: 6px;
}
    #vs-panel {
      position: absolute;
      top: 60px;
      right: 20px;
      background-color: #1e1e1e;
      border: 1px solid #333;
      padding: 15px;
      border-radius: 8px;
    display: none;
      z-index: 1000;
      pointer-events: none;
      color: #e0e0e0;
    }
    #vs-panel select {
      width: 100%;
      margin-bottom: 10px;
      padding: 4px;
      background-color: #262626;
      border: 1px solid #444;
      color: #e0e0e0;
      border-radius: 4px;
    }
    #vs-panel button {
      padding: 6px 10px;
      margin-right: 10px;
      background-color: #333;
      color: #e0e0e0;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    #settings-panel {
      position: absolute;
      top: 60px;
      right: 20px;
      background-color: #1e1e1e;
      border: 1px solid #333;
      padding: 15px;
      border-radius: 8px;
      display: none;
      z-index: 1000;
    }
    #settings-panel label {
      display: block;
      margin-bottom: 6px;
      font-size: 14px;
      color: #e0e0e0;
    }
    #settings-panel input,
    #settings-panel select {
      width: 100%;
      margin-bottom: 10px;
      padding: 4px;
      background-color: #262626;
      border: 1px solid #444;
      color: #e0e0e0;
      border-radius: 4px;
    }
    #settings-panel button {
      padding: 6px 10px;
      margin-right: 10px;
      background-color: #333;
      color: #e0e0e0;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    .graph-control {
      margin-bottom: 5px;
      color: #e0e0e0;
    }
    .graph-control label {
      font-size: 12px;
      margin-right: 10px;
    }
    .graph-control select {
      background-color: #1e1e1e;
      color: #e0e0e0;
      border: 1px solid #333;
      border-radius: 4px;
      padding: 2px 4px;
    }
      .bigpicture-btn {
        position:absolute;
        top:4px;
        right:4px;
        z-index:50;
        background-color:rgba(0,0,0,0.6);
        color:#fff;
        border:none;
        border-radius:3px;
        padding:2px 6px;
        font-size:14px;
        cursor:pointer;
        display:none;
      }
/* Graph containers need a height so Plotly charts render correctly. Without an explicit height, they collapse to zero height and only the legend appears. Set a reasonable default height and ensure inner graph divs fill the container. */
.graph-container {
  position: relative;
  width: 100%;
  height: 350px;
  margin-top: 20px;
}

/* Ensure the inner graph div takes the full size of its parent container */
.graph-container .graph {
  width: 100%;
  height: 100%;
}


/* unify latency button styling with general navigation buttons */
#latency-button {
  background: #1f222b;
  color: #e0e0e0;
  border: none;
  padding: 5px 14px;
  border-radius: 18px;
  cursor: pointer;
  margin-right: 12px;
  font-size: 14px;
  box-shadow: 0 0 4px rgba(252, 92, 125, 0.2), 0 0 4px rgba(106, 130, 251, 0.2);
  transition: background 0.3s, box-shadow 0.3s, color 0.3s;
}

#latency-button:hover {
  background: linear-gradient(135deg, #fc5c7d, #6a82fb);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(252, 92, 125, 0.6), 0 0 10px rgba(106, 130, 251, 0.6);
}

    #latency-page {
      display: none;
      padding: 20px;
      background-color: #121212;
      color: #e0e0e0;
      font-family: 'Segoe UI', sans-serif;
    }

    #latency-page h2 {
      margin-top: 0;
    }

    #latency-list {
      max-height: 300px;
      overflow-y: auto;
      border: 1px solid #333;
      border-radius: 4px;
      padding: 4px;
    }

    #latency-list div {
      padding: 4px;
      border-bottom: 1px solid #222;
    }

    #latency-list span.editable-label {
      text-decoration: underline;
      color: #6fa8dc;
      cursor: text;
    }

    #latency-graph {
      width: 100%;
      height: 500px;
    }

    #latency-controls {
      margin-bottom: 10px;
    }

    #latency-bottom-text {
      text-align: center;
      margin-top: 10px;
    }
