body {
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: white;
  font-family: Arial, sans-serif;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 0.9em;
  overflow-x: hidden;
}

.hub-container {
  max-width: 1200px;
  width: 95%;
  margin: 20px auto;
  padding: 15px;
  background-color: #1e1e1e;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

h1 {
  color: #ff6b6b;
  text-align: center;
  margin-bottom: 15px;
  font-size: 2em;
}

h2 {
  color: #ffcc5c;
  text-align: center;
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 1.8em;
}

.stream-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.stream-table th, .stream-table td {
  border: 1px solid #333;
  padding: 8px 10px;
  text-align: left;
}

.stream-table th {
  background-color: #2a2a2a;
  color: #ccc;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}

.stream-table tr:nth-child(even) {
  background-color: #252525;
}

.stream-table tr:hover {
  background-color: #3a3a3a;
}

.channel-cell {
    display: flex;
    align-items: center;
}

.channel-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.channel-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #6ba8ff;
    font-weight: bold;
}

.stream-title, .stream-views, .stream-time {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.stream-link a {
  color: #ffcc5c;
  text-decoration: none;
  font-weight: bold;
  word-break: break-all;
}

.stream-link a:hover {
  text-decoration: underline;
}

.no-streams {
  text-align: center;
  padding: 15px;
  font-size: 1em;
  color: #aaa;
  border: 1px solid #333;
  background-color: #2a2a2a;
  margin-bottom: 20px;
}

.last-updated {
  text-align: right;
  font-size: 0.75em;
  color: #aaa;
  margin-top: 15px;
}

.back-link {
    margin-top: 20px;
    font-size: 0.9em;
    text-align: center;
    display: block;
    color: #ffcc5c;
    text-decoration: none;
}

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

/* New styles for DSN channels and tooltips */
.dsn-channel {
  border-left: 5px solid #ff0000; /* Red border on the left */
  position: relative; /* Make the row relative for tooltip positioning */
}

/* Tooltip for the dsn-channel row */
.dsn-channel[data-tooltip]:hover::after {
  content: attr(data-tooltip); /* Get tooltip text from data-tooltip attribute */
  position: absolute;
  /* Position next to the red border (5px border + a little padding) */
  right: -20px; /* Starts right after the 5px border */
  top: 5px;
  transform: translateY(-50%); /* Vertically center it */
  background-color: #ff0000; /* Red background */
  color: yellow; /* Yellow text */
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10; /* Ensure tooltip is above other elements */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dsn-channel[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  .hub-container {
    margin: 5px;
    padding: 8px;
    width: calc(100% - 10px);
  }

  h1 {
    font-size: 1.5em;
    margin-bottom: 10px;
  }

  h2 {
    font-size: 1.3em;
    margin-top: 15px;
    margin-bottom: 10px;
  }

  .stream-table, .stream-table thead, .stream-table tbody,
  .stream-table th, .stream-table td, .stream-table tr {
    display: block;
    width: 100%;
  }

  .stream-table {
    border: none;
  }

  .stream-table thead {
    display: none;
  }

  .stream-table tr {
    margin-bottom: 8px;
    border: 1px solid #333;
    border-radius: 6px;
    background-color: #252525;
    padding: 6px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .stream-table tr:nth-child(even) {
    background-color: #2a2a2a;
  }

  .stream-table td {
    border: none;
    padding: 3px 0;
    position: relative;
    text-align: left;
    white-space: normal;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    font-size: 0.85em;
  }

  /* Hide the "before" pseudo-element for all cells by default */
  .stream-table td:before {
    display: none;
  }

  .channel-info-cell {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    padding-left: 0;
    position: relative; /* Needed for absolute positioning of the button */
    justify-content: space-between; /* Keep space for potential views */
  }

  .channel-details {
    display: flex;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
  }

  .channel-img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .channel-name {
    margin-left: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-views {
    margin-left: auto;
    padding-left: 8px;
    color: #aaa;
    font-size: 0.8em;
    flex-shrink: 0;
  }

  .mobile-play-button {
    display: inline-block;
    padding: 3px 8px;
    background-color: #3a3a3a;
    border-radius: 4px;
    min-width: 24px;
    text-align: center;
    font-size: 0.85em;
    color: #ffcc5c;
    text-decoration: none;
    /* Absolute positioning */
    position: absolute;
    top: 0;
    right: 0;
    margin-top: 0;
    margin-right: 0;
  }

  .mobile-play-button:hover {
    text-decoration: underline;
  }

  .mobile-title-cell {
    padding-left: 0;
  }

  .stream-title, .stream-time {
    white-space: normal;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
  }

  .dsn-channel[data-tooltip]:hover::after {
    position:absolute;
    left: 0px;
 /* Center horizontally */
    transform: translate(-50%, calc(-100% - 5px)); /* Move above the element */
    top: 0; /* Align to the top of the row */
  }
}

@media (max-width: 480px) {
  /* Further adjustments for smaller screens if necessary */
}