* {
  box-sizing: border-box;
  font-family: "IBM Plex Mono", monospace;
}

html,
body {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  padding: 0;
  margin: 0;
  font-size: 13px;
  background-color: #000;
}
.tv-logo {
  position: fixed;
  top: 8px;
  left: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.0rem;
  font-weight: bold;
  /* background-color: rgb(255 255 255); */
  padding: 2px 2px;
  border-radius: 5px;
  /* border: 2px solid; */
  z-index: 100;
  pointer-events: none;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Adds space between each control group */
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 10px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Space between the label and input/select */
  justify-content: space-between;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 1;
  display: block;
  opacity: 1;
  z-index: 14;
  display: block;
}

.opacity-slider {
  -webkit-appearance: none;
  /* Override default appearance */
  width: 50%;
  height: 10px;
  background: linear-gradient(to right, #d3d3d3 0%, #d3d3d3 100%);
  /* Default: all gray */
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.opacity-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px;
  cursor: pointer;
  background: transparent;
  /* Background handled by main slider track */
}

.opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: white;
  /* Dot (thumb) color */
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  top: -5px;
  /* Fix alignment with the slider track */
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
  /* Optional shadow for the dot */
}

.opacity-slider::-moz-range-track {
  background: transparent;
}

.opacity-slider::-moz-range-thumb {
  background: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
}



.static-noise {
  position: fixed;
  top: 0;
  left: 0px;
  width: 100vw;
  height: 100vh;
  opacity: 1;
  z-index: 15;
  display: block;
  background-size: 200px 200px;
  background-repeat: no-repeat;
  background-position: center; /* Position the background image in the top-right corner */
  background-color:#000;
}


.smpte {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 1;
  z-index: 16;
  display: flex;
  flex-wrap: nowrap;
  opacity: 0;
}

.smpte .bar {
  height: 100%;
  width: 100%;
}

.smpte .bar-1 {
  background-color: rgb(255, 255, 255);
}

.smpte .bar-2 {
  background-color: rgb(180, 180, 16);
}

.smpte .bar-3 {
  background-color: rgb(16, 180, 180);
}

.smpte .bar-4 {
  background-color: rgb(16, 180, 16);
}

.smpte .bar-5 {
  background-color: rgb(180, 16, 180);
}

.smpte .bar-6 {
  background-color: rgb(180, 16, 16);
}

.smpte .bar-7 {
  background-color: rgb(16, 16, 180);
}

#player {
  /*position: fixed;*/
}

.power-screen {
  position: fixed;
  top: 0;
  left: 0px;
  width: 100vw;
  height: 100vh;
  opacity: 1;
  z-index: 18;
  display: none;
  background-size: 200px 200px;
  background-repeat: no-repeat;
  background-position: center; /* Position the background image in the top-right corner */
  background-color:#000;
  background-image: url("icons/static2.jpg");
}

.info,
.guide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
}

.info .bg,
.guide .bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(7px);
  z-index: 20;
}

.info .wrapper,
.guide .wrapper {
  width: 90%;
  height: auto;
  max-height: 90%;
  max-width: 650px;
  padding: 0;
  border-radius: 0.7rem;
  background-color: #fff;
  display: flex;
  align-items: center;
  /* justify-content: center;*/
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  z-index: 21;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1),
    /* Soft shadow */
    0 1px 3px rgba(0, 0, 0, 0.08);
  /* Slight inner shadow */
}


.info .wrapper .close,
.guide .wrapper .close {
  padding: 0.7rem;
  border-radius: 50%;
  transition: 0.2s ease;
  margin-left: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
}

.info .wrapper .close:hover,
.guide .wrapper .close:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.info .wrapper .close img,
.guide .wrapper .close img {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.7;
}

.info .wrapper .content,
.guide .wrapper .content {
  width: 100%;
  padding-top: 2rem;
  padding-left:2rem;
  padding-right:2rem;
  padding-bottom:2rem;
  overflow-y: auto;
  overflow-x: auto;
  min-height: 33vh;
  max-height: 100vh;
  scrollbar-width: thin;
}


.info .wrapper .content::-webkit-scrollbar,
.guide .wrapper .content::-webkit-scrollbar,
.pop-up-bubble::-webkit-scrollbar {
  width: 0.5rem;
}

.info .wrapper .content::-webkit-scrollbar-track,
.guide .wrapper .content::-webkit-scrollbar-track,
.pop-up-bubble::-webkit-scrollbar-track{
  background: rgba(0, 0, 0, 0.07);
}

.info .wrapper .content::-webkit-scrollbar-thumb,
.guide .wrapper .content::-webkit-scrollbar-thumb,
.pop-up-bubble::-webkit-scrollbar-thumb{
  background: rgba(0, 0, 0, 0.2);
  width: 0.5rem;
}

.info .wrapper .content::-webkit-scrollbar-thumb:hover,
.guide .wrapper .content::-webkit-scrollbar-thumb:hover {
  background: #eee;
}

/* The guide-row should be displayed as flex to align items in a row */
/* Guide row should be a flex container to align items properly */
.guide-row {
  display: flex;
  align-items: center;
  margin-bottom: 1px;
}

/* Channel number and name aligned to the left with space */
.guide-channel-number {
  font-size: 0.9rem;
  color: #000;
  text-transform: uppercase;
  font-weight: 500;
  margin-right: 1.0rem;
}

.guide-channel-name {
  /* margin-right: 210px; */
  flex: 1;
  font-size: 0.9rem;
  color: #222;
  text-transform: uppercase;
  font-weight: 700;
}
.channel-name-link
{
  text-decoration:none;
}
.channel-name-link:link,
.channel-name-link:visited {
  color: blue; /* Default blue link color */
}
/* Align the preview button to the left */
.preview-button {
  padding: 0px 3px;
  cursor: pointer;
  font-size: x-small;
}

/* Whats-on content displayed underneath the row */
.whats-on-content {
  margin-top: 10px;
}
.whats-on-info {
  margin-left: 3.7rem;  /* Indent to match channel name and number */
  font-size: 10px;
  color: #333;
  
}


/* Video container styling for embedded video */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-meta a {
  cursor: pointer;
}

.info .wrapper .content .title {
  font-size: 1rem;
  color: #666;
  background-color: rgba(0, 0, 0, 0.03);
  padding: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0.3rem;
}


.info .wrapper .content .text {
  font-size: 1rem;
  color: #222;
}

.info .wrapper .content .text a {
  font-size: 1rem;
  color: #2980b9;
  padding: 0.7rem 1.2rem;
  background-color: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 0.3rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  margin: 0.7rem 0;
  display: block;
  width: 100%;
}

.info .wrapper .content .text a:first-child {
  background-color: #f39c12;
  color: #fff;
}

.info .wrapper .content .text a:last-child {
  background-color: #000;
  color: #fff;
}

.info .settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  text-transform: capitalize;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.info .settings-item:last-child {
  border: 0;
}

.info .settings-item .switch {
  width: 3.3rem;
  height: 2.1rem;
  border-radius: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background-color: rgba(0, 0, 0, 0.03);
  padding: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.info .settings-item .switch .k {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background-color: #fff;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.07), 0px 2px 3px rgba(0, 0, 0, 0.03);
}

.info .checkbox {
  display: none;
}

.info .checkbox:checked~.switch {
  background-color: #2ecc71;
}

.info .checkbox:checked~.switch .k {
  margin-left: auto;
}

.info .section {
  margin: 2rem 0;
}

.info .section:first-child {
  margin-top: 0;
}

.info .section:last-child {
  margin-bottom: 0;
}


.guide .wrapper .content .item {
  margin-bottom: 0.5rem;
}

.guide .wrapper .content .item .name {
  font-size: 0.9rem;
  color: #888;
  text-transform: uppercase;
  font-weight: 500;
  margin-right: 1.5rem;
}

.guide .wrapper .content .item .value {
  font-size: 0.9rem;
  color: #222;
  text-transform: uppercase;
  font-weight: 700;
}

.control {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 10rem;
  z-index: 19;
  display: none;
  border-radius: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(7px);
  transition: 0.2s ease;
  overflow: hidden;
  flex-wrap: nowrap;
  user-select: none;
  -webkit-user-drag: none;
  text-align: center;
}

.control .t-1,
.control .t-2 {
  width: 100%;
  height: 100%;
  padding: 0.7rem;
  flex-shrink: 0;
  transition: 0.1s ease;
}

@keyframes swipeControl {
  0% {
    transform: translateX(0%);
  }

  40% {
    transform: translateX(-100%);
  }

  60% {
    transform: translateX(-100%);
  }

  0% {
    transform: translateX(0%);
  }
}

.control .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.control .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.control .wrapper:last-child {
  margin-bottom: 0;
}

.control .wrapper .button {
  width: 2.5rem;
  height: 2.5rem;
  background-color: #fff;
  border-radius: 0.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 1.05rem;
  color: #000;
  position: relative;
}

.control .wrapper .button-channel {
  width: 100%;
  height: 2.5rem;
  background-color: #fff;
  border-radius: 0.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 0.75rem;
  color: #000;
  position: relative;
}

.control .wrapper .button .notify {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  width: 0.7rem;
  height: 0.7rem;
  background-color: red;
  border-radius: 50%;
  font-size: 0.7rem;
  color: #fff;
  text-align: center;
  display: none;
}

.control .wrapper .button img {
  width: 1.2rem;
  height: 1.2rem;
  -webkit-user-drag: none;
}

.control .wrapper .long-button {
  background-color: #fff;
  border-radius: 0.3rem;
}

.control .wrapper .long-button .button:first-child,
.control .wrapper .middle-buttons .button:first-child {
  margin-bottom: 0.5rem;
}

.control .wrapper .middle-buttons {
  margin: 0 0.5rem;
}


.control .wrapper .power-button {
  border-radius: 50%;
  background-color: #d63031;
}

.control .wrapper .videoIdElement {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: text;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: rgba(0, 0, 0, 0.3);
  color: #fff;
  height: 2.5rem;
  width: 5.5rem;
  border-radius: 0.3rem;
  cursor: pointer;
  width: 100%;
}

.control .wrapper .videoIdElement .text {
  width: 100%;
  text-align: center;
  font-weight: 500;
  font-size: 0.7rem;
}

.CHVOL {
  /* font-size: 14px !important;*/
  cursor: default;
  line-height: 7px;
  position: relative;
  z-index: 100000;
}

.control .wrapper .middle-buttons .button:first-child {
  margin-bottom: 0.5rem;
}

.control .wrapper .middle-buttons {
  margin: 0 0.5rem;
}


.control .wrapper .power-button {
  border-radius: 50%;
  background-color: #d63031;
}



.channel-container {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 17;
  width: 100%;
}

.channel-name {
  font-size: 2rem;
  color: #00FF22;
  text-transform: uppercase;
  text-shadow: 0px 0px 2px #000;
  font-weight: 700;
  transition: 0.2s ease;
  width: calc(100% - 4rem);
  /* Ensure the text stays within the screen width */
  word-wrap: break-word;
  /* Handle long channel names by wrapping to the next line */
}

.video-name {
  font-size: 1rem;
  color: #00FF22;
  text-transform: uppercase;
  text-shadow: 0px 0px 2px #000;
  font-weight: 700;
  transition: 0.2s ease;
  margin-top: 0.5rem;
  /* Add some space between channel-name and video-name */
}

.volume-steps {
  position: fixed;
  display: flex;
  opacity: 0;
  width: 100%;
  height: 100vh;
  align-items: flex-end;
  justify-content: center;
  top: 0rem;
  left: 0;
  z-index: 17;
  padding-bottom: 7rem;
  transition: 0.2s ease;
}

.volume-steps .wrapper {
  width: 80%;
  max-width: 600px;
}

.volume-steps .text {
  font-size: 2rem;
  color: #00FF22;
  text-transform: uppercase;
  text-shadow: 0px 0px 2px #000;
  font-weight: 700;
}

.volume-steps .steps {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 3rem;
}

.volume-steps .steps .step {
  height: 100%;
  width: 1rem;
  margin-right: 0.2rem;
  background-color: #00FF22;
  box-shadow: 0px 0px 1px #000;
}

.popup {
  visibility: hidden;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 5px;
  padding: 10px;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.popup.show {
  visibility: visible;
  opacity: 1;
}


@media only screen and (min-width: 520px) {

  html,
  body {
    font-size: 17px;
  }
}

.search-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Center the button horizontally */
}

#search-all {
  height: 80px;
}

#search-all-button {
  height: 50px;
  width: 60%;
  margin-top: -10px;
  /* Add space between the select box and the button if needed */
  border-radius: 0.3rem;
  border: 1px #aaa solid;
  cursor: pointer;
  font-size: 17px;
  
}


.search-container {
  margin: -100px auto;
  /* Center the container horizontally */
  max-width: 100%;
  /* Set the maximum width as 80% of the screen */
  width: 100%;
  /* Set the width to 100% to make sure it stretches fully */
  box-sizing: border-box;
  /* Ensure padding is included in the width calculation */

}

.search-container.info .wrapper {

  min-height: 450px;
 /* max-height: 600px;*/
 overflow-y: auto;
 overflow-x: hidden;
}

.select2-selection.select2-selection--multiple {
  box-sizing: border-box;
  border: none;
  font-size: 100%;
  margin-top: 5px;
  padding: 0;
  max-width: 100%;
  resize: none;
  height: 100px;
  vertical-align: bottom;
  font-family: sans-serif;
  overflow: hidden;
  word-break: keep-all;
  font-size: 18px !important;
}

.autocomplete-suggestion {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.autocomplete-arrow {
  cursor: pointer;
  margin-left: 10px;
  color: gray;
}


/* Prevent horizontal scroll caused by the Select2 dropdown */
.select2-container {
  max-width: 100%;
  /* Ensure the container doesn't exceed the viewport width */
  width: 100%;
  /* Ensure it takes up 100% of the available space */
}

.select2-dropdown {
  max-width: 100%;
  /* Ensure the dropdown doesn't exceed the viewport width */
  width: auto;
  /* Allow the dropdown to adjust its width automatically */
  box-sizing: border-box;
  /* Ensure padding and border are included in width */
}

/* Make sure the suggestions fit inside the dropdown */
.select2-results__options {
  max-width: 100%;
  /* Ensure suggestions are within the viewport */
  white-space: nowrap;
  /* Prevent text from wrapping */
}

.select2-container .select2-search--inline .select2-search__field {
  box-sizing: border-box;
  border: none;
  margin-top: 5px;
  margin-left: 5px;
  padding: 0;
  max-width: 100%;
  resize: none;
  height: 100px;
  vertical-align: bottom;
  overflow: hidden;
  word-break: keep-all;
  font-size: 18px !important;
}
#channel-history a{
  text-decoration: none;
  line-height: 2em;
  font-size: small;
}












#comments-container {
  display: none;
  margin-top: 40px;
}

.comment {
  display: flex;
  margin-bottom: 15px;
}

.comments-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 10px;
  
}

.comments-content {
  display: flex;
  flex-direction: column;
}

.comments-username {
 /* font-weight: bold;*/
}

.comments-text {
  margin: 5px 0;
}

.comments-pinned {
  color: gold;
}

.comments-likes {
  color: lightgray;
  font-size: 12px;
}

#popup-comment {
  position: fixed;
  bottom: 0;
  left: 0;
  
  max-width: 70rem; /* Add a max width for larger screens if needed */
  box-sizing: border-box; /* Ensure padding and borders don't cause overflow */
  color: white;
  padding: 20px;
  display: none;
  z-index: 19;
  transition: 0.2s ease;
  overflow: hidden;
  flex-wrap: nowrap;
}

#popup-comment span {
  display: block;
  margin-bottom: 5px;
}

#comments-toggle {
  margin-top: 20px;
  display: none;
}

.comments-close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  z-index: 1001; /* Higher z-index than the popup content to make sure it's clickable */
}

.comments-close .close-icon {
  width: 22px;
    height: 22px;
  margin-right: 14px;
  margin-top: 14px;
  transition: 0.2s ease;
}

.thumbs-icon {
  width: 20px; /* Adjust the size of the SVG icon */
  height: 20px;
  margin-top:6px;
  margin-bottom: -4px;
  transition: 0.2s ease;
}

/* Pop-up comment styling */
.pop-up-bubble {
  
  align-items: flex-start; /* Align avatar and content at the top */
  animation: popUp 0.5s ease-out forwards;
  border-radius: 10px;
  background-color: rgba(50, 50, 50, 0.8);
  color: #fff;
  padding: 10px;
  margin-bottom: 10px;

  overflow-y: auto;
  overflow-x: hidden;
  max-height: 30vh;

}

.pop-up-bubble img {
  flex-shrink: 0; /* Prevent the image from shrinking */
}

.pop-up-bubble a {
  text-decoration: none; /* Remove underline */
  color: inherit; /* Ensure links inherit the color of the surrounding text */
}

.pop-up-bubble a:visited {
  color: inherit; /* Prevent visited links from turning a different color */
}

.pop-up-bubble a:hover {
  text-decoration: underline; /* Optional: Add underline on hover to indicate it's a link */
  color: lightgray; /* Optional: Change hover color to distinguish the link */
}

/* User info (author and time) */
.user-info {
  
  text-align: left;

}

.comment-author {
  margin-bottom: 3px; /* Adds some spacing between author and time */
}

.comment-time {
  color: lightgray;
  font-size: 0.9em; /* Slightly smaller font for the time */
}

.comment-text {
  margin-top: 10px; /* Ensure some space between the user info and comment text */
  color: #fff;
}

/* Align author and time */
.username-time .comment-time {
  margin-left: 5px; /* Add a small gap between the author name and the time */
  color: lightgray; /* Optional: Different color for the time */
}

/* Animation for popup */
@keyframes popUp {
  0% {
      transform: scale(0.5);
      opacity: 0;
  }
  100% {
      transform: scale(1);
      opacity: 1;
  }
}
