@import url(./reset.css);

* {
  box-sizing: border-box;
}

body {
  position: relative;
  font-family: "Inter", sans-serif;
  background: #12153A;
  color: #fff;
  height: 100vh;
  overflow-y: hidden;
  overflow-x: hidden;
  padding: 15px;
}

.wrapper {
  display: flex;
  gap: 10px;
  height: 100%;
}

.channel-list-part {
  flex: 1 1 20%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.video-section {
  flex: 2;
  display: grid;
  grid-template-rows: 2fr 1fr;
}

.logo-img {
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
  margin-bottom: 10px;
  padding-left: 40px;
  padding-right: 50px;
}

#channel-header-title-container {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.channel-list__title {
  font-size: 1.2rem;
  text-align: left;
  margin-top: 20px;
  margin-bottom: 10px;
  padding-left: 45px;
}

#channel-list {
  position: relative;
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px 15px 15px 30px;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Channel List Styles */
.channel {
  position: relative;
  width: 100%;
  display: block;
  background: transparent;
  color: white;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  transition: 0.3s;
  font-size: 1.5rem;
}

.channel:hover {
  border: 2px solid #b1dad5;
}

.channel.active {
  border: 2px solid #03dac6;
  font-weight: bold;
  color: #03dac6;
}

.channel.keyboard-focus {
  outline: 2px solid #fff;
  background-color: #384252;
  transform: scale(1.02);
  transition: all 0.1s ease-in-out;
}

/* Video Container Styles */
#video-container {
  position: relative;
}

#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 #00c3ff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Schedule Styles */
.schedule-title {
  text-align: left;
  font-size: 1.2rem;
  color: #00c3ff;
  margin-bottom: 10px;
}

.schedule-list {
  overflow: auto;
  padding: 10px 20px;
}

.schedule-list li {
  padding: 10px 15px;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-list li:hover {
  outline: 1px solid white;
}

#schedule-list li.active-program {
  border: 2px solid #03dac6;
  font-weight: bold;
  color: #03dac6;
}

#schedule-list li.keyboard-focus {
  outline: 2px solid #fff;
  background-color: #384252;
  transform: scale(1.02);
  transition: all 0.1s ease-in-out;
}

#schedule-list li.current-program {
  font-weight: bold;
  color: #ffffff;
}

#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: 16px;
  height: 16px;
}

.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: 20px;
}

.program-time {
  white-space: nowrap;
  margin-right: 15px;
}

.icons-container {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.program-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-left: 6px;
}

.live-text {
  margin-left: 2px;
  font-size: 14px;
}

.red {
  color: #eb5757ff;
}

.rec {
  margin-right: 38px;
}

.record-icon {
  width: 30px;
  height: 30px;
  float: right;
  margin: 0 4px 0 0;
  position: relative;
  top: 50%;
}

.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: #12153A;
  display: flex;
  gap: 15px;
  padding: 10px 15px;
  border-radius: 15px;
  overflow: hidden;
}

.search,
.settings {
  background-size: contain;
  background-repeat: no-repeat;
  aspect-ratio: 1/1;
  width: 30px;
  height: 30px;
  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: 25px;
}

#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;
}

#curent-program-title:empty {
  display: none;
}

/* Back Button */
.back {
  position: fixed;
  top: 50%;
  left: 0;
  background: transparent;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  z-index: 2;
  transition: all 0.3s ease;
}

.back:hover {
  transform: scale(1.01);
}

/* 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: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-btn img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: cover;
}

.control-btn.keyboard-focus {
  outline: 3px solid #03dac6;
  outline-offset: 3px;
  background-color: rgba(3, 218, 198, 0.2);
  transform: scale(1.1);
  transition: all 0.2s ease-in-out;
  animation: pulse-focus 2s infinite;
  border-radius: 4px;
}

#go-to-live-btn.hidden-control {
  display: none !important;
}

@keyframes pulse-focus {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(3, 218, 198, 0.7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(3, 218, 198, 0);
  }
}

/* Fullscreen Controls Layout */
.controls-main {
  display: flex;
  justify-content: space-between;
  padding: 30px 140px 15px;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.controls-bottom {
  margin-top: 10px;
  padding: 0 140px;
  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(18, 21, 58, 0.9);
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  font-size: 0.95rem;
}

.video-controls.fullscreen-active .control-btn img {
  filter: brightness(0) invert(1);
  width: 24px;
  height: 24px;
}

.video-controls.fullscreen-active .control-btn:hover {
  background-color: rgba(3, 218, 198, 0.4);
  border-color: #03dac6;
  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: 8px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.video-timeline::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.video-timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #03dac6;
  cursor: pointer;
  border-radius: 50%;
  margin-top: -5px;
  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: #00fff5;
  box-shadow: 0 0 12px rgba(3, 218, 198, 0.8);
}

.video-timeline::-moz-range-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  border: none;
}

.video-timeline::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #03dac6;
  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: #00fff5;
  box-shadow: 0 0 12px rgba(3, 218, 198, 0.8);
}

.video-timeline::-moz-range-progress {
  background: #03dac6;
  height: 8px;
  border-radius: 4px;
}

.time-panel {
  display: flex;
  color: #fff;
  gap: 5px;
  align-items: center;
}

.time-label {
  font-family: monospace;
}

.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;
}

/* Full Schedule Modal Styles */
.full-schedule-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #212121;
  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: 1.8rem;
  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: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.full-schedule-back-btn img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.full-schedule-back-btn:hover {
  outline: 3px solid #03dac6;
}

.full-schedule-back-btn.keyboard-focus {
  outline: 3px solid #03dac6;
}

.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: 1.3rem;
  font-weight: bold;
  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: 60px;
  height: 60px;
  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: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

.date-nav-btn:hover:not(:disabled) {
  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-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.full-schedule-program-item {
  padding: 14px 18px;
  border: 2px solid transparent;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: default;
  transition: all 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
}

.full-schedule-program-item.keyboard-focus {
  border: 2px solid #03dac6;
}

.full-schedule-program-item.rewind-available {
  cursor: pointer;
}

.full-schedule-program-item.rewind-available:hover {
  border-color: rgba(3, 218, 198, 0.5);
}

.full-schedule-program-item.current-playing {
  background: rgba(3, 218, 198, 0.2);
  border-color: #03dac6;
  font-weight: bold;
}

.full-schedule-program-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 20px;
}

.full-schedule-program-time {
  color: white;
  font-weight: 600;
  min-width: 130px;
  font-size: 0.95rem;
}

.full-schedule-program-title {
  color: #fff;
  flex: 1;
  font-size: 1rem;
}

.full-schedule-program-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.full-schedule-status-badge {
  font-size: 0.8em;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: bold;
  text-transform: uppercase;
}

.full-schedule-status-live {
  background: #ff3b30;
  color: white;
  font-size: 0.75em;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.full-schedule-status-icon {
  width: 18px;
  height: 18px;
  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: #212121;
  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: 1.8rem;
  color: white;
  margin: 0;
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.settings-title-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.settings-spacer {
  width: 120px;
}

.settings-back-btn {
  background: transparent;
  color: #fff;
  border: 2px solid white;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-back-btn img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.settings-back-btn:hover {
  outline: 3px solid #03dac6;
}

.settings-back-btn.keyboard-focus {
  outline: 3px solid #03dac6;
  background-color: rgba(3, 218, 198, 0.1);
}

.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: 1.4rem;
  color: #fff;
  margin: 0 0 10px 0;
  font-weight: 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;
}

.settings-input {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
}

.settings-input:focus {
  outline: none;
  border-color: #03dac6;
  background: rgba(255, 255, 255, 0.08);
}

.settings-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.settings-input.keyboard-focus {
  border-color: #03dac6;
  background: rgba(3, 218, 198, 0.1);
  box-shadow: 0 0 0 3px rgba(3, 218, 198, 0.2);
}

.settings-number-input {
  width: 100%;
  max-width: 200px;
  font-weight: 600;
  text-align: center;
  font-size: 1.2rem;
}

/* 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: #212121;
  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: 1.8rem;
  color: white;
  margin: 0;
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.search-title-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.search-spacer {
  width: 120px;
}

.search-back-btn {
  background: transparent;
  color: #fff;
  border: 2px solid white;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-back-btn img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.search-back-btn:hover {
  outline: 3px solid #03dac6;
}

.search-back-btn.keyboard-focus {
  outline: 3px solid #03dac6;
  background-color: rgba(3, 218, 198, 0.1);
}

.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: 16px 20px;
  color: #fff;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: #03dac6;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(3, 218, 198, 0.2);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-input.keyboard-focus {
  border-color: #03dac6;
  background: rgba(3, 218, 198, 0.1);
  box-shadow: 0 0 0 4px rgba(3, 218, 198, 0.2);
}

.search-input-hint {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  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: 16px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item:hover {
  border-color: rgba(3, 218, 198, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.search-result-item.keyboard-focus {
  border-color: #03dac6;
  background: rgba(3, 218, 198, 0.1);
  box-shadow: 0 0 0 3px rgba(3, 218, 198, 0.2);
}

.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: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.search-result-meta {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.search-result-channel {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-result-channel-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

.search-result-time {
  font-weight: 500;
}

.search-result-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-status-badge {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  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: 1.2rem;
  margin-bottom: 8px;
}

.search-empty-hint {
  font-size: 0.9rem;
  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 #03dac6;
  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: 0.85rem;
  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: 3rem;
  font-weight: 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 #03dac6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 60px;
}

.category-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.category-title {
  flex: 1;
  text-align: left;
  font-weight: 500;
}

.category-count {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  flex-shrink: 0;
}

.category-item:hover .category-icon,
.category-item.keyboard-focus .category-icon {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.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: -24px;
  left: 40px;
  font-size: 12px;
  color: #03dac6;
  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, #212121 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: #03dac6;
  color: #000;
  border: none;
  padding: 14px 40px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-save-btn:hover {
  background: #00fff5;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(3, 218, 198, 0.4);
}

.settings-save-btn:active {
  transform: translateY(0);
}

.settings-save-btn.keyboard-focus {
  outline: 3px solid #fff;
  background: #00fff5;
  box-shadow: 0 0 0 5px rgba(3, 218, 198, 0.3);
}

.settings-field-hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}

.settings-field-error {
  font-size: 0.9rem;
  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(3, 218, 198, 0.95);
  color: #000;
  padding: 20px 40px;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  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: #03dac6 !important;
  background: rgba(3, 218, 198, 0.1) !important;
  box-shadow: 0 0 0 3px rgba(3, 218, 198, 0.2);
}

#auth-submit-btn:hover {
  background: #00fff5;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(3, 218, 198, 0.4);
}

#auth-submit-btn.keyboard-focus {
  background: #00fff5 !important;
  transform: scale(1.02) !important;
  box-shadow: 0 0 20px rgba(3, 218, 198, 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 #03dac6, 0 0 10px rgba(3, 218, 198, 0.5);
}