/* ============================================================
   GLOBAL
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: #0d0d0d;
  color: #fff;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.view {
  display: none;
  padding: 20px;
}

.view.active {
  display: block;
}

.df-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.df-modal-content {
  background: #111;
  padding: 0;
  width: 90%;
  max-width: 900px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(229, 9, 20, 0.3);
  animation: popIn 0.25s ease;
  position: relative;
}

.trailer-modal-title {
  font-size: 20px;
  font-weight: 700;
  padding: 16px 18px 10px;
  color: #fff;
  border-bottom: 1px solid #1f1f1f;
}

.df-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 32px;
  cursor: pointer;
  color: #fff;
  z-index: 10;
  transition: 0.2s;
}

.df-close:hover {
  color: #e50914;
}

#trailerFrame {
  width: 100%;
  height: 460px;
  background: #000;
}

.trailer-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 16px 16px;
  border-top: 1px solid #1f1f1f;
}

.trailer-modal-btn {
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.trailer-modal-btn:hover {
  border-color: #4a4a4a;
  background: #242424;
}

.trailer-modal-btn.primary {
  background: #e50914;
  border-color: #e50914;
}

.trailer-modal-btn.primary:hover {
  background: #b20710;
  border-color: #b20710;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.trailerBtn {
  margin-left: auto;
  min-height: 33px;
  margin-right: 10px;
  background: #e50914;
  color: white;
  border: none;
  padding-left: 18px;
  padding-right: 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s;
}

.trailerBtn:hover {
  background: #b20710;
}
/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
  width: 100%;
  height: 65px;
  background: #111;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 20px;
  border-bottom: 1px solid #222;
}

.logo {
  font-size: 26px;
  font-weight: bold;
  color: #e50914;
  cursor: pointer;
  user-select: none;
}

.anime-mode-toggle {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #3a3a3a;
  background: #1b1b1b;
  color: #ddd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s ease;
}

.anime-mode-toggle:hover,
.anime-mode-toggle:focus-visible {
  border-color: #e50914;
  color: #fff;
  outline: none;
}

.anime-mode-toggle.active {
  background: #e50914;
  border-color: #e50914;
  color: #fff;
}

.search-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 450px;
  min-width: 220px;
  position: relative;
}

#searchInput {
  width: 100%;
  padding: 8px 12px;
  border-radius: 4px;
  border: none;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
}

#searchInput:focus {
  outline: 2px solid #e50914;
}

#searchBtn {
  padding: 8px 12px;
  background: #e50914;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
  font-size: 15px;
}

.search-live-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #101010;
  border: 1px solid #2b2b2b;
  border-radius: 8px;
  overflow: hidden;
  z-index: 31000;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.45);
}

.search-live-panel.open {
  display: block;
}

.search-live-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.search-live-item + .search-live-item {
  border-top: 1px solid #1f1f1f;
}

.search-live-item:hover,
.search-live-item:focus-visible {
  background: #1a1a1a;
  outline: none;
}

.search-live-thumb {
  width: 34px;
  height: 50px;
  border-radius: 4px;
  background: #242424;
  object-fit: cover;
  flex: 0 0 auto;
}

.search-live-thumb-placeholder {
  background: #1f1f1f;
}

.search-live-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-live-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-live-meta {
  font-size: 12px;
  color: #9c9c9c;
}

.search-live-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #b5b5b5;
}

.search-live-more {
  border-top: 1px solid #1f1f1f;
  padding: 8px 12px;
  font-size: 12px;
  color: #9c9c9c;
}

.pages-menu {
  position: relative;
}

.pages-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #0f0f0f;
  border: 1px solid #232323;
  border-radius: 8px;
  padding: 8px;
  z-index: 30000;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.pages-menu.open .pages-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pages-item {
  width: 100%;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #fff;
  border-radius: 6px;
  min-height: 33px;
  padding: 6px 10px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.pages-item:hover,
.pages-item:focus-visible {
  border-color: #e50914;
  outline: none;
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */

.lang-switcher {
  display: flex;
  gap: 6px;
}

.lang-btn {
  padding: 6px 10px;
  background: #222;
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
}

.lang-btn.active {
  background: #e50914;
  border-color: #e50914;
}

.legacy-control {
  display: none !important;
}

/* ============================================================
   GRID
   ============================================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card {
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
}
.card-score-badge {
  position: absolute;
  right: 8px;
  top: 212px;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.card:hover {
  transform: scale(1.03);
}

.card-poster {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #222;
  -webkit-user-drag: none;
  user-select: none;
}

.card-body {
  padding: 8px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.score-ring {
  --score: 0;
  --score-color: #25d366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background:
    conic-gradient(var(--score-color) calc(var(--score) * 1%), #2f2f2f 0);
  box-shadow: 0 0 0 2px #0f0f0f;
}

.score-ring-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #101010;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.score-ring-sm {
  width: 34px;
  height: 34px;
}

.score-ring-sm .score-ring-inner {
  width: 27px;
  height: 27px;
  font-size: 9px;
}

.score-ring-lg {
  width: 52px;
  height: 52px;
}

.score-ring-lg .score-ring-inner {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.wl-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #e5e5e5;
}

.wl-btn.filled {
  color: #e50914;
}

.remove-btn {
  background: none;
  border: none;
  color: #e50914;
  font-size: 18px;
  cursor: pointer;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section h3 {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
}

#resultsView .section {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #222;
}

#resultsView .section:last-of-type {
  margin-bottom: 8px;
}

.section-subtext {
  margin-top: 6px;
  font-size: 13px;
  color: #b8b8b8;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  margin-top: 40px;
  text-align: center;
  font-size: 16px;
  opacity: 0.7;
}

/* ============================================================
   DETAIL VIEW
   ============================================================ */

.back-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  margin-bottom: 20px;
}

.detail-content {
  display: flex;
  gap: 30px;
}

.detail-left {
  flex: 2;
}

.detail-right {
  flex: 1;
}

.player-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}

.player-wrapper.stream-top-mask::before {
  content: none;
}

.player-wrapper.stream-top-mask iframe {
  height: calc(100% + var(--stream-top-mask-px, 30px));
  transform: translateY(calc(-1 * var(--stream-top-mask-px, 30px)));
}

.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-meta-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-title {
  font-size: 24px;
  font-weight: bold;
}

.detail-sub {
  opacity: 0.7;
  margin-top: 4px;
}
.detail-score-wrap {
  margin-top: 10px;
}

.watch-later-btn {
  padding: 6px 12px;
  background: #222;
  border: 1px solid #333;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.watch-later-btn:hover {
  background: #333;
}

.anime-audio-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 8px;
}

.anime-audio-btn {
  padding: 6px 10px;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  background: #1b1b1b;
  color: #ddd;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.anime-audio-btn:hover {
  border-color: #e50914;
  color: #fff;
}

.anime-audio-btn.active {
  background: #e50914;
  border-color: #e50914;
  color: #fff;
}

.detail-overview {
  margin-top: 20px;
  line-height: 1.5;
  opacity: 0.9;
}

/* ============================================================
   INFO PILLS
   ============================================================ */

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.info-pill {
  background: #222;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* ============================================================
   EPISODE LIST
   ============================================================ */

.selector-block {
  margin-bottom: 20px;
}

.selector-label {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 6px;
}

.selector-row {
  position: relative;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;      /* hoogte die jij wilt */
  overflow-y: auto;       /* scrollen inschakelen */
  padding-right: 6px;     /* ruimte voor scrollbar */

}

.df-select {
  position: relative;
  width: 100%;
}

.df-select-trigger {
  width: 100%;
  min-height: 33px;
  padding: 6px 10px;
  background: #111;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.df-select-trigger::after {
  content: "▾";
  opacity: 0.75;
  margin-left: 10px;
}

.df-select-trigger:hover,
.df-select-trigger:focus-visible {
  border-color: #e50914;
  outline: none;
}

.df-select-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: #0f0f0f;
  border: 1px solid #232323;
  border-radius: 8px;
  padding: 6px;
  z-index: 13000;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.df-select.open .df-select-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#sortingMenu {
  max-height: none;
  overflow-y: visible;
}

.df-select-option {
  width: 100%;
  min-height: 30px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.df-select-option:hover,
.df-select-option:focus-visible {
  border-color: #e50914;
  outline: none;
}

.df-select-option.active {
  border-color: #e50914;
  background: #1a1111;
}

.server-picker {
  width: 220px;
  position: relative;
  margin-left: auto;
}

.server-picker-toggle {
  width: 100%;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #fff;
  border-radius: 6px;
  min-height: 33px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 13px;
}

.server-picker-toggle:hover {
  border-color: #e50914;
}

.server-picker-caret {
  opacity: 0.7;
}

.server-picker-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  max-width: min(320px, calc(100vw - 20px));
  background: #0f0f0f;
  border: 1px solid #232323;
  border-radius: 8px;
  padding: 8px;
  z-index: 2000;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.server-picker.hidden-by-setting {
  display: none !important;
}

.server-picker.server-picker-floating {
  position: fixed !important;
  left: 0;
  top: 0;
  width: 0 !important;
  min-width: 0 !important;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.server-picker.hidden-by-setting.server-picker-floating {
  display: block !important;
}

.server-picker.hidden-by-setting.server-picker-floating .server-picker-toggle {
  display: none !important;
}

.server-picker.server-picker-floating .server-picker-panel {
  pointer-events: auto;
}

.server-picker-panel.server-picker-panel-floating {
  position: fixed !important;
  top: 76px;
  right: 10px;
  left: auto;
  width: min(320px, calc(100vw - 20px));
  max-width: min(320px, calc(100vw - 20px));
  z-index: 13000 !important;
}

.settings-menu {
  position: relative;
}

.top-menu-toggle {
  width: 40px;
  min-width: 40px;
  height: 33px;
  font-size: 19px;
  line-height: 1;
}

.top-menu-toggle .top-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.top-menu-toggle .top-menu-text {
  display: none;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.top-menu-icon-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.top-menu-toggle.text-mode {
  width: auto;
  min-width: 80px;
  padding: 0 10px;
  font-size: 13px;
  justify-content: center;
  gap: 6px;
}

.top-menu-toggle.text-mode .top-menu-icon {
  display: none;
}

.top-menu-toggle.text-mode .top-menu-text {
  display: flex;
  align-items: center;
}

.settings-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 320px;
  max-width: min(320px, calc(100vw - 20px));
  background: #0f0f0f;
  border: 1px solid #232323;
  border-radius: 8px;
  padding: 10px;
  z-index: 30000;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.settings-menu.open .settings-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-label {
  font-size: 13px;
  color: #d9d9d9;
}

.settings-select {
  min-width: 140px;
  height: 32px;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  background: #121212;
  color: #fff;
  padding: 0 8px;
}

.settings-select:hover,
.settings-select:focus {
  border-color: #e50914;
  outline: none;
}

.settings-select-wrap {
  min-width: 140px;
  width: auto;
}

.settings-select-trigger {
  min-width: 140px;
  width: auto;
  background: #121212;
  border-color: #2a2a2a;
  font-size: 13px;
  min-height: 32px;
}

.settings-select-menu {
  right: 0;
  left: auto;
  min-width: 180px;
  width: max-content;
  max-width: min(260px, calc(100vw - 40px));
}

#settingsLanguageMenu {
  max-height: 190px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #575757 #151515;
}

#settingsLanguageMenu::-webkit-scrollbar {
  width: 9px;
}

#settingsLanguageMenu::-webkit-scrollbar-track {
  background: #151515;
  border-radius: 999px;
}

#settingsLanguageMenu::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6b6b6b, #484848);
  border-radius: 999px;
  border: 2px solid #151515;
}

#settingsLanguageMenu::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #808080, #5a5a5a);
}

.settings-server-btn {
  min-width: 140px;
  height: 32px;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  background: #121212;
  color: #fff;
  padding: 0 8px;
  text-align: left;
  cursor: pointer;
}

.settings-server-btn:hover,
.settings-server-btn:focus-visible {
  border-color: #e50914;
  outline: none;
}

.settings-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #e50914;
  cursor: pointer;
}

.settings-note {
  font-size: 11px;
  line-height: 1.4;
  color: #a5a5a5;
  border-top: 1px solid #1d1d1d;
  padding-top: 8px;
}

.settings-danger-btn {
  border: 1px solid #6a1d21;
  background: #2c1113;
  color: #ffd8d8;
  border-radius: 6px;
  min-height: 33px;
  cursor: pointer;
  font-size: 13px;
}

.settings-danger-btn:hover,
.settings-danger-btn:focus-visible {
  border-color: #e50914;
  background: #46161a;
  outline: none;
}

.settings-secondary-btn {
  border: 1px solid #2f2f2f;
  background: #171717;
  color: #ececec;
  border-radius: 6px;
  min-height: 33px;
  cursor: pointer;
  font-size: 13px;
}

.settings-secondary-btn:hover,
.settings-secondary-btn:focus-visible {
  border-color: #e50914;
  outline: none;
}

.server-picker.open .server-picker-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.server-group-label {
  font-size: 11px;
  color: #a8a8a8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.server-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.server-select-btn {
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #fff;
  border-radius: 6px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  flex: 1;
  cursor: pointer;
  font-size: 13px;
}

.server-row.active .server-select-btn {
  border-color: #e50914;
  background: #1a1111;
}

.server-select-btn:hover {
  border-color: #e50914;
}

.server-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--server-dot-color, #e50914);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.12);
}

.server-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.server-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.server-score {
  min-width: 28px;
  text-align: right;
  color: #bcbcbc;
  font-size: 12px;
}

.server-star {
  border: 1px solid #2b2b2b;
  background: #131313;
  color: #8f8f8f;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.server-star:hover {
  border-color: #f6c945;
  color: #f6c945;
}

.server-star.active {
  border-color: #f6c945;
  color: #f6c945;
  background: #1a1710;
}

.server-star.disabled,
.server-star:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #2b2b2b;
  color: #707070;
}

.server-all-details {
  border-top: 1px solid #1f1f1f;
  padding-top: 2px;
  margin-top: -2px;
}

.server-all-details summary {
  cursor: pointer;
  font-size: 12px;
  color: #d7d7d7;
  list-style: none;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  background: #121212;
  min-height: 30px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.server-all-details summary::after {
  content: "▾";
  opacity: 0.85;
  transition: transform 0.16s ease;
}

.server-all-details[open] summary::after {
  transform: rotate(180deg);
}

.server-all-details summary:hover {
  border-color: #e50914;
}

.server-all-details summary::-webkit-details-marker {
  display: none;
}

.server-all-panel {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#serverSearchInput {
  width: 100%;
  border: 1px solid #2c2c2c;
  background: #101010;
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
}

#serverSearchInput:focus {
  outline: none;
  border-color: #e50914;
}

#serverAllList {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 2px;
}

.server-empty {
  color: #838383;
  font-size: 12px;
  padding: 4px 2px;
}


.episode-item {
  background: #111;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #222;
}

.episode-item.active {
  border-color: #e50914;
}

.episode-title {
  display: flex;
  justify-content: space-between;
}

.episode-badge-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-current {
  background: #e50914;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.badge-watched {
  background: #333;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.episode-progress {
  width: 100%;
  height: 4px;
  background: #222;
  border-radius: 4px;
  overflow: hidden;
}

.episode-progress-inner {
  height: 100%;
  background: #e50914;
}

/* ============================================================
   CONTEXT MENUS
   ============================================================ */

.context-menu {
  position: fixed;
  background: #111;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 4px 0;
  display: none;
  z-index: 9999;
  min-width: 240px;
  max-width: min(340px, calc(100vw - 16px));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.context-menu-header {
  padding: 10px 12px 8px;
}

.context-menu-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
  word-break: break-word;
}

.context-menu-meta {
  color: #c8c8c8;
  font-size: 12px;
}

.context-menu-genres {
  color: #a6a6a6;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.3;
  word-break: break-word;
}

.context-menu-separator {
  height: 1px;
  background: #242424;
  margin: 0 0 4px;
}

.context-action {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

.context-action:hover {
  background: #222;
}

/* ============================================================
   TOAST POPUP
   ============================================================ */

#df-toast {
  pointer-events: none;
}

/* ============================================================
   FEED STATUS
   ============================================================ */

.feed-status {
  text-align: center;
  padding: 12px 0 18px;
  color: #bbb;
  font-size: 14px;
}

.feed-status-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.feed-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #444;
  border-top-color: #e50914;
  border-radius: 50%;
  animation: df-spin 0.8s linear infinite;
}

.feed-retry-btn {
  background: #1b1b1b;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
}

.feed-retry-btn:hover {
  background: #252525;
}

@keyframes df-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   TV CHANNELS
   ============================================================ */

.tv-channel-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #232323;
  background: linear-gradient(145deg, #141414, #101010);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  height: 96px;
}

.tv-channel-open {
  width: 100%;
  background: radial-gradient(circle at 12% 10%, #222 0%, #181818 58%, #131313 100%);
  border: 1px solid #2f2f2f;
  color: #fff;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}

.tv-channel-open:hover {
  transform: translateY(-2px);
  border-color: #e50914;
  box-shadow: 0 12px 24px rgba(229, 9, 20, 0.22);
}

.tv-channel-logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(180deg, #0f0f0f, #191919);
  border: 1px solid #323232;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 46px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.tv-channel-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 0;
}

.tv-channel-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tv-channel-name {
  min-width: 0;
  overflow: hidden;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
  font-size: 15px;
  letter-spacing: 0.2px;
  max-height: calc(1.25em * 2);
}

.tv-channel-sub {
  margin-top: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  color: #9f9f9f;
  font-weight: 500;
}

.tv-channel-chevron {
  font-size: 22px;
  color: #888;
  line-height: 1;
  margin-left: 4px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.tv-channel-open:hover .tv-channel-chevron {
  color: #fff;
  transform: translateX(3px);
}

.tv-empty {
  grid-column: 1 / -1;
  color: #9f9f9f;
  font-size: 14px;
  padding: 16px 2px;
}

#tvPlayerView {
  padding-top: 14px;
}

#tvChannelsView h2,
#tvPlayerView h2,
#tvLivePlayerView h2 {
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}

#tvPlayerView {
  --tv-stack-height: min(76vh, 860px);
  --tv-timeline-total-height: 156px;
  --tv-player-timeline-gap: 12px;
}

#shortsView h2 {
  margin-bottom: 12px;
}

#shortsView {
  height: calc(100dvh - var(--topbar-height, 65px));
  padding-top: 8px;
  padding-bottom: 8px;
  overflow: hidden;
}

.shorts-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 880px);
  gap: 12px;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
}

.shorts-settings-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shorts-settings-toggle {
  display: none;
  min-height: 34px;
  border: 1px solid #2f2f2f;
  background: #181818;
  color: #fff;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.shorts-settings-toggle:hover,
.shorts-settings-toggle:focus-visible {
  border-color: #e50914;
  outline: none;
}

.shorts-settings-panel {
  border: 1px solid #232323;
  border-radius: 12px;
  background: linear-gradient(180deg, #121212, #0f0f0f);
  padding: 10px;
  overflow: visible;
  min-height: 0;
  max-height: 100%;
  position: relative;
  z-index: 20;
}

.shorts-player-shell {
  width: min(100%, 880px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  border: 1px solid #232323;
  border-radius: 12px;
  background: linear-gradient(180deg, #121212, #0f0f0f);
  padding: 12px 70px 12px 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  max-height: 100%;
  overflow: hidden;
}

.shorts-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.shorts-filter-section {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  background: #121212;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shorts-filter-section-title {
  margin: 0;
  font-size: 13px;
  color: #f0f0f0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.shorts-filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shorts-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: #ddd;
  font-size: 13px;
}

.shorts-filter-label {
  font-size: 12px;
  color: #b8b8b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.shorts-media-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.shorts-media-btn {
  min-height: 34px;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  background: #171717;
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.shorts-media-btn:hover,
.shorts-media-btn:focus-visible {
  border-color: #e50914;
  color: #fff;
  outline: none;
}

.shorts-media-btn.active {
  border-color: #e50914;
  background: linear-gradient(180deg, #2a1214, #180b0c);
  color: #fff;
}

.shorts-genre-select .df-select-trigger {
  min-height: 34px;
}

#shortsGenreMenu {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e50914 #171717;
}

#shortsGenreMenu::-webkit-scrollbar {
  width: 10px;
}

#shortsGenreMenu::-webkit-scrollbar-track {
  background: #171717;
  border-radius: 999px;
}

#shortsGenreMenu::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff3b45, #e50914);
  border-radius: 999px;
  border: 2px solid #171717;
}

#shortsGenreMenu::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff5963, #ff1d29);
}

.shorts-year-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#shortsYearFrom {
  width: 100%;
  accent-color: #e50914;
}

#shortsScoreFrom {
  width: 100%;
  accent-color: #e50914;
}

.shorts-year-value {
  min-width: 46px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.shorts-scroll-feedback {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%) translateY(-4px);
  z-index: 6;
  pointer-events: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2f2f2f;
  background: rgba(10, 10, 10, 0.85);
  color: #f2f2f2;
  opacity: 0;
}

.shorts-scroll-feedback.show {
  animation: shortsFeedbackPop 0.28s ease;
}

.shorts-player-shell.shorts-transition-next {
  animation: shortsShiftNext 0.24s ease;
}

.shorts-player-shell.shorts-transition-prev {
  animation: shortsShiftPrev 0.24s ease;
}

@keyframes shortsShiftNext {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-10px); opacity: 0.88; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes shortsShiftPrev {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.88; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes shortsFeedbackPop {
  0% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  35% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(2px); }
}

.shorts-side-nav {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shorts-side-toggle {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #cfcfcf;
  user-select: none;
}

.shorts-side-toggle .settings-checkbox {
  width: 14px;
  height: 14px;
}

.shorts-nav-btn {
  width: 44px;
  height: 44px;
  border: 1px solid #2f2f2f;
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shorts-nav-btn:hover,
.shorts-nav-btn:focus-visible {
  border-color: #e50914;
  outline: none;
}

.shorts-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #2a2a2a;
}

.shorts-player-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

#shortsFrame {
  width: 100%;
  height: 100%;
  border: 0;
}

.shorts-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shorts-meta h3 {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
}

.shorts-subtext {
  font-size: 13px;
  color: #b8b8b8;
}

.shorts-overview {
  font-size: 14px;
  color: #ddd;
  line-height: 1.45;
}

.shorts-actions {
  display: flex;
  gap: 10px;
}

.shorts-actions .trailer-modal-btn {
  flex: 1;
}

.tv-watch-layout {
  display: flex;
  gap: 30px;
  align-items: stretch;
}

.tv-watch-left {
  flex: 2;
}

.tv-watch-right {
  flex: 1;
  min-width: 280px;
  height: var(--tv-stack-height);
}

.tv-watch-right .selector-block {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
}

#tvChannelsSidebarLabel.selector-label {
  margin-bottom: 8px;
  flex: 0 0 auto;
}

.tv-player-wrap {
  position: relative;
  width: 100%;
  height: calc(var(--tv-stack-height) - var(--tv-timeline-total-height) - var(--tv-player-timeline-gap));
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid #232323;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

#tvPlayerFrame {
  width: 100%;
  height: 100%;
  border: 0;
}

.tv-timeline {
  margin-top: var(--tv-player-timeline-gap);
  border: 1px solid #252525;
  border-radius: 12px;
  background: linear-gradient(180deg, #121212, #0f0f0f);
  padding: 10px;
  min-height: var(--tv-timeline-total-height);
  width: 100%;
  overflow: hidden;
}

.tv-timeline-track {
  min-height: 132px;
  overflow: visible;
}

.tv-timeline-canvas {
  position: relative;
  width: 100%;
  min-height: 118px;
}

.tv-timeline-ruler {
  position: relative;
  height: 28px;
  border-bottom: 1px solid #2a2a2a;
}

.tv-timeline-hour {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #2d2d2d;
}

.tv-timeline-hour-label {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 11px;
  color: #9e9e9e;
  white-space: nowrap;
}

.tv-timeline-program-layer {
  position: relative;
  height: 82px;
  margin-top: 8px;
}

.tv-timeline-item {
  position: absolute;
  top: 0;
  border: 1px solid #333;
  border-radius: 8px;
  background: #171717;
  padding: 8px 10px;
  height: 78px;
  overflow: hidden;
}

.tv-timeline-item.active {
  border-color: #e50914;
  background: linear-gradient(180deg, #2a1213, #1d1010);
}

.tv-timeline-time {
  font-size: 11px;
  color: #a6a6a6;
  margin-bottom: 4px;
}

.tv-timeline-title {
  font-size: 13px;
  color: #fff;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tv-timeline-tooltip-portal {
  position: fixed;
  z-index: 10020;
  width: min(320px, 65vw);
  background: #0f0f0f;
  border: 1px solid #2d2d2d;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48);
  padding: 10px;
  pointer-events: none;
}

.tv-timeline-tooltip-time {
  color: #b3b3b3;
  font-size: 11px;
  margin-bottom: 5px;
}

.tv-timeline-tooltip-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tv-timeline-tooltip-desc {
  color: #d0d0d0;
  font-size: 12px;
  line-height: 1.35;
  max-height: 120px;
  overflow: auto;
}

.tv-timeline-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e50914;
  box-shadow: 0 0 8px rgba(229, 9, 20, 0.6);
  pointer-events: none;
}

.tv-player-menu {
  background: linear-gradient(180deg, #121212, #0f0f0f);
  border: 1px solid #252525;
  border-radius: 12px;
  padding: 12px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#tvChannelSearchInput {
  width: 100%;
  background: #171717;
  color: #fff;
  border: 1px solid #303030;
  border-radius: 8px;
  padding: 10px 12px;
}

#tvChannelSearchInput:focus {
  outline: none;
  border-color: #e50914;
}

.tv-channel-menu-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.tv-channel-menu-item {
  border: 1px solid #333;
  background: #171717;
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
  width: 100%;
  text-align: left;
}

.tv-channel-menu-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tv-channel-menu-sub {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  color: #a6a6a6;
}

.tv-channel-menu-item:hover {
  border-color: #e50914;
  background: #1e1e1e;
  transform: translateX(2px);
}

.tv-channel-menu-item.active {
  background: linear-gradient(180deg, #2a1213, #1d1010);
  border-color: #e50914;
  box-shadow: inset 0 0 0 1px rgba(229, 9, 20, 0.2);
}

.tv-channel-menu-logo {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: contain;
  background: #fff;
  flex: 0 0 20px;
}

.tv-live-section {
  margin: 2px 0 16px;
}

.tv-sports-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin-bottom: 4px;
}

.tv-sports-filter::-webkit-scrollbar {
  height: 6px;
}

.tv-sports-filter::-webkit-scrollbar-track {
  background: #141414;
  border-radius: 999px;
}

.tv-sports-filter::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 999px;
}

.tv-sport-btn {
  border: 1px solid #2f2f2f;
  background: #151515;
  color: #d8d8d8;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tv-sport-btn:hover {
  border-color: #e50914;
}

.tv-sport-btn.active {
  background: #e50914;
  color: #fff;
  border-color: #e50914;
}

.tv-home-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 2px 0 14px;
  padding: 4px;
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  background: #121212;
}

.tv-home-tab {
  border: 0;
  background: transparent;
  color: #bdbdbd;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.tv-home-tab.active {
  background: #e50914;
  color: #fff;
}

.tv-home-panel {
  display: none;
}

.tv-home-panel.active {
  display: block;
}

.tv-live-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.tv-live-timeline {
  display: none;
}

.tv-live-group-list {
  display: grid;
  gap: 14px;
}

.tv-live-group-heading {
  margin: 2px 0 0;
  font-size: 12px;
  letter-spacing: 0.25px;
  color: #c7c7c7;
  text-transform: uppercase;
}

.tv-live-timeline-items {
  display: grid;
  gap: 8px;
}

.tv-live-timeline-item {
  width: 100%;
  border: 1px solid #2d2d2d;
  border-radius: 10px;
  background: #121212;
  color: #fff;
  display: grid;
  grid-template-columns: 56px 12px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.tv-live-timeline-item:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.tv-live-timeline-time {
  font-size: 12px;
  color: #a9a9a9;
  font-weight: 700;
}

.tv-live-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7c7c7c;
  box-shadow: 0 0 0 3px rgba(124, 124, 124, 0.25);
}

.tv-live-timeline-dot.is-live {
  background: #e50914;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.25);
}

.tv-live-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tv-live-timeline-title {
  font-size: 13px;
  font-weight: 700;
}

.tv-live-timeline-sub {
  font-size: 11px;
  color: #ababab;
}

.tv-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.tv-live-card {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(229, 9, 20, 0.09), rgba(19, 19, 19, 1));
}

.tv-live-poster-wrap {
  position: relative;
  margin-bottom: 8px;
}

.tv-live-poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #2f2f2f;
}

.tv-live-poster-fallback {
  background: linear-gradient(135deg, #1a1a1a, #111);
}

.tv-live-time-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px);
}

.tv-live-live-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: #e50914;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 16px rgba(229, 9, 20, 0.45);
}

.tv-live-hot-chip {
  position: absolute;
  top: 8px;
  left: 60px;
  font-size: 14px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tv-live-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tv-live-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: #e50914;
  color: #fff;
}

.tv-live-pill.is-upcoming {
  background: #2f2f2f;
  color: #e7e7e7;
}

.tv-live-popular {
  font-size: 10px;
  color: #ffbd6b;
  border: 1px solid rgba(255, 189, 107, 0.4);
  border-radius: 999px;
  padding: 2px 7px;
}

.tv-live-title {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.tv-live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #a8a8a8;
  margin-bottom: 10px;
}

.tv-live-open-btn {
  width: 100%;
  border: 1px solid #393939;
  border-radius: 9px;
  background: #171717;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.tv-live-open-btn:hover {
  border-color: #e50914;
  transform: translateY(-1px);
}

.tv-live-open-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.tv-live-player-wrap {
  position: relative;
  width: 100%;
  height: min(72vh, 860px);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid #232323;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

#tvLivePlayerFrame {
  width: 100%;
  height: 100%;
  border: 0;
}

.tv-live-player-sources {
  margin-top: 12px;
}

.tv-live-player-sources h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #d0d0d0;
  font-weight: 600;
}

.tv-live-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tv-live-source-btn {
  border: 1px solid #323232;
  background: #171717;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.tv-live-source-btn:hover {
  border-color: #e50914;
}

.tv-live-source-btn.active {
  border-color: #e50914;
  background: #2a1214;
}

#tvChannelsGrid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.tv-channel-menu-list::-webkit-scrollbar {
  width: 8px;
}

.tv-channel-menu-list::-webkit-scrollbar-track {
  background: #131313;
  border-radius: 999px;
}

.tv-channel-menu-list::-webkit-scrollbar-thumb {
  background: #353535;
  border-radius: 999px;
}

.tv-channel-menu-list::-webkit-scrollbar-thumb:hover {
  background: #464646;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .detail-content {
    flex-direction: column;
  }

  .tv-watch-layout {
    flex-direction: column;
    gap: 14px;
  }

  .tv-watch-right {
    min-width: 0;
    height: auto;
  }

  .tv-watch-right .selector-block {
    height: auto;
  }

  .tv-player-menu {
    height: auto;
  }

  .player-wrapper {
    height: 280px;
  }
}

@media (max-width: 600px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 10px;
    gap: 10px;
  }

  .logo {
    order: 1;
    flex: 0 0 auto;
  }

  .search-area {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: auto;
  }

  .search-area #searchInput {
    flex: 1;
  }

  .anime-mode-toggle {
    order: 3;
  }

  .server-picker {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
  }

  .burger-container,
  .pages-menu,
  .settings-menu {
    order: 4;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .trailer-modal-actions {
    flex-direction: column;
  }

  .trailer-modal-btn {
    width: 100%;
  }

  .server-picker {
    width: 100%;
    margin-left: 0;
  }

  .server-picker-panel {
    left: 0;
    right: auto;
    width: 100%;
    max-width: 100%;
  }

  .server-picker-panel.server-picker-panel-floating {
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .settings-menu {
    width: auto;
    position: static;
  }

  .pages-menu {
    position: static;
  }

  .settings-panel {
    position: absolute;
    left: 0 !important;
    right: auto !important;
    width: 230px !important;
    max-width: 100vw !important;
  }

  .pages-panel {
    position: absolute;
    left: 0 !important;
    right: auto !important;
    width: 230px !important;
    max-width: 100vw !important;
  }

  .genre-menu {
    position: fixed;
    left: 0 !important;
    right: 0 !important;
    width: 230px !important;
    max-width: 100vw !important;
  }

  .tv-player-wrap {
    height: 52vh;
  }

  .tv-live-player-wrap {
    height: 52vh;
  }

  .tv-channel-menu-list {
    max-height: 280px;
    flex: unset;
  }

  .tv-channel-open {
    padding: 12px;
    gap: 10px;
  }

  .tv-channel-logo-wrap {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .tv-channel-name {
    font-size: 14px;
    -webkit-line-clamp: 3;
  }

  .tv-live-grid {
    grid-template-columns: 1fr;
  }

  .tv-live-timeline-item {
    grid-template-columns: 50px 12px 1fr;
  }

  #tvChannelsGrid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .shorts-player-shell {
    width: 100%;
    border-radius: 10px;
    padding: 10px;
  }

  .shorts-layout {
    grid-template-columns: 1fr;
    gap: 10px;
    align-content: start;
  }

  .shorts-settings-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .shorts-settings-panel {
    display: none;
    max-height: min(48vh, 360px);
    overflow: visible;
  }

  .shorts-settings-panel.open {
    display: block;
  }

  .shorts-filters {
    grid-template-columns: 1fr;
  }

  .shorts-side-nav {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
  }

  .shorts-scroll-feedback {
    top: 10px;
  }

  .shorts-actions {
    flex-direction: column;
  }
}

.episode-list::-webkit-scrollbar {
  width: 8px;
}

.episode-list::-webkit-scrollbar-track {
  background: #111;
}

.episode-list::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

.episode-list::-webkit-scrollbar-thumb:hover {
  background: #444;
}
#serverAllList::-webkit-scrollbar {
  width: 8px;
}

#serverAllList::-webkit-scrollbar-track {
  background: #111;
}

#serverAllList::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

#serverAllList::-webkit-scrollbar-thumb:hover {
  background: #444;
}

.burger-container {
  position: relative;
}

.burger-btn {
  height: 33px;                       /* ✔ exact 33px */
  width: 40px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
  backdrop-filter: blur(6px);         /* ✔ Plex‑achtige glaslook */
}

.burger-btn:hover,
.burger-btn:focus {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}


/* Het menu zelf */
.genre-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  background: #0f0f0f;
  border: 1px solid #232323;
  border-radius: 8px;
  padding: 8px;
  width: 240px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 30000;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  animation: fadeIn 0.2s ease-out;
}
.genre-barholder{
	width: 220px;
	flex-direction: row;
}
.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 4px;
}
.genre-list::-webkit-scrollbar {
  display: none;
}
.genre-loading {
  color: #bdbdbd;
  font-size: 13px;
  padding: 6px 2px;
}
.genre-bar{
	width: 110px;
	flex-direction: column;
	float: left;
}

.genre-menu h3 {
  color: #fff;
  margin: 0 0 6px 0;
  font-size: 14px;
}


.genre-item {
  width: auto;
  margin-top: 0;
  background: #121212;
  color: #fff;
  border: 1px solid #2a2a2a;
  padding: 6px 10px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}
.genre-item.active {
  background: #1a1111;
  border-color: #e50914;
}

.genre-item:hover,
.genre-item:focus {
  background: #1a1111;
  border-color: #e50914;
}

/* Animatie */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
