@import url(./reset.css);

* {
  box-sizing: border-box;
  font-synthesis: none;
}

@font-face {
  font-family: 'Inter';
  src: url('../assets/Inter-V.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

body {
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  background: #000000;
  color: #fff;
  height: 100vh;
  overflow-y: hidden;
  overflow-x: hidden;
  padding: 20px;
}

.wrapper {
  display: flex;
  gap: 10px;
  height: 100%;
}

.channel-list-part {
  flex: 0 1 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0px 20px 20px 20px;
}

.video-section {
  flex: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.logo-img {
  max-width: 80%;
  object-fit: contain;
  flex-shrink: 0;
  margin-bottom: 10px;
  padding-left: 40px;
  padding-right: 50px;
}

#channel-header-title-container {
  flex-shrink: 0;
}

.channel-list__title {
  font-size: 2rem;
  text-align: left;
  margin-top: 5px;
  margin-bottom: 5px;
  padding-left: 45px;
}

#channel-list {
  position: relative;
  flex-grow: 1;
  overflow-y: auto;
  padding: 0px 15px 15px 30px;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Channel List Styles */
.channel {
  font-family: 'Inter', sans-serif !important;
  position: relative;
  width: 100%;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 14px;
  background: transparent;
  color: white;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  font-size: 55px;
}

/* Channel number badge */
.channel-num {
  -webkit-flex-shrink: 0;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  min-width: 2ch;
  text-align: right;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65em;
  font-weight: 400;
  line-height: 1;
  margin-right: 1.5ch;
}

/* Channel logo container */
.channel-logo {
  -webkit-flex-shrink: 0;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 1.4em;
  height: 1.4em;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -moz-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  margin-right: 0.6em;
  overflow: hidden;
}

.channel-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-object-fit: contain;
  object-fit: contain;
}

.channel-logo-placeholder {
  width: 64px;
  height: 64px;
  display: block;
}

/* Channel name */
.channel-name {
  -webkit-flex: 1;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: normal !important;
}

/* Rewind icon in channel */
.channel-rewind {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  margin-left: 4px;
}

.channel-rewind-icon {
  width: 40px;
  height: 40px;
  display: block;
  opacity: 0.75;
}

.channel:hover {
  border: 2px solid #b1dad5;
}

.channel.keyboard-focus {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  /* background-color: rgba(255, 255, 255, 0.08); */
  transform: scale(1.015);
}

.channel.active {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.04) 100%);
  font-weight: bold;
  font-variation-settings: "wght" 700;
  padding-left: 20px;
}

.channel.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: #ffffff;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Video Container Styles */
#video-container {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

#video-loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  z-index: -1;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}

#video-loading-indicator:not(.loading-active) {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #ffffff;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Schedule Styles */
.schedule-title {
  text-align: left;
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 10px;
}

.schedule-list {
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 20px;
  font-size: 1.8rem;
}

.schedule-list li {
  position: relative;
  padding: 14px 16px;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 4px;
  -webkit-transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    -webkit-transform 0.18s ease;
  -moz-transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    -moz-transform 0.18s ease;
  -o-transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    -o-transform 0.18s ease;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  -ms-transform: translateX(0);
  -o-transform: translateX(0);
  transform: translateX(0);
  overflow: hidden;
}

.schedule-list li:hover {
  outline: 1px solid white;
}

#schedule-list li.active-program {
  border: 2px solid transparent;
  background-color: rgba(255, 255, 255, 0.08);
  font-weight: bold;
  font-variation-settings: "wght" 700;
  color: #ffffff;
}

#schedule-list li.active-program::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: #ffffff;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

#schedule-list li.keyboard-focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: transparent;
  color: #fff;
  -webkit-transform: translateX(4px);
  -moz-transform: translateX(4px);
  -ms-transform: translateX(4px);
  -o-transform: translateX(4px);
  transform: translateX(4px);
}

#schedule-list li.keyboard-focus::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #fff;
  border-radius: 0 2px 2px 0;
}

#schedule-list li.current-program {
  /* font-weight: bold !important; font-variation-settings: "wght" 700 !important;
  color: #ffffff;
  border: 2px solid transparent; */
}

#schedule-list li.current-program ::before {
  /* content: "";
  position: absolute;
  left: 0;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: #ffffff;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6); */
}

#schedule-list li.full-schedule-link {
  margin-top: 10px;
  padding-top: 10px;
  cursor: pointer;
}

.schedule-link-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-link-icon {
  width: 49px;
  height: 49px;
  margin-right: 10px;
}

.full-schedule-link {
  cursor: pointer;
  padding: 8px 12px;
}

/* Program Items Styles */
.focusable {
  display: flex;
  align-items: center;
  gap: 15px;
}

.program-list-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  line-height: 1.4;
  font-size: 1.6rem;
}

.program-time {
  white-space: nowrap;
  margin-right: 10px;
  font-size: 24px;
  opacity: 0.7;
  -webkit-flex-shrink: 0;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}

.icons-container {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.program-icon {
  width: 36px;
  height: 36px;
  vertical-align: middle;
  margin-left: 6px;
}

.live-text {
  margin-left: 6px;
  font-size: 1.3rem;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  padding: 3px 10px;
  border-radius: 10px;
}

.red {
  color: #eb5757ff;
}

.rec {
  margin-right: 38px;
}

.schedule-list li.focusable {
  cursor: default;
}

.schedule-list li.focusable.rewind-available {
  cursor: pointer;
}

/* Video Player Styles */
video {
  width: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  opacity: 0.2;
}

video.fullscreen-active,
video:fullscreen {
  opacity: 1;
}

video::-webkit-media-controls {
  display: none !important;
}

/* Toolsbar Styles */
.toolsbar {
  position: absolute;
  top: 10px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.75);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  padding: 20px 25px;
  border-radius: 20px;
  overflow: hidden;
}

.search,
.settings {
  background-size: contain;
  background-repeat: no-repeat;
  aspect-ratio: 1/1;
  width: 56px;
  height: 56px;
  background-color: transparent;
  border: none;
}

.search {
  background-image: url(../assets/search.svg);
}

.settings {
  background-image: url(../assets/settingsicon.svg);
}

.fullscreen-btn {
  border: none;
  background-color: transparent;
  background-image: url(../assets/fullscreen_old.svg);
  background-size: contain;
  background-repeat: no-repeat;
  margin-left: 40px;
  width: 56px;
  height: 56px;
}

.fullscreen-btn {
  position: relative;
}

#fullscreen-btn.keyboard-focus {
  transform: scale(1.05);
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

/* Current Program Title */
#curent-program-title {
  position: absolute;
  bottom: 10px;
  padding-left: 35px;
  opacity: 0.8;
}

#curent-program-title:empty {
  display: none;
}

/* Back Button */
.back {
  position: fixed;
  top: 50%;
  left: 0;
  background: transparent;
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  width: 36px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  font-size: 2.2rem;
  z-index: 2;
  transition: all 0.2s ease;
  transform: translateY(-50%);
  margin-left: 20px;
}

.back:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
}

/* Video Controls Styles */
.video-controls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.video-controls.fullscreen-active {
  display: flex;
}

.video-controls.controls-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.video-controls.controls-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Control Buttons */
.control-btn {
  background-color: transparent;
  border: none;
  width: 64px;
  height: 64px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  cursor: pointer;
  margin-right: 25px;
  background-position: center;
  background-size: 55px 55px;
}

.control-btn img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.control-btn.keyboard-focus {
  border-radius: 12px;
  outline: none;
  box-shadow: 0 0 0 3px #ffffff;
  outline-offset: 3px;
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  transition: all 0.2s ease-in-out;
}

#go-to-live-btn.hidden-control {
  display: none !important;
}

@keyframes pulse-focus {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }
}

/* Fullscreen Controls Layout */
.controls-main {
  display: flex;
  justify-content: space-between;
  padding: 30px 80px 15px;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.controls-bottom {
  margin-top: 15px;
  padding: 0 80px;
  width: 100%;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.controls-view {
  display: flex;
  align-items: center;
  gap: 10px;
}

.controls-view-line {
  display: flex;
}

.controls-view .control-btn,
.controls-main>div>.control-btn {
  margin: 0 5px;
}

.controls-main .control-btn {
  position: relative;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* Fullscreen Active State */
.video-controls.fullscreen-active .control-btn {
  background-color: rgba(30, 30, 30, 0.9);
  padding: 16px 20px;
  border-radius: 10px;
  color: #fff;
  border: 2px solid transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 1.6rem;
  width: auto;
  height: auto;
  min-width: 80px;
  min-height: 70px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 8px;
}

.video-controls.fullscreen-active .control-btn img {
  filter: brightness(0) invert(1);
  width: 44px;
  height: 44px;
  display: block;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.video-controls.fullscreen-active .control-btn:hover {
  background-color: rgba(255, 255, 255, 0.4);
  border-color: #ffffff;
  transform: translateY(-2px);
}

.video-controls.fullscreen-active .rewind-start-btn {
  background-color: rgba(206, 206, 206, 0.2);
  width: 100%;
}

.video-controls.fullscreen-active .go-to-live-btn {
  background-color: rgba(255, 59, 48, 0.3);
  border-color: #ff3b30;
}

.video-controls.fullscreen-active .go-to-live-btn:hover {
  background-color: rgba(255, 59, 48, 0.5);
}

/* Progress Bar */
.progress-bar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-timeline {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
}

.video-timeline::-webkit-slider-runnable-track {
  width: 100%;
  height: 14px;
  background: transparent;
  border-radius: 4px;
}

.video-timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  background: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  margin-top: -9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.video-timeline::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #e0e0e0;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.video-timeline::-moz-range-track {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  border: none;
}

.video-timeline::-moz-range-thumb {
  width: 32px;
  height: 32px;
  background: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.video-timeline::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: #e0e0e0;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.video-timeline::-moz-range-progress {
  background: #ffffff;
  height: 14px;
  border-radius: 4px;
}

.time-panel {
  display: flex;
  color: #fff;
  gap: 5px;
  align-items: center;
}

.time-label {
  padding-top: 10px;
  font-family: monospace;
  font-size: 1.8rem;
}

.descriptions {
  flex-grow: 1;
  margin-left: 10px;
  word-break: break-all;

  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.program-title {
  margin-left: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.6rem;
}

/* Full Schedule Modal Styles */
.full-schedule-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111111;
  z-index: 1000;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.full-schedule-modal.active {
  display: flex;
  opacity: 1;
}

.full-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  flex-shrink: 0;
}

.full-schedule-title {
  font-size: 3rem;
  color: white;
  margin: 0;
  flex: 1;
  text-align: center;
}

.full-schedule-spacer {
  width: 120px;
}

.full-schedule-back-btn {
  background: transparent;
  color: #fff;
  border: 2px solid white;
  padding: 16px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  font-size: 1.8rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.full-schedule-back-btn img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}

.full-schedule-back-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  outline: 3px solid #ffffff;
}

.full-schedule-back-btn.keyboard-focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
  background-color: rgba(255, 255, 255, 0.08);
  outline: none;
}

.full-schedule-date-info {
  padding: 15px 40px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.date-display {
  font-size: 2.4rem;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  color: #fff;
  padding: 10px 20px;
}

.full-schedule-content-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  overflow: hidden;
}

.date-nav-btn {
  background: transparent;
  border: 2px solid white;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.date-nav-btn img {
  width: 50px;
  height: 50px;
  filter: brightness(0) invert(1);
}

.date-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  transform: scale(1.1);
}

.date-nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.full-schedule-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.full-schedule-slider {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
  will-change: transform;
}

.full-schedule-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 20px 40px;
  flex-shrink: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  scrollbar-width: none;
}

.full-schedule-slide::-webkit-scrollbar {
  display: none;
}

.full-schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.full-schedule-program-item {
  padding: 20px 24px;
  border: 2px solid transparent;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: default;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
}

.full-schedule-program-item.keyboard-focus {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.75);
  border-radius: 6px;
  border-color: transparent;
}

.full-schedule-program-item.rewind-available {
  cursor: pointer;
}

.full-schedule-program-item.rewind-available:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.full-schedule-program-item.current-playing {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  font-weight: bold;
  font-variation-settings: "wght" 700;
}

.full-schedule-program-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 30px;
}

.full-schedule-program-time {
  color: white;
  font-weight: 600;
  font-variation-settings: "wght" 600;
  min-width: 220px;
  font-size: 1.8rem;
}

.full-schedule-program-title {
  color: #fff;
  flex: 1;
  font-size: 1.8rem;
}

.full-schedule-program-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.full-schedule-status-badge {
  font-size: 1.4rem;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  text-transform: uppercase;
}

.full-schedule-status-live {
  background: #ff3b30;
  color: white;
  font-size: 1.3rem;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.full-schedule-status-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.full-schedule-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #888;
  font-size: 1.2rem;
}

.full-schedule-program-item.current-playing .full-schedule-status-live {
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Settings Modal Styles */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111111;
  z-index: 1001;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.settings-modal.active {
  display: flex;
  opacity: 1;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-title {
  font-size: 3rem;
  color: white;
  margin: 0;
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.settings-title-icon {
  width: 56px;
  height: 56px;
  filter: brightness(0) invert(1);
}

.settings-spacer {
  width: 120px;
}

.settings-back-btn {
  background: transparent;
  color: #fff;
  border: 2px solid white;
  padding: 16px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  font-size: 1.8rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-back-btn img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}

.settings-back-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  outline: 3px solid #ffffff;
}

.settings-back-btn.keyboard-focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
  background-color: rgba(255, 255, 255, 0.08);
  outline: none;
}

.settings-content {
  flex: 1;
  /* display: flex; */
  padding: 40px;
  gap: 40px;
  overflow-y: auto;
}

.settings-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-password-section {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 40px;
}

.settings-section-title {
  font-size: 2.4rem;
  color: #fff;
  margin: 0 0 10px 0;
  font-weight: 600;
  font-variation-settings: "wght" 600;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-field label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-variation-settings: "wght" 500;
}

.settings-input {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px 24px;
  color: #fff;
  font-size: 1.8rem;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
}

.settings-input:focus {
  outline: none;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.settings-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.settings-input.keyboard-focus {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.settings-number-input {
  width: 100%;
  max-width: 300px;
  font-weight: 600;
  font-variation-settings: "wght" 600;
  text-align: center;
  font-size: 2.4rem;
}

/* Remove spinner for number input */
.settings-number-input::-webkit-outer-spin-button,
.settings-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.settings-number-input[type=number] {
  -moz-appearance: textfield;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  body {
    overflow-y: auto;
    width: 100%;
    height: 100%;
    padding: 10px;
  }

  .wrapper {
    flex-direction: column-reverse;
  }

  .video-section {
    min-width: 100%;
  }

  .settings-content {
    flex-direction: column;
    gap: 30px;
  }

  .settings-password-section {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 0;
    padding-bottom: 30px;
  }
}

/* Search Modal Styles */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111111;
  z-index: 1002;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-modal.active {
  display: flex;
  opacity: 1;
}

.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-title {
  font-size: 3rem;
  color: white;
  margin: 0;
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.search-title-icon {
  width: 56px;
  height: 56px;
  filter: brightness(0) invert(1);
}

.search-spacer {
  width: 120px;
}

.search-back-btn {
  background: transparent;
  color: #fff;
  border: 2px solid white;
  padding: 16px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  font-size: 1.8rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-back-btn img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}

.search-back-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  outline: 3px solid #ffffff;
}

.search-back-btn.keyboard-focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
  background-color: rgba(255, 255, 255, 0.08);
  outline: none;
}

.search-input-container {
  padding: 30px 40px 20px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 24px 28px;
  color: #fff;
  font-size: 2rem;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-input.keyboard-focus {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.search-input-hint {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.6rem;
  text-align: center;
}

.search-results-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  padding: 22px 26px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.search-result-item.keyboard-focus {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.search-result-item.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-result-item.unavailable:hover {
  border-color: transparent;
}

.search-result-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-result-title {
  font-size: 2rem;
  font-weight: 600;
  font-variation-settings: "wght" 600;
  color: #fff;
}

.search-result-meta {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.7);
}

.search-result-channel {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-result-channel-icon {
  width: 28px;
  height: 28px;
  border-radius: 2px;
}

.search-result-time {
  font-weight: 500;
  font-variation-settings: "wght" 500;
}

.search-result-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-status-badge {
  font-size: 1.4rem;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-status-live {
  background: #ff3b30;
  color: white;
}

.search-status-archive {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-status-archive img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.search-status-unavailable {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.search-empty-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.3;
  filter: brightness(0) invert(1);
}

.search-empty-text {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.search-empty-hint {
  font-size: 1.8rem;
  opacity: 0.7;
}

.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.7);
}

.search-loading-spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.search-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  color: #ff3b30;
  text-align: center;
}

.search-error-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.search-result-description {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item:hover .search-result-description,
.search-result-item.keyboard-focus .search-result-description {
  color: rgba(255, 255, 255, 0.8);
}

/* Fullscreen Channel Info */
.fullscreen-channel-info {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  transform: translateX(-50%);
  background: #030101;
  background: linear-gradient(180deg, rgba(3, 1, 1, 1) 0%, rgba(255, 255, 255, 0) 100%);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  z-index: 101;
  text-align: center;
  padding-top: 30px;
  padding-bottom: 20px;
}

.fullscreen-channel-name {
  font-size: 5rem;
  font-weight: 600;
  font-variation-settings: "wght" 600;
  color: #fff;
  white-space: nowrap;
}

.video-controls.controls-hidden .fullscreen-channel-info {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
}

.video-controls.controls-visible .fullscreen-channel-info {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.channel.preloading::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.category-item {
  position: relative;
  width: 100%;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 14px;
  background: transparent;
  color: white;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  text-align: left;
  -webkit-transition: -webkit-transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  font-size: 2rem;
}

.category-item:hover {
  border: 2px solid #b1dad5;
}

.category-item.keyboard-focus {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.08);
  -webkit-transform: scale(1.015);
  transform: scale(1.015);
}

.category-item.active {
  border: 3px solid #ffffff !important;
  background-color: rgba(255, 255, 255, 0.12);
  font-weight: bold;
  font-variation-settings: "wght" 700;
  color: #ffffff;
  border-radius: 10px;
}

.category-icon {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  margin-right: 15px;
}

.category-title {
  -webkit-flex: 1;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-variation-settings: "wght" 500;
  font-size: 2rem;
}

.category-count {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.6rem;
}

.category-icon[src=""],
.category-icon:not([src]) {
  display: none;
}

@media (max-width: 768px) {
  .category-icon {
    width: 28px;
    height: 28px;
  }

  .category-title {
    font-size: 14px;
  }

  .category-count {
    font-size: 12px;
  }
}

.search-navigation-hint {
  position: absolute;
  bottom: -36px;
  left: 40px;
  font-size: 1.4rem;
  color: #ffffff;
  opacity: 0.8;
  pointer-events: none;
}

.search-input-container {
  position: relative;
  margin-bottom: 30px;
}

.settings-actions {
  position: sticky;
  bottom: 0;
  width: 100%;
  padding: 20px 40px;
  background: linear-gradient(to top, #111111 0%, transparent 100%);
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.settings-save-btn {
  background: #ffffff;
  color: #000;
  border: none;
  padding: 20px 60px;
  border-radius: 8px;
  font-size: 2rem;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-save-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.4);
}

.settings-save-btn:active {
  transform: translateY(0);
}

.settings-save-btn.keyboard-focus {
  outline: none;
  background: #e0e0e0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
}

.settings-field-hint {
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}

.settings-field-error {
  font-size: 1.6rem;
  color: #ff3b30;
  margin-top: 6px;
  min-height: 20px;
}

.settings-input.error {
  border-color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
}

.settings-success-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  padding: 30px 60px;
  border-radius: 8px;
  font-size: 2.2rem;
  font-weight: bold;
  font-variation-settings: "wght" 700;
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.settings-success-message.show {
  opacity: 1;
}

#auth-login-input.keyboard-focus,
#auth-password-input.keyboard-focus {
  border-color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

#auth-submit-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.4);
}

#auth-submit-btn.keyboard-focus {
  background: #e0e0e0 !important;
  transform: scale(1.02) !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5) !important;
}

#loading-progress-bar {
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.confirm-button.keyboard-focus {
  box-shadow: 0 0 0 2px #ffffff, 0 0 10px rgba(255, 255, 255, 0.5);
}

/* =============================================
   CHANNEL LIST VIEW TRANSITIONS
   (categories ↔ channels)
   ============================================= */

#channel-list {
  overflow: hidden;
  /* clip during animation */
}

/* slide-in from right (categories → channels) */
#channel-list.slide-in-right {
  -webkit-animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* slide-in from left (channels → categories) */
#channel-list.slide-in-left {
  -webkit-animation: slideInLeft 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation: slideInLeft 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@-webkit-keyframes slideInRight {
  0% {
    opacity: 0.2;
    -webkit-transform: translateX(40px);
    transform: translateX(40px);
  }

  100% {
    opacity: 1;
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0.2;
    transform: translateX(40px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@-webkit-keyframes slideInLeft {
  0% {
    opacity: 0.2;
    -webkit-transform: translateX(-40px);
    transform: translateX(-40px);
  }

  100% {
    opacity: 1;
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0.2;
    transform: translateX(-40px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Restore overflow after animation */
#channel-list.anim-done {
  overflow-y: auto;
}