@import url('https://fonts.googleapis.com/css2?family=Century+Gothic:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rammetto+One&display=swap');

:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --link-color: #666666;
  --link-hover: #000000;
  --container-bg: #f0f0f0;
  --video-bg: #000000;
  --sidebar-bg: #e0e0e0;
  --input-bg: #dddddd;
  --input-text: #000000;
  --active-bg: #cccccc;
  --active-color: #000000;
  --hover-bg: #dddddd;
  --scroll-track: #cccccc;
  --scroll-thumb: #999999;
  --highlight: #444444;
  --clock-bg: #cccccc;
  --clock-text: #000000;
}

.dark-theme {
  --bg-color: #121212;
  --text-color: #ffffff;
  --link-color: #bbbbbb;
  --link-hover: #ffffff;
  --container-bg: #1a1a1a;
  --video-bg: #000000;
  --sidebar-bg: #222222;
  --input-bg: #2a2a2a;
  --input-text: #ffffff;
  --active-bg: #444444;
  --active-color: #ffffff;
  --hover-bg: #333333;
  --scroll-track: #1c1c1c;
  --scroll-thumb: #555555;
  --highlight: #777777;
  --clock-bg: #333333;
  --clock-text: #ffffff;
}

* {
  font-family: system-ui, sans-serif;
}

html, body {
  font-size: 100%;
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

a {
  color: var(--link-color);
  font-size: 12px;
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

.container {
  display: flex;
  height: 100%;
  width: 100%;
  gap: 1rem;
  padding: 1rem;
  box-sizing: border-box;
  background-color: var(--container-bg);
}

.video-container {
  position: relative;
  flex: 1;
  background-color: var(--video-bg);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#player, #player .jwplayer, .jwplayer {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0;
  left: 0;
}

#fallbackMessage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background-color: black;
  padding: 2rem 4rem;
  font-size: 16px;
  text-align: justify;
  text-justify: inter-word;
  z-index: 999;
  display: block;
  letter-spacing: 2px;
  font-family: Helvetica, sans-serif;
}

#clock {
  position: absolute;
  top: 5px;
  left: 5px; /* Align to the left side */
  background-color: transparent; /* or var(--clock-bg) */
  color: var(--highlight);
  padding: 5px 5px;
  border-radius: 0;
  font-size: 14px;
  z-index: 100;
}

.sidebar {
  width: 100%;
  max-width: 350px; /* Prevents it from stretching too far on large screens */
  background-color: var(--sidebar-bg);
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
}

/* Optional: Ensure spacing and stacking on smaller screens */
@media (max-width: 600px) {
  .sidebar {
    width: 100%;
    max-width: 100%;
    border-radius: 0; /* Optional: remove rounding for full-width layout */
  }
}

.top-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

select, input {
  background-color: var(--input-bg);
  color: var(--input-text);
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem;
  font-size: 0.875rem;
}

input.search-input {
  margin-top: 0.5rem;
}

.channel-text {
  font-family: 'Rammetto One', 'Audiowide', sans-serif;
  text-align: right;
  font-size: 18px;
  margin-bottom: 0;
  width: 100%;
}

#channelCount {
  text-align: left;
  font-size: 12px;
  margin-bottom: 0;
  color: var(--highlight);
}

.list-container {
  flex: 1;
  overflow-y: auto;
}

ul.channel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.channel-list li {
  padding: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--highlight);
  border-right: 1px solid var(--highlight);
  border-radius: 5px;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: consolas, sans-serif;
  letter-spacing: 2px;;
}

ul.channel-list li.active {
  background-color: var(--active-bg);
  color: var(--active-color);
}

ul.channel-list li:hover:not(.active) {
  background-color: var(--hover-bg);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border-radius: 50%;
}

.status-online {
  background-color: green;
  background-image: linear-gradient(0deg, green, yellow);
}

.status-offline {
  background-color: #000;
}

.list-container::-webkit-scrollbar {
  width: 8px;
}
.list-container::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 4px;
}
.list-container::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 4px;
  border: 2px solid var(--scroll-track);
}
.list-container::-webkit-scrollbar-thumb:hover {
  background-color: var(--highlight);
}

/* JWPlayer Styling (unchanged except for highlight color) */
.jwplayer .jw-controlbar {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)) !important;
  backdrop-filter: blur(6px);
}
.jwplayer .jw-button-color, .jwplayer .jw-icon, .jwplayer .jw-text-elapsed, .jwplayer .jw-text-duration {
  color: var(--highlight) !important;
  fill: var(--highlight) !important;
  transition: color 0.3s ease;
}
.jwplayer .jw-icon:hover {
  color: var(--highlight) !important;
  fill: var(--highlight) !important;
}
.jwplayer .jw-progress, .jwplayer .jw-slider-volume .jw-progress, .jwplayer .jw-knob {
  background-color: rgba(255, 255, 255, 0.5) !important;
}
.jwplayer .jw-slider-volume .jw-knob, .jwplayer .jw-slider-horizontal .jw-knob {
  background-color: var(--highlight) !important;
}
.jwplayer .jw-background-color {
  background-color: transparent !important;
}
.jw-svg-icon-buffer path {
  display: none;
}
.jw-svg-icon-buffer {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80px 80px;
  width: 80px;
  height: 80px;
  opacity: 0.8;
}

@media screen and (max-width: 768px), (orientation: portrait) {
  .container {
    flex-direction: column;
    height: auto;
    overflow-y: auto;
  }
  .video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    position: relative;
  }
  .sidebar {
    width: 100%;
    max-height: none;
    height: auto;
    overflow-y: auto;
  }
  .list-container {
    max-height: 240px;
    overflow-y: auto;
  }
#fallbackMessage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: black;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 1.5px;
    text-justify: inter-word;
    font-family: Helvetica, sans-serif;
  }
  #clock {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 15px;
  }
  .jw-svg-icon-buffer {
    background-size: 40px 40px;
    width: 40px;
    height: 40px;
    opacity: 0.6;
  }
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-top: 0.5rem;
  color: var(--text-color);
}

.theme-toggle input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 20px;
  background-color: var(--scroll-thumb);
  border-radius: 20px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.theme-toggle input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
}

.theme-toggle input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

.theme-toggle input[type="checkbox"]:checked {
  background-color: var(--highlight);
}

/* Style the select element */
#categoryFilter {
  padding: 8px 12px;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  cursor: pointer;
  letter-spacing: 1px;
  weight: 400;
}

