/* ==========================================================
   زیرمجموعه گیری - پنل کاربری
   ========================================================== */
.panel-referral {
  width: 100%;
  display: block;
}

.panel-referral .ref-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.panel-referral .ref-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #f4f6fb;
  border-radius: 20px;
  padding: 15px;
}

.panel-referral .ref-stats .stat-item .icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
}

.panel-referral .ref-stats .stat-item .icon.yellow {
  background: linear-gradient(150deg, #ffab00, #ff9800);
}

.panel-referral .ref-stats .stat-item .icon.purple {
  background: linear-gradient(150deg, #5c6bc0, #ff4081);
}

.panel-referral .ref-stats .stat-item .icon.blue {
  background: linear-gradient(150deg, #42a5f5, #5c6bc0);
}

.panel-referral .ref-stats .stat-item .icon.green {
  background: linear-gradient(150deg, #689f38, #0097a7);
}

.panel-referral .ref-stats .stat-item .content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel-referral .ref-stats .stat-item .count {
  color: #222;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
}

.panel-referral .ref-stats .stat-item .title {
  color: #888;
  font-size: 13px;
}

.panel-referral .ref-invite {
  margin-top: 20px;
  padding: 20px;
  border-radius: 20px;
  background-color: #fff8ec;
  border: 1px dashed #ffcc80;
}

.panel-referral .ref-invite .title {
  font-size: 17px;
  font-weight: 700;
  color: #222;
}

.panel-referral .ref-invite .desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 2;
  color: #666;
}

.panel-referral .ref-invite .desc b {
  color: #ff9800;
  font-weight: 700;
}

.panel-referral .ref-invite .invite-link {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.panel-referral .ref-invite .invite-link .link-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  color: #444;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  outline: 0;
  direction: ltr;
  text-align: left;
}

.panel-referral .ref-invite .invite-link .copy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  color: #fff;
  background-color: #ff9800;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.3s background-color;
  -webkit-transition: 0.3s background-color;
}

.panel-referral .ref-invite .invite-link .copy-link:hover {
  background-color: #e78a00;
}

.panel-referral .ref-invite .invite-link .copy-link.copied {
  background-color: #4caf50;
}

.panel-referral .ref-invite .invite-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.panel-referral .ref-invite .invite-share .label {
  font-size: 13px;
  color: #888;
}

.panel-referral .ref-invite .invite-share .share {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 30px;
  color: #fff;
  transition: 0.3s opacity;
  -webkit-transition: 0.3s opacity;
}

.panel-referral .ref-invite .invite-share .share:hover {
  opacity: 0.85;
}

.panel-referral .ref-invite .invite-share .share.telegram {
  background-color: #29a9eb;
}

.panel-referral .ref-invite .invite-share .share.whatsapp {
  background-color: #25d366;
}

.panel-referral .ref-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.panel-referral .ref-steps .step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px;
  border: 1px solid #ececec;
  border-radius: 15px;
}

.panel-referral .ref-steps .step .num {
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: #ff9800;
  background-color: #ff980017;
}

.panel-referral .ref-steps .step b {
  display: block;
  font-size: 14px;
  color: #333;
}

.panel-referral .ref-steps .step p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.9;
  color: #888;
}

.panel-referral .ref-wallet {
  margin-top: 20px;
  border-radius: 20px;
  background-color: #f4f6fb;
  overflow: hidden;
}

.panel-referral .ref-wallet .wallet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.panel-referral .ref-wallet .wallet-head .label {
  display: block;
  font-size: 13px;
  color: #888;
}

.panel-referral .ref-wallet .wallet-head .amount {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: #222;
}

.panel-referral .ref-wallet .wallet-head .amount small {
  font-size: 13px;
  font-weight: 400;
  color: #888;
}

.panel-referral .ref-wallet .wallet-head .left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-referral .ref-wallet .wallet-head .left .item {
  font-size: 12px;
  color: #777;
  background-color: #fff;
  padding: 6px 12px;
  border-radius: 30px;
}

.panel-referral .ref-wallet .wallet-head .left .item b {
  color: #333;
  font-weight: 700;
}

.panel-referral .ref-wallet .wallet-body {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.panel-referral .ref-wallet .wallet-box {
  flex: 1;
  min-width: 0;
}

.panel-referral .ref-wallet .wallet-box > .title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.panel-referral .ref-wallet .wallet-box > .title i {
  color: #ff9800;
}

.panel-referral .ref-wallet .plans .plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background-color: #fff;
  border-radius: 12px;
}

.panel-referral .ref-wallet .plans .plan .info {
  display: flex;
  flex-direction: column;
}

.panel-referral .ref-wallet .plans .plan .name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.panel-referral .ref-wallet .plans .plan .price {
  font-size: 12px;
  color: #888;
}

.panel-referral .ref-wallet .plans .plan .buy-plan {
  padding: 6px 14px;
  font-size: 13px;
  color: #fff;
  background-color: #ff9800;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.3s background-color;
  -webkit-transition: 0.3s background-color;
}

.panel-referral .ref-wallet .plans .plan .buy-plan:hover {
  background-color: #e78a00;
}

.panel-referral .ref-wallet .plans .plan .buy-plan.loading {
  opacity: 0.6;
  pointer-events: none;
}

.panel-referral .ref-wallet .plans .plan.disabled .buy-plan,
.panel-referral .ref-wallet .plans .plan .buy-plan:disabled {
  color: #999;
  background-color: #e9e9e9;
  cursor: not-allowed;
}

.panel-referral .ref-wallet .withdraw-form {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.panel-referral .ref-wallet .withdraw-form .input {
  width: calc(50% - 6px);
}

.panel-referral .ref-wallet .withdraw-form .input label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #777;
}

.panel-referral .ref-wallet .withdraw-form .input input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  font-family: inherit;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  outline: 0;
}

.panel-referral .ref-wallet .withdraw-form .input input:focus {
  border-color: #ff9800;
}

.panel-referral .ref-wallet .withdraw-form .input.submit {
  display: flex;
  align-items: flex-end;
}

.panel-referral .ref-wallet .withdraw-form .input.submit button {
  width: 100%;
  height: 40px;
  color: #fff;
  background-color: #ff9800;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s background-color;
  -webkit-transition: 0.3s background-color;
}

.panel-referral .ref-wallet .withdraw-form .input.submit button:hover {
  background-color: #e78a00;
}

.panel-referral .ref-wallet .withdraw-form .loader-box {
  border-radius: 12px;
}

.panel-referral .ref-rules {
  margin-top: 20px;
  padding: 15px 20px;
  border-radius: 15px;
  background-color: #42a5f50f;
  border-right: 3px solid #42a5f5;
}

.panel-referral .ref-rules .title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.panel-referral .ref-rules ul {
  margin-top: 8px;
  padding-right: 18px;
}

.panel-referral .ref-rules ul li {
  list-style: disc;
  font-size: 13px;
  line-height: 2.1;
  color: #666;
}

.panel-referral .ref-tabs {
  display: flex;
  gap: 8px;
  margin-top: 25px;
  margin-bottom: 15px;
  border-bottom: 1px solid #ececec;
}

.panel-referral .ref-tabs a {
  position: relative;
  padding: 10px 14px;
  font-size: 14px;
  color: #888;
  transition: 0.3s color;
  -webkit-transition: 0.3s color;
}

.panel-referral .ref-tabs a:hover {
  color: #ff9800;
}

.panel-referral .ref-tabs a.active {
  color: #ff9800;
  font-weight: 600;
}

.panel-referral .ref-tabs a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background-color: #ff9800;
  border-radius: 2px;
}

.panel-referral .ref-table .table-list tbody td.amount.plus {
  color: #4caf50;
}

.panel-referral .ref-table .table-list tbody td.amount.minus {
  color: #f44336;
}

.panel-referral .ref-table .table-list tbody td .status.pending {
  background-color: #ff980012;
  color: #ff9800;
  white-space: nowrap;
}

.panel-referral .ref-table .is_empty {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  padding: 10px 0;
}

.panel-referral .ref-table .is_empty img {
  width: 220px;
  display: block;
}

.panel-referral .ref-table .is_empty .title {
  display: block;
  width: 100%;
  color: #222;
  font-weight: 600;
  font-size: 18px;
  margin-top: 20px;
}

.panel-referral .ref-table .is_empty .desc {
  display: block;
  width: 100%;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 300;
  color: #555;
}

.panel-referral .yc-pagination {
  margin-top: 15px;
}

.panel-referral .ltr-text,
.panel-referral .ref-wallet .withdraw-form #ref_account {
  direction: ltr;
  unicode-bidi: isolate;
}

.panel-referral .ltr-text {
  display: inline-block;
}

.panel-referral .ref-wallet .withdraw-form #ref_account {
  text-align: left;
}

.panel-referral .ref-wallet .withdraw-form #ref_account::placeholder {
  text-align: left;
}

/* dark */
body.dark .panel-referral .ref-stats .stat-item,
body.dark .panel-referral .ref-wallet {
  background-color: #131722;
}

body.dark .panel-referral .ref-stats .stat-item .count,
body.dark .panel-referral .ref-invite .title,
body.dark .panel-referral .ref-steps .step b,
body.dark .panel-referral .ref-wallet .wallet-head .amount,
body.dark .panel-referral .ref-wallet .wallet-box > .title,
body.dark .panel-referral .ref-wallet .plans .plan .name,
body.dark .panel-referral .ref-wallet .wallet-head .left .item b,
body.dark .panel-referral .ref-rules .title,
body.dark .panel-referral .ref-table .is_empty .title {
  color: #fff;
}

body.dark .panel-referral .ref-invite {
  background-color: #ff98000d;
  border-color: #ff980059;
}

body.dark .panel-referral .ref-invite .desc,
body.dark .panel-referral .ref-steps .step p,
body.dark .panel-referral .ref-rules ul li,
body.dark .panel-referral .ref-wallet .withdraw-form .input label,
body.dark .panel-referral .ref-table .is_empty .desc {
  color: #aab0bd;
}

body.dark .panel-referral .ref-invite .invite-link .link-input,
body.dark .panel-referral .ref-wallet .withdraw-form .input input {
  color: #ddd;
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark .panel-referral .ref-steps .step,
body.dark .panel-referral .ref-tabs {
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark .panel-referral .ref-wallet .wallet-head {
  border-color: rgba(255, 255, 255, 0.06);
}

body.dark .panel-referral .ref-wallet .wallet-head .left .item,
body.dark .panel-referral .ref-wallet .plans .plan {
  color: #aab0bd;
  background-color: #1a1f2a;
}

body.dark .panel-referral .ref-wallet .plans .plan.disabled .buy-plan,
body.dark .panel-referral .ref-wallet .plans .plan .buy-plan:disabled {
  color: #777;
  background-color: rgba(255, 255, 255, 0.08);
}

body.dark .panel-referral .ref-rules {
  background-color: #42a5f50d;
}

/* responsive */
@media (max-width: 992px) {
  .panel-referral .ref-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel-referral .ref-wallet .wallet-body {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .panel-referral .ref-steps {
    grid-template-columns: 1fr;
  }

  .panel-referral .ref-invite .invite-link {
    flex-direction: column;
  }

  .panel-referral .ref-invite .invite-link .copy-link {
    justify-content: center;
  }

  .panel-referral .ref-invite .invite-link .link-input {
    flex: none;
    width: 100%;
  }

  .panel-referral .ref-wallet .withdraw-form .input {
    width: 100%;
  }

  .panel-referral .ref-stats .stat-item {
    padding: 12px;
  }

  .panel-referral .ref-stats .stat-item .count {
    font-size: 18px;
  }
}

/* ==========================================================
   تصویر پروفایل
   ========================================================== */
.edit-profile-form > .input-profile .preview.avatar-upload {
  position: relative;
  width: 96px;
  height: 96px;
  cursor: pointer;
}

.edit-profile-form > .input-profile .preview.avatar-upload img {
  object-fit: cover;
  border-width: 5px;
}

.edit-profile-form > .input-profile .avatar-edit {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid #fff;
  background-color: #ff9800;
  color: #fff;
  font-size: 13px;
  transition: 0.3s transform;
  -webkit-transition: 0.3s transform;
}

.edit-profile-form > .input-profile .preview.avatar-upload:hover .avatar-edit {
  transform: scale(1.1);
}

.edit-profile-form > .input-profile .avatar-loading {
  position: absolute;
  inset: 5px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
}

.edit-profile-form > .input-profile .avatar-loading i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  box-sizing: border-box;
  animation: dm-avatar-spin 0.8s linear infinite;
}

.edit-profile-form > .input-profile.is-uploading .avatar-loading {
  display: flex;
}

.edit-profile-form > .input-profile.is-uploading .avatar-actions {
  opacity: 0.5;
  pointer-events: none;
}

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

.edit-profile-form > .input-profile .avatar-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.edit-profile-form > .input-profile .avatar-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid #ff9800;
  border-radius: 10px;
  background-color: transparent;
  color: #ff9800;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s all;
  -webkit-transition: 0.3s all;
}

.edit-profile-form > .input-profile .avatar-btn:hover {
  background-color: #ff9800;
  color: #fff;
}

.edit-profile-form > .input-profile .avatar-btn.remove {
  border-color: #e0e0e0;
  color: #888;
}

.edit-profile-form > .input-profile .avatar-btn.remove:hover {
  border-color: #f44336;
  background-color: #f44336;
  color: #fff;
}

.edit-profile-form > .input-profile .avatar-btn[hidden] {
  display: none;
}

.edit-profile-form > .input-profile .desc {
  margin-top: 10px;
}

body.dark .edit-profile-form > .input-profile .avatar-edit {
  border-color: #1a1f2a;
}

body.dark .edit-profile-form > .input-profile .avatar-btn.remove {
  border-color: rgba(255, 255, 255, 0.15);
  color: #aab0bd;
}

/* ==========================================================
   انتخاب قسمت (صفحه سریال)
   ========================================================== */
html.dm-ep-open {
  overflow: hidden;
}

.dm-episodes {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 12, 18, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s;
  -webkit-transition: opacity 0.2s;
}

.dm-episodes[hidden] {
  display: none;
}

.dm-episodes.is-open {
  opacity: 1;
}

.dm-episodes .dm-ep-box {
  width: 100%;
  max-width: 680px;
  max-height: min(80vh, 660px);
  display: flex;
  flex-direction: column;
  padding: 22px 22px 8px;
  border-radius: 20px;
  background-color: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  transform: translateY(12px);
  transition: transform 0.25s ease;
  -webkit-transition: transform 0.25s ease;
}

.dm-episodes.is-open .dm-ep-box {
  transform: translateY(0);
}

.dm-episodes .dm-ep-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dm-episodes .dm-ep-title {
  flex: 1;
  margin: 0;
  color: #222;
  font-size: 18px;
  font-weight: 700;
}

.dm-episodes .dm-ep-lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background-color: #f4f6fb;
}

.dm-episodes .dm-ep-lang .lang {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s all;
  -webkit-transition: 0.2s all;
}

.dm-episodes .dm-ep-lang .lang.active {
  background-color: #fff;
  color: #ff9800;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dm-episodes .dm-ep-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #f4f6fb;
  color: #666;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s all;
  -webkit-transition: 0.2s all;
}

.dm-episodes .dm-ep-close:hover {
  background-color: #ff9800;
  color: #fff;
}

.dm-episodes .dm-ep-seasons {
  display: flex;
  gap: 8px;
  margin: 18px 0 4px;
  padding-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dm-episodes .dm-ep-seasons::-webkit-scrollbar {
  display: none;
}

.dm-episodes .dm-ep-seasons .season {
  flex-shrink: 0;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background-color: #f4f6fb;
  color: #666;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s all;
  -webkit-transition: 0.2s all;
}

.dm-episodes .dm-ep-seasons .season:hover {
  color: #ff9800;
}

.dm-episodes .dm-ep-seasons .season.active {
  background-color: #ff9800;
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 152, 0, 0.3);
}

.dm-episodes .dm-ep-lists {
  margin: 12px -6px 0 -10px;
  padding: 4px 6px 14px 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.dm-episodes .dm-ep-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 12px;
}

.dm-episodes .dm-ep-grid[hidden] {
  display: none;
}

.dm-episodes .dm-ep-item {
  display: block;
  min-width: 0;
  color: inherit;
  outline: 0;
}

.dm-episodes .dm-ep-item .thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background-color: #e9ecf3;
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow 0.2s;
  -webkit-transition: box-shadow 0.2s;
}

.dm-episodes .dm-ep-item .thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
  -webkit-transition: transform 0.35s ease;
}

.dm-episodes .dm-ep-item.no-still .thumb img {
  filter: brightness(0.5);
}

.dm-episodes .dm-ep-item .ep-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.dm-episodes .dm-ep-item.no-still .thumb:not(:has(img)) {
  background: linear-gradient(150deg, #ffab00, #ff9800);
}

.dm-episodes .dm-ep-item .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.2s;
  -webkit-transition: opacity 0.2s;
}

.dm-episodes .dm-ep-item:hover .thumb img,
.dm-episodes .dm-ep-item:focus-visible .thumb img {
  transform: scale(1.06);
}

.dm-episodes .dm-ep-item:hover .play,
.dm-episodes .dm-ep-item:focus-visible .play {
  opacity: 1;
}

.dm-episodes .dm-ep-item:hover .thumb,
.dm-episodes .dm-ep-item:focus-visible .thumb {
  box-shadow: 0 0 0 2px #ff9800;
}

.dm-episodes .dm-ep-item .name {
  display: block;
  margin-top: 8px;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
  -webkit-transition: color 0.2s;
}

.dm-episodes .dm-ep-item:hover .name {
  color: #ff9800;
}

body.dark .dm-episodes .dm-ep-box {
  background-color: #1a1f2a;
}

body.dark .dm-episodes .dm-ep-title {
  color: #fff;
}

body.dark .dm-episodes .dm-ep-close,
body.dark .dm-episodes .dm-ep-seasons .season,
body.dark .dm-episodes .dm-ep-lang {
  background-color: #131722;
  color: #aab0bd;
}

body.dark .dm-episodes .dm-ep-seasons .season.active {
  background-color: #ff9800;
  color: #fff;
}

body.dark .dm-episodes .dm-ep-lang .lang.active {
  background-color: #1a1f2a;
}

body.dark .dm-episodes .dm-ep-item .thumb {
  background-color: #131722;
}

body.dark .dm-episodes .dm-ep-item .name {
  color: #ddd;
}

@media (max-width: 600px) {
  .dm-episodes {
    align-items: flex-end;
    padding: 0;
  }

  .dm-episodes .dm-ep-box {
    max-width: 100%;
    max-height: 85vh;
    padding: 18px 14px 4px;
    border-radius: 20px 20px 0 0;
    transform: translateY(30px);
  }

  .dm-episodes .dm-ep-head {
    flex-wrap: wrap;
  }

  .dm-episodes .dm-ep-lang {
    order: 3;
    width: 100%;
  }

  .dm-episodes .dm-ep-lang .lang {
    flex: 1;
  }

  .dm-episodes .dm-ep-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 601px) and (max-width: 768px) {
  .dm-episodes .dm-ep-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dm-episodes .dm-ep-item.is-missing {
  opacity: .35;
  pointer-events: none;
  filter: grayscale(1);
}


img.dm-user-avatar {
  object-fit: cover;
  background-color: #e6e9ef;
}
