.ycs-wrapper {
  --ycs-accent: #2438c7;
  --ycs-accent-dark: #13246f;
  --ycs-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.78) 100%);
  --ycs-shadow: 0 16px 36px rgba(11, 20, 54, 0.16);
  direction: rtl;
  font-family: inherit !important;
  color: inherit !important;
}

.ycs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #dfe4ff;
  padding-bottom: 12px;
}

.ycs-header--nav-only {
  justify-content: flex-start;
  border-bottom: 0;
  padding-bottom: 0;
}

.ycs-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ycs-slider-shell {
  position: relative;
  display: block;
}

.ycs-track {
  position: relative;
  direction: rtl;
  touch-action: pan-y;
  user-select: none;
  overflow: hidden;
}

.ycs-page {
  display: none;
}

.ycs-page.is-active {
  display: block;
}

.ycs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  direction: ltr;
}

.ycs-page-dot {
  min-width: 36px;
  height: 36px;
  border: 1px solid #d9deea;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  cursor: pointer;
  font-family: inherit !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 0 12px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ycs-page-dot:hover,
.ycs-page-dot:focus-visible {
  background: #f8fafc;
  border-color: #c4ccda;
  transform: translateY(-1px);
}

.ycs-page-dot.is-active {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
}

.ycs-page-dot[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

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

.ycs-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: right;
  cursor: pointer;
  direction: rtl;
  font-family: inherit !important;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  width: 100%;
}

.ycs-thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16 / 9;
  box-shadow: var(--ycs-shadow);
  display: block;
  background: #000;
}

.ycs-thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ycs-overlay);
}

.ycs-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.ycs-card:hover .ycs-thumb,
.ycs-card:focus-visible .ycs-thumb {
  transform: scale(1.04);
}

.ycs-play-icon {
  position: absolute;
  left: 14px !important;
  top: 14px !important;
  right: auto !important;
  bottom: auto !important;
  width: 46px;
  height: 46px;
  z-index: 1;
  pointer-events: none;
}

.ycs-play-icon svg {
  width: 100%;
  height: 100%;
}

.ycs-play-icon circle {
  fill: rgba(0, 0, 0, 0.34);
  stroke: #ffffff;
  stroke-width: 2;
}

.ycs-play-icon polygon {
  fill: #ffffff;
}

.ycs-card-title {
  color: #ffffff;
  font-family: inherit !important;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: inherit;
  position: relative;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 3em;
  max-height: 3em;
  margin-top: -62px;
  padding: 0 14px 14px;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  text-align: right;
  direction: rtl;
  transition: max-height 0.25s ease, transform 0.25s ease, padding 0.25s ease, background 0.25s ease;
}

.ycs-card-title,
.ycs-card-title * {
  font-family: inherit !important;
}

@media (hover: hover) and (pointer: fine) {
  .ycs-card:hover .ycs-card-title,
  .ycs-card:focus-visible .ycs-card-title {
    -webkit-line-clamp: unset;
    max-height: 9em;
    min-height: 3em;
    transform: translateY(-28px);
    padding-top: 36px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.88) 28%, rgba(0, 0, 0, 0.96) 100%);
  }
}

.ycs-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ycs-modal.is-open {
  display: flex !important;
}

.ycs-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 36, 0.78);
  z-index: 0;
}

.ycs-modal-dialog {
  position: relative;
  width: min(960px, 100%);
  background: #081127;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.ycs-modal-close {
  position: absolute;
  top: 10px;
  left: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
}

.ycs-modal-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.ycs-modal-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

@media (max-width: 1024px) {
  .ycs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ycs-grid {
    grid-template-columns: 1fr;
  }

  .ycs-pagination {
    gap: 6px;
    flex-wrap: wrap;
  }

  .ycs-page-dot {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
    padding: 0 10px;
  }

  .ycs-card-title {
    font-size: 14px;
    margin-top: -58px;
  }
}
