/* MOVIZANO Player - Harmonized Subtitle Dropdown & Multi-Release UI */
#filemoon-animals-player .subtitle-panel {
  background: rgba(18, 20, 26, 0.96) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06) inset !important;
  padding: 14px 16px !important;
  box-sizing: border-box !important;
  width: min(390px, calc(100% - 16px)) !important;
  max-width: 410px !important;
  max-height: 480px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 120 !important;
}

/* Hide original flat elements */
#filemoon-animals-player .subtitle-panel > .subtitle-header,
#filemoon-animals-player .subtitle-panel > .subtitle-search,
#filemoon-animals-player .subtitle-panel > .track-options,
#filemoon-animals-player .subtitle-panel > .font-controls {
  display: none !important;
}

.mz-dropdown-subtitles-ui {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  color: #fff;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}

/* Header Tabs */
.mz-sub-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.mz-tab-links {
  display: flex;
  gap: 22px;
}

.mz-sub-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 2px 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.02em;
}

.mz-sub-tab:hover {
  color: #ffffff;
}

.mz-sub-tab.active {
  color: #ffffff;
}

.mz-sub-tab.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: #e50914;
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.7);
}

.mz-sub-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.mz-sub-close:hover {
  color: #fff;
  background: #e50914;
  border-color: #e50914;
  transform: scale(1.05);
}

/* Off Button */
.mz-sub-off-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: #f3f4f6;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 14px;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mz-sub-off-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.mz-sub-off-btn.active {
  background: rgba(229, 9, 20, 0.18);
  border-color: rgba(229, 9, 20, 0.5);
  color: #ffffff;
}

.mz-off-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 13px;
  color: #e50914;
  visibility: hidden;
  font-weight: 900;
}

.mz-sub-off-btn.active .mz-off-check {
  visibility: visible;
}

/* Search by Language Label */
.mz-search-lang-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

/* Select Dropdown */
.mz-lang-select-wrap {
  position: relative;
  margin-bottom: 12px;
}

.mz-lang-select {
  width: 100%;
  background: rgba(11, 12, 17, 0.95);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) inset;
}

.mz-lang-select:focus,
.mz-lang-select:hover {
  border-color: #e50914;
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.25), 0 2px 8px rgba(0, 0, 0, 0.4) inset;
}

.mz-lang-select option {
  background: #14161f;
  color: #fff;
  padding: 8px;
}

.mz-lang-select-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
  transition: border-top-color 0.2s;
}

.mz-lang-select-wrap:hover::after {
  border-top-color: #e50914;
}

/* Releases List */
.mz-releases-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.mz-releases-list::-webkit-scrollbar {
  width: 4px;
}
.mz-releases-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.mz-releases-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}
.mz-releases-list::-webkit-scrollbar-thumb:hover {
  background: #e50914;
}

.mz-release-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.mz-release-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.mz-release-item.active {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.22) 0%, rgba(229, 9, 20, 0.08) 100%);
  border-color: #e50914;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.3);
}

.mz-rel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5;
  letter-spacing: 0.01em;
}

.mz-release-item.active .mz-rel-name {
  color: #ffffff;
  font-weight: 700;
}

.mz-rel-match {
  background: rgba(234, 179, 8, 0.14);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
  padding: 1.5px 6.5px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mz-rel-downloads {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.mz-rel-empty {
  padding: 18px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

/* Options Tab (Subtitle Size) */
.mz-tab-content-opts {
  padding: 6px 2px;
}

.mz-opts-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.mz-opts-row > span {
  font-size: 14px;
  font-weight: 700;
  color: #f3f4f6;
}

.mz-opts-size-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mz-opts-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.18s;
  line-height: 1;
}

.mz-opts-btn:hover {
  background: #e50914;
  border-color: #e50914;
  color: #ffffff;
  transform: scale(1.05);
}

.mz-opts-size-val {
  min-width: 44px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
