/* Rasta Core — سرفصل‌ها (روشن) و پخش‌کننده‌ی سینمایی (تیره) */

@property --p {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

@counter-style rasta-fa {
    system: numeric;
    symbols: "۰" "۱" "۲" "۳" "۴" "۵" "۶" "۷" "۸" "۹";
    pad: 2 "۰";
}

/* ================= پایه و ایزوله‌سازی ================= */

.rasta-ui {
    --r-blue: #2F6BFF;
    --r-blue-600: #1E4FD8;
    --r-blue-50: #EEF3FF;
    --r-blue-100: #DCE6FF;
    --r-ink: #0B1220;
    --r-ink-2: #344054;
    --r-muted: #667085;
    --r-line: #E7EBF3;
    --r-soft: #F6F8FC;
    --r-green: #12B76A;
    --r-green-50: #E8F8F0;
    --r-green-700: #067647;
    --r-amber-50: #FFF6DB;
    --r-amber-700: #8A6100;
    --r-radius: 24px;
    direction: rtl;
    color: var(--r-ink);
    font-family: var(--rasta-font, inherit);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.rasta-ui,
.rasta-ui *,
.rasta-ui *::before,
.rasta-ui *::after {
    box-sizing: border-box;
}

.rasta-ui[hidden],
.rasta-ui [hidden] {
    display: none !important;
}

.rasta-ui.rasta-player:not(.is-visible) {
    pointer-events: none;
}

.rasta-ui svg {
    display: block;
    flex: 0 0 auto;
}

/* دکمه‌ی پایه: همه‌ی ویژگی‌ها صریح تعریف شده‌اند تا استایل قالب نفوذ نکند */
.rasta-ui .rb,
.rasta-ui .rb:hover,
.rasta-ui .rb:focus,
.rasta-ui .rb:active,
.rasta-ui .rb:visited {
    -webkit-appearance: none;
    appearance: none;
    display: var(--rb-display, inline-flex);
    align-items: center;
    justify-content: var(--rb-justify, center);
    gap: var(--rb-gap, 8px);
    width: var(--rb-w, auto);
    height: var(--rb-h, 40px);
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: var(--rb-pad, 0 16px);
    border: 1px solid var(--rb-bd, transparent);
    border-radius: var(--rb-r, 12px);
    background: var(--rb-bg, transparent);
    color: var(--rb-fg, inherit);
    box-shadow: var(--rb-sh, none);
    font-family: inherit;
    font-size: var(--rb-fs, 13.5px);
    font-weight: var(--rb-fw, 700);
    font-style: normal;
    line-height: var(--rb-lh, 1);
    letter-spacing: 0;
    text-align: var(--rb-align, center);
    text-decoration: none;
    text-transform: none;
    text-shadow: none;
    white-space: var(--rb-ws, nowrap);
    cursor: var(--rb-cursor, pointer);
    outline: none;
    transform: var(--rb-tf, none);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
}

.rasta-ui .rb:focus-visible {
    outline: 2px solid var(--r-blue);
    outline-offset: 2px;
}

/* ================= سربرگ سرفصل‌ها ================= */

.rasta-ui.rasta-course {
    margin: 48px 0;
    counter-reset: rasta-season;
}

body.single-rasta_lessons {
    counter-reset: rasta-season;
}

.rasta-ui .rasta-course__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
}

.rasta-ui .rasta-course__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--r-blue);
    font-size: 13px;
    font-weight: 800;
}

.rasta-ui .rasta-course__eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.rasta-ui .rasta-course__title {
    margin: 6px 0 14px;
    padding: 0;
    color: var(--r-ink);
    font-family: inherit;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}

.rasta-ui .rasta-course__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rasta-ui .rasta-course__stats li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--r-soft);
    color: var(--r-ink-2);
    font-size: 13px;
    line-height: 1.6;
}

.rasta-ui .rasta-course__stats svg {
    width: 16px;
    height: 16px;
    color: var(--r-blue);
}

.rasta-ui .rasta-course__stats b {
    color: var(--r-ink);
    font-weight: 800;
}

.rasta-ui .rasta-course__progress {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 12px 12px 12px;
    border: 1px solid var(--r-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 20px 44px -30px rgba(16, 24, 40, .4);
}

.rasta-ui .rasta-course__progress-text strong {
    display: block;
    color: var(--r-ink);
    font-size: 14px;
    font-weight: 800;
}

.rasta-ui .rasta-course__progress-text span {
    display: block;
    color: var(--r-muted);
    font-size: 12.5px;
}

.rasta-ui .rasta-cta {
    --rb-h: 56px;
    --rb-pad: 0 8px 0 18px;
    --rb-r: 16px;
    --rb-gap: 12px;
    --rb-bg: var(--r-ink);
    --rb-fg: #fff;
    --rb-align: start;
    --rb-lh: 1.5;
    margin-inline-start: 8px;
}

.rasta-ui .rasta-cta:hover {
    --rb-bg: var(--r-blue);
    --rb-tf: translateY(-2px);
    --rb-sh: 0 16px 30px -14px rgba(47, 107, 255, .9);
}

.rasta-ui .rasta-cta__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--r-blue);
    transition: background .2s ease, color .2s ease;
}

.rasta-ui .rasta-cta:hover .rasta-cta__icon {
    background: #fff;
    color: var(--r-blue);
}

.rasta-ui .rasta-cta__icon svg {
    width: 16px;
    height: 16px;
    transform: translateX(1px);
}

.rasta-ui .rasta-cta__text small {
    display: block;
    color: rgba(255, 255, 255, .7);
    font-size: 11.5px;
    font-weight: 600;
}

.rasta-ui .rasta-cta__text em {
    display: block;
    max-width: 220px;
    overflow: hidden;
    font-size: 13.5px;
    font-style: normal;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* حلقه‌ی پیشرفت */
.rasta-ui .rasta-ring {
    --size: 46px;
    --thick: 4px;
    position: relative;
    display: inline-grid;
    flex: 0 0 var(--size);
    place-items: center;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    transition: --p .8s cubic-bezier(.2, .8, .2, 1);
}

.rasta-ui .rasta-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--r-blue) calc(var(--p) * 1%), var(--r-blue-100) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--thick)), #000 calc(100% - var(--thick) + 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - var(--thick)), #000 calc(100% - var(--thick) + 1px));
}

.rasta-ui .rasta-ring.is-done::before {
    background: var(--r-green);
}

.rasta-ui .rasta-ring b {
    position: relative;
    color: var(--r-ink);
    font-size: 11px;
    font-weight: 800;
}

.rasta-ui .rasta-ring--lg {
    --size: 60px;
    --thick: 6px;
}

.rasta-ui .rasta-ring--lg b {
    font-size: 14px;
}

/* ================= فصل ================= */

.rasta-ui.rasta-season {
    position: relative;
    margin: 0 0 16px;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 40px -32px rgba(16, 24, 40, .3);
    counter-increment: rasta-season;
    transition: border-color .3s ease, box-shadow .3s ease;
}

.rasta-ui.rasta-season:hover {
    border-color: #D5DCE9;
}

.rasta-ui.rasta-season.is-open {
    border-color: rgba(47, 107, 255, .3);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 30px 64px -40px rgba(47, 107, 255, .55);
}

.rasta-ui .rasta-season__head {
    --rb-display: flex;
    --rb-w: 100%;
    --rb-h: auto;
    --rb-pad: 22px 26px;
    --rb-r: var(--r-radius);
    --rb-gap: 20px;
    --rb-justify: flex-start;
    --rb-align: start;
    --rb-ws: normal;
    --rb-fw: 400;
    --rb-fs: 15px;
    --rb-lh: 1.5;
}

.rasta-ui .rasta-season__num {
    flex: 0 0 auto;
    min-width: 70px;
    color: var(--r-blue);
    font-size: 46px;
    font-weight: 300;
    line-height: 1;
}

.rasta-ui .rasta-season__num::before {
    content: counter(rasta-season, rasta-fa);
}

.rasta-ui .rasta-season__icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    max-width: none;
    margin: 0;
    border-radius: 12px;
    object-fit: contain;
}

.rasta-ui .rasta-season__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.rasta-ui .rasta-season__title {
    color: var(--r-ink);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.5;
}

.rasta-ui .rasta-season__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    color: var(--r-muted);
    font-size: 13px;
}

.rasta-ui .rasta-season__meta span + span::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 10px;
    border-radius: 50%;
    background: #98A2B3;
    vertical-align: middle;
}

.rasta-ui .rasta-season__chev {
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--r-soft);
    color: var(--r-ink-2);
    transition: transform .45s cubic-bezier(.2, .8, .2, 1), background .2s ease, color .2s ease;
}

.rasta-ui .rasta-season__chev svg {
    width: 18px;
    height: 18px;
}

.rasta-ui .rasta-season__head:hover .rasta-season__chev {
    background: var(--r-blue-50);
    color: var(--r-blue);
}

.rasta-ui.rasta-season.is-open .rasta-season__chev {
    background: var(--r-blue);
    color: #fff;
    transform: rotate(180deg);
}

.rasta-ui .rasta-season__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .45s cubic-bezier(.2, .8, .2, 1);
}

.rasta-ui.rasta-season.is-open > .rasta-season__panel {
    grid-template-rows: 1fr;
}

.rasta-ui .rasta-season__inner {
    min-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: visibility 0s linear .45s;
}

.rasta-ui.rasta-season.is-open .rasta-season__inner {
    visibility: visible;
    transition-delay: 0s;
}

.rasta-ui .rasta-season__desc {
    margin: 0 26px 6px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--r-line);
    color: var(--r-muted);
    font-size: 14px;
    line-height: 2;
}

/* ================= جلسات ================= */

.rasta-ui .rasta-lessons {
    margin: 0;
    padding: 6px 12px 14px;
    list-style: none;
}

.rasta-ui .rasta-lessons__empty {
    padding: 18px;
    color: var(--r-muted);
    font-size: 13px;
}

.rasta-ui .rasta-lesson {
    position: relative;
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 12px;
    border-radius: 18px;
    transition: background .25s ease;
}

.rasta-ui .rasta-lesson + .rasta-lesson::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 12px;
    height: 1px;
    background: var(--r-line);
    transition: opacity .2s ease;
}

.rasta-ui .rasta-lesson:hover,
.rasta-ui .rasta-lesson.is-expanded {
    background: var(--r-soft);
}

.rasta-ui .rasta-lesson:hover::before,
.rasta-ui .rasta-lesson:hover + .rasta-lesson::before,
.rasta-ui .rasta-lesson.is-expanded::before,
.rasta-ui .rasta-lesson.is-expanded + .rasta-lesson::before {
    opacity: 0;
}

/* کاور */
.rasta-ui .rasta-lesson__thumb {
    --rb-display: block;
    --rb-w: 148px;
    --rb-h: auto;
    --rb-pad: 0;
    --rb-r: 14px;
    --rb-bd: transparent;
    --rb-bg: linear-gradient(135deg, #1E3A8A 0%, #2F6BFF 55%, #7FA6FF 100%);
    position: relative;
    display: block;
    width: 148px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #1E3A8A 0%, #2F6BFF 55%, #7FA6FF 100%);
    isolation: isolate;
}

.rasta-ui .rasta-lesson__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2, .8, .2, 1), filter .3s ease;
}

.rasta-ui .rasta-lesson__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(11, 18, 32, .6), rgba(11, 18, 32, 0) 55%);
}

.rasta-ui .rasta-lesson:hover .rasta-lesson__thumb img {
    transform: scale(1.07);
}

.rasta-ui .rasta-lesson__ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .92);
}

.rasta-ui .rasta-lesson__ph svg {
    width: 30px;
    height: 30px;
}

.rasta-ui .rasta-lesson__no {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--r-ink);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.8;
}

.rasta-ui .rasta-lesson__time {
    position: absolute;
    bottom: 9px;
    inset-inline-end: 8px;
    z-index: 2;
    padding: 0 7px;
    border-radius: 6px;
    background: rgba(11, 18, 32, .75);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.8;
    direction: ltr;
}

.rasta-ui .rasta-lesson__time:empty {
    display: none;
}

.rasta-ui .rasta-lesson__hover,
.rasta-ui .rasta-lesson__lock {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
}

.rasta-ui .rasta-lesson__hover {
    opacity: 0;
    transition: opacity .25s ease;
}

.rasta-ui .rasta-lesson__hover i,
.rasta-ui .rasta-lesson__lock i {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-style: normal;
}

.rasta-ui .rasta-lesson__hover i {
    background: #fff;
    color: var(--r-blue);
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .55);
    transform: scale(.75);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.rasta-ui .rasta-lesson__hover svg {
    width: 17px;
    height: 17px;
    transform: translateX(1px);
}

.rasta-ui .rasta-lesson:hover .rasta-lesson__hover {
    opacity: 1;
}

.rasta-ui .rasta-lesson:hover .rasta-lesson__hover i {
    transform: scale(1);
}

.rasta-ui .rasta-lesson.is-locked .rasta-lesson__thumb img {
    filter: blur(3px) saturate(.6) brightness(.75);
    transform: scale(1.12);
}

.rasta-ui .rasta-lesson__lock i {
    border: 1px solid rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .18);
    color: #fff;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.rasta-ui .rasta-lesson__lock svg {
    width: 18px;
    height: 18px;
}

.rasta-ui .rasta-lesson__bar {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 3;
    height: 3px;
    background: rgba(255, 255, 255, .25);
}

.rasta-ui .rasta-lesson__bar i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--r-blue);
    transition: width .5s ease;
}

.rasta-ui .rasta-lesson.is-watched .rasta-lesson__bar i {
    background: var(--r-green);
}

.rasta-ui .rasta-lesson__done {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    display: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--r-green);
    color: #fff;
}

.rasta-ui .rasta-lesson__done svg {
    width: 12px;
    height: 12px;
}

.rasta-ui .rasta-lesson.is-watched .rasta-lesson__done {
    display: grid;
}

/* متن جلسه */
.rasta-ui .rasta-lesson__body {
    min-width: 0;
}

.rasta-ui .rasta-lesson__title {
    margin: 0 0 6px;
    padding: 0;
    color: var(--r-ink);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 800;
    line-height: 1.7;
    letter-spacing: 0;
    text-transform: none;
    overflow-wrap: anywhere;
}

.rasta-ui .rasta-lesson.is-locked .rasta-lesson__title {
    color: var(--r-ink-2);
}

.rasta-ui .rasta-lesson__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.rasta-ui .rasta-lesson__type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-inline-end: 4px;
    color: var(--r-muted);
    font-size: 12.5px;
}

.rasta-ui .rasta-lesson__type svg {
    width: 15px;
    height: 15px;
}

.rasta-ui .rasta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 9px;
    border-radius: 999px;
    background: var(--r-soft);
    color: var(--r-ink-2);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.8;
}

.rasta-ui .rasta-chip svg {
    width: 12px;
    height: 12px;
}

.rasta-ui .rasta-chip--free {
    background: var(--r-green-50);
    color: var(--r-green-700);
}

.rasta-ui .rasta-chip--new {
    background: var(--r-blue-50);
    color: var(--r-blue-600);
}

.rasta-ui .rasta-chip--done {
    display: none;
    background: var(--r-green-50);
    color: var(--r-green-700);
}

.rasta-ui .rasta-lesson.is-watched .rasta-chip--done {
    display: inline-flex;
}

/* دکمه‌های جلسه */
.rasta-ui .rasta-lesson__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rasta-ui .rasta-play {
    --rb-w: 48px;
    --rb-h: 48px;
    --rb-pad: 0;
    --rb-r: 50%;
    --rb-bg: var(--r-blue);
    --rb-fg: #fff;
    --rb-sh: 0 12px 24px -10px rgba(47, 107, 255, .85);
}

.rasta-ui .rasta-play:hover {
    --rb-bg: var(--r-blue-600);
    --rb-tf: scale(1.07);
    --rb-sh: 0 18px 32px -10px rgba(47, 107, 255, .95);
}

.rasta-ui .rasta-play svg {
    width: 18px;
    height: 18px;
    transform: translateX(1.5px);
}

.rasta-ui .rasta-icon-btn {
    --rb-w: 40px;
    --rb-h: 40px;
    --rb-pad: 0;
    --rb-r: 50%;
    --rb-bg: var(--r-soft);
    --rb-fg: var(--r-ink-2);
}

.rasta-ui .rasta-icon-btn:hover {
    --rb-bg: var(--r-blue-50);
    --rb-fg: var(--r-blue);
}

.rasta-ui .rasta-icon-btn svg {
    width: 18px;
    height: 18px;
}

.rasta-ui .rasta-pill {
    --rb-h: 40px;
    --rb-pad: 0 16px;
    --rb-r: 999px;
    --rb-fs: 13px;
    --rb-gap: 7px;
}

.rasta-ui .rasta-pill svg {
    width: 16px;
    height: 16px;
}

.rasta-ui .rasta-pill--ghost {
    --rb-bg: #fff;
    --rb-bd: var(--r-line);
    --rb-fg: var(--r-ink-2);
}

.rasta-ui .rasta-pill--ghost:hover {
    --rb-bd: var(--r-blue);
    --rb-fg: var(--r-blue);
}

.rasta-ui .rasta-pill--primary {
    --rb-bg: var(--r-blue);
    --rb-fg: #fff;
}

.rasta-ui .rasta-pill--primary:hover {
    --rb-bg: var(--r-blue-600);
}

.rasta-ui .rasta-pill--lock {
    --rb-bg: var(--r-ink);
    --rb-fg: #fff;
}

.rasta-ui .rasta-pill--lock:hover {
    --rb-bg: var(--r-blue);
    --rb-tf: translateY(-1px);
}

.rasta-ui .rasta-pill--soon {
    --rb-bg: var(--r-amber-50);
    --rb-fg: var(--r-amber-700);
    --rb-cursor: default;
}

.rasta-ui .rasta-check {
    --rb-w: 40px;
    --rb-h: 40px;
    --rb-pad: 0;
    --rb-r: 50%;
    --rb-bg: #fff;
    --rb-bd: var(--r-line);
    --rb-fg: #98A2B3;
}

.rasta-ui .rasta-check:hover {
    --rb-bd: var(--r-green);
    --rb-fg: var(--r-green);
}

.rasta-ui .rasta-lesson.is-watched .rasta-check {
    --rb-bg: var(--r-green);
    --rb-bd: var(--r-green);
    --rb-fg: #fff;
}

.rasta-ui .rasta-check svg {
    width: 18px;
    height: 18px;
}

/* محتوای متنی جلسه */
.rasta-ui .rasta-lesson__content {
    grid-column: 1 / -1;
    margin: 4px 0 2px;
    padding: 20px 22px;
    border: 1px solid var(--r-line);
    border-radius: 16px;
    background: #fff;
    color: var(--r-ink-2);
    font-size: 14.5px;
    line-height: 2.1;
    animation: rastaFadeUp .35s ease both;
}

.rasta-ui .rasta-lesson__content > :first-child {
    margin-top: 0;
}

.rasta-ui .rasta-lesson__content > :last-child {
    margin-bottom: 0;
}

.rasta-ui .rasta-lesson__content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

@keyframes rastaFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ================= پخش‌کننده‌ی سینمایی ================= */

html.rasta-no-scroll {
    overflow: hidden;
}

.rasta-ui.rasta-player {
    --p-text: #EEF2FF;
    --p-muted: #8FA3D1;
    --p-line: rgba(255, 255, 255, .09);
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    background: #04060C;
    color: var(--p-text);
    opacity: 0;
    transition: opacity .35s ease;
}

.rasta-ui.rasta-player.is-visible {
    opacity: 1;
}

.rasta-ui .rasta-player__ambient {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    max-width: none;
    opacity: .55;
    filter: blur(90px) saturate(1.6);
    pointer-events: none;
}

.rasta-ui .rasta-player__veil {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 0%, rgba(4, 6, 12, .15), rgba(4, 6, 12, .88));
}

.rasta-ui .rasta-player__shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(1320px, 100%);
    max-height: 100%;
    transform: translateY(18px) scale(.985);
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.rasta-ui.rasta-player.is-visible .rasta-player__shell {
    transform: none;
}

.rasta-ui .rasta-player__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rasta-ui .rasta-player__heading {
    min-width: 0;
}

.rasta-ui .rasta-player__eyebrow {
    display: block;
    color: var(--p-muted);
    font-size: 12.5px;
    font-weight: 700;
}

.rasta-ui .rasta-player__title {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rasta-ui .rasta-player__tools {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.rasta-ui .rasta-tool {
    --rb-w: 44px;
    --rb-h: 44px;
    --rb-pad: 0;
    --rb-r: 50%;
    --rb-bg: rgba(255, 255, 255, .08);
    --rb-bd: rgba(255, 255, 255, .1);
    --rb-fg: #fff;
}

.rasta-ui .rasta-tool:hover {
    --rb-bg: rgba(255, 255, 255, .16);
}

.rasta-ui .rasta-tool[aria-pressed="true"] {
    --rb-bg: rgba(47, 107, 255, .32);
    --rb-bd: rgba(47, 107, 255, .65);
}

.rasta-ui .rasta-tool svg {
    width: 19px;
    height: 19px;
}

.rasta-ui .rasta-player__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    min-height: 0;
}

.rasta-ui.rasta-player.no-list .rasta-player__main {
    grid-template-columns: minmax(0, 1fr);
}

.rasta-ui.rasta-player.no-list .rasta-player__list,
.rasta-ui.rasta-player.is-single .js-p-list {
    display: none;
}

/* صحنه */
.rasta-ui .rasta-player__stage {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 150px);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .07);
}

.rasta-ui .rasta-player__stage:fullscreen {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
}

.rasta-ui .rasta-player__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    background: #000;
    object-fit: contain;
}

.rasta-ui .rasta-player__audio {
    display: none;
}

.rasta-ui.rasta-player.is-audio .rasta-player__video {
    display: none;
}

/* صحنه‌ی صوت */
.rasta-ui .rasta-player__sound {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    background: radial-gradient(60% 70% at 50% 45%, rgba(47, 107, 255, .32), transparent 70%), #070B18;
    cursor: pointer;
}

.rasta-ui.rasta-player.is-audio .rasta-player__sound {
    display: grid;
}

.rasta-ui .rasta-player__viz {
    position: absolute;
    width: min(78%, 560px);
    height: auto;
    max-width: none;
    aspect-ratio: 1;
}

.rasta-ui .rasta-player__disc {
    position: relative;
    width: clamp(120px, 20vw, 200px);
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E3A8A, #2F6BFF);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85), 0 0 0 6px rgba(255, 255, 255, .06);
}

.rasta-ui .rasta-player__disc img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    animation: rastaSpin 26s linear infinite;
    animation-play-state: paused;
}

.rasta-ui.rasta-player.is-playing .rasta-player__disc img {
    animation-play-state: running;
}

.rasta-ui .rasta-player__disc-ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
}

.rasta-ui .rasta-player__disc-ph svg {
    width: 54px;
    height: 54px;
}

@keyframes rastaSpin {
    to { transform: rotate(360deg); }
}

/* دکمه‌ی بزرگ پخش و بارگذاری */
.rasta-ui .rasta-player__big {
    --rb-w: 88px;
    --rb-h: 88px;
    --rb-pad: 0;
    --rb-r: 50%;
    --rb-bg: rgba(255, 255, 255, .14);
    --rb-bd: rgba(255, 255, 255, .3);
    --rb-fg: #fff;
    --rb-tf: translate(-50%, -50%);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.rasta-ui .rasta-player__big:hover {
    --rb-bg: var(--r-blue);
    --rb-bd: var(--r-blue);
    --rb-tf: translate(-50%, -50%) scale(1.07);
}

.rasta-ui .rasta-player__big svg {
    width: 30px;
    height: 30px;
    transform: translateX(2px);
}

.rasta-ui.rasta-player.is-playing .rasta-player__big,
.rasta-ui.rasta-player.is-waiting .rasta-player__big {
    --rb-tf: translate(-50%, -50%) scale(.8);
    opacity: 0;
    pointer-events: none;
}

.rasta-ui .rasta-player__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    border: 3px solid rgba(255, 255, 255, .18);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: rastaSpin .8s linear infinite;
    transition: opacity .2s ease;
}

.rasta-ui.rasta-player.is-waiting .rasta-player__spinner {
    opacity: 1;
}

/* پیام ادامه‌ی پخش */
.rasta-ui .rasta-player__toast {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(10, 14, 26, .78);
    color: #fff;
    font-size: 13px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    animation: rastaFadeUp .35s ease both;
}

.rasta-ui .rasta-player__toast span {
    padding-right: 8px;
}

.rasta-ui .rasta-player__toast .rb {
    --rb-h: 32px;
    --rb-pad: 0 14px;
    --rb-r: 999px;
    --rb-bg: rgba(255, 255, 255, .14);
    --rb-fg: #fff;
    --rb-fs: 12.5px;
}

.rasta-ui .rasta-player__toast .rb:hover {
    --rb-bg: var(--r-blue);
}

/* کنترل‌ها */
.rasta-ui .rasta-player__controls {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    padding: 60px 18px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, .35) 55%, transparent);
    direction: ltr;
    transition: opacity .35s ease, transform .35s ease;
}

.rasta-ui.rasta-player.is-idle .rasta-player__controls {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.rasta-ui.rasta-player.is-idle .rasta-player__stage {
    cursor: none;
}

.rasta-ui .rasta-seek {
    position: relative;
    display: flex;
    align-items: center;
    height: 20px;
    cursor: pointer;
    touch-action: none;
}

.rasta-ui .rasta-seek:focus-visible {
    outline: none;
}

.rasta-ui .rasta-seek__track {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .22);
    transition: height .2s ease;
}

.rasta-ui .rasta-seek:hover .rasta-seek__track,
.rasta-ui .rasta-seek.is-drag .rasta-seek__track,
.rasta-ui .rasta-seek:focus-visible .rasta-seek__track {
    height: 6px;
}

.rasta-ui .rasta-seek__buffer,
.rasta-ui .rasta-seek__played {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    border-radius: inherit;
}

.rasta-ui .rasta-seek__buffer {
    background: rgba(255, 255, 255, .3);
}

.rasta-ui .rasta-seek__played {
    background: linear-gradient(90deg, #2F6BFF, #86ADFF);
    box-shadow: 0 0 14px rgba(47, 107, 255, .75);
}

.rasta-ui .rasta-seek__thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 107, 255, .45);
    transform: scale(0);
    transition: transform .2s ease;
}

.rasta-ui .rasta-seek:hover .rasta-seek__thumb,
.rasta-ui .rasta-seek.is-drag .rasta-seek__thumb,
.rasta-ui .rasta-seek:focus-visible .rasta-seek__thumb {
    transform: scale(1);
}

.rasta-ui .rasta-seek__tip {
    position: absolute;
    bottom: 22px;
    left: 0;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .96);
    color: var(--r-ink);
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity .15s ease;
}

.rasta-ui .rasta-seek:hover .rasta-seek__tip,
.rasta-ui .rasta-seek.is-drag .rasta-seek__tip {
    opacity: 1;
}

.rasta-ui .rasta-ctrl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.rasta-ui .rasta-ctrl__group {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.rasta-ui .rasta-ctrl__btn {
    --rb-w: 40px;
    --rb-h: 40px;
    --rb-pad: 0;
    --rb-r: 12px;
    --rb-fg: #fff;
}

.rasta-ui .rasta-ctrl__btn:hover {
    --rb-bg: rgba(255, 255, 255, .12);
}

.rasta-ui .rasta-ctrl__btn svg {
    width: 21px;
    height: 21px;
}

.rasta-ui .rasta-ctrl__btn--main {
    --rb-w: 46px;
    --rb-h: 46px;
    --rb-r: 50%;
    --rb-bg: #fff;
    --rb-fg: var(--r-ink);
    margin-right: 6px;
}

.rasta-ui .rasta-ctrl__btn--main:hover {
    --rb-bg: var(--r-blue);
    --rb-fg: #fff;
}

.rasta-ui .rasta-ctrl__btn--main svg {
    width: 18px;
    height: 18px;
}

.rasta-ui .rasta-ctrl__time {
    margin-left: 10px;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    white-space: nowrap;
}

.rasta-ui .rasta-ctrl__time b {
    color: #fff;
    font-weight: 800;
}

.rasta-ui .rasta-vol {
    display: flex;
    align-items: center;
}

.rasta-ui .rasta-vol__range {
    --v: 100%;
    width: 0;
    height: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #fff var(--v), rgba(255, 255, 255, .25) 0);
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: width .25s ease, opacity .25s ease, margin .25s ease;
}

.rasta-ui .rasta-vol:hover .rasta-vol__range,
.rasta-ui .rasta-vol:focus-within .rasta-vol__range {
    width: 84px;
    margin: 0 8px 0 4px;
    opacity: 1;
}

.rasta-ui .rasta-vol__range::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.rasta-ui .rasta-vol__range::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.rasta-ui .rasta-speed {
    position: relative;
    margin-right: 6px;
}

.rasta-ui .rasta-ctrl__pill {
    --rb-h: 32px;
    --rb-pad: 0 12px;
    --rb-r: 999px;
    --rb-bg: rgba(255, 255, 255, .12);
    --rb-fg: #fff;
    --rb-fs: 12.5px;
}

.rasta-ui .rasta-ctrl__pill:hover {
    --rb-bg: rgba(255, 255, 255, .22);
}

.rasta-ui .rasta-speed__menu {
    position: absolute;
    bottom: 44px;
    left: 50%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 116px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: rgba(14, 18, 30, .97);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .7);
    transform: translateX(-50%);
    animation: rastaFadeUp .2s ease both;
}

.rasta-ui .rasta-speed__item {
    --rb-w: 100%;
    --rb-h: 34px;
    --rb-pad: 0 12px;
    --rb-r: 10px;
    --rb-fg: rgba(255, 255, 255, .78);
    --rb-fs: 13px;
}

.rasta-ui .rasta-speed__item:hover {
    --rb-bg: rgba(255, 255, 255, .08);
    --rb-fg: #fff;
}

.rasta-ui .rasta-speed__item.is-active {
    --rb-bg: rgba(47, 107, 255, .22);
    --rb-fg: #fff;
}

.rasta-ui .rasta-ctrl__next {
    --rb-h: 36px;
    --rb-pad: 0 10px 0 14px;
    --rb-r: 999px;
    --rb-bg: rgba(47, 107, 255, .9);
    --rb-fg: #fff;
    --rb-fs: 12.5px;
    --rb-gap: 6px;
    margin-left: 6px;
}

.rasta-ui .rasta-ctrl__next:hover {
    --rb-bg: var(--r-blue);
}

.rasta-ui .rasta-ctrl__next svg {
    width: 15px;
    height: 15px;
}

/* جلسه‌ی بعد */
.rasta-ui .rasta-player__upnext {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    background: rgba(4, 6, 12, .74);
    text-align: center;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    animation: rastaFadeUp .35s ease both;
}

.rasta-ui .rasta-player__upnext-label {
    color: var(--p-muted);
    font-size: 13px;
    font-weight: 700;
}

.rasta-ui .rasta-player__upnext-title {
    max-width: 80%;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.6;
}

.rasta-ui .rasta-player__upnext-go {
    --rb-w: 80px;
    --rb-h: 80px;
    --rb-pad: 0;
    --rb-r: 50%;
    --rb-bg: #fff;
    --rb-fg: var(--r-blue);
    position: relative;
    margin: 14px 0 6px;
}

.rasta-ui .rasta-player__upnext-go:hover {
    --rb-tf: scale(1.06);
}

.rasta-ui .rasta-player__upnext-go > svg:last-child {
    width: 26px;
    height: 26px;
    transform: translateX(2px);
}

.rasta-ui .rasta-countdown {
    position: absolute;
    top: -9px;
    left: -9px;
    width: calc(100% + 18px);
    height: calc(100% + 18px);
    transform: rotate(-90deg);
}

.rasta-ui .rasta-countdown circle {
    fill: none;
    stroke: var(--r-blue);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 138.3;
    stroke-dashoffset: 138.3;
}

.rasta-ui .rasta-player__upnext.is-counting .rasta-countdown circle {
    animation: rastaCount 6s linear forwards;
}

@keyframes rastaCount {
    to { stroke-dashoffset: 0; }
}

.rasta-ui .rasta-player__upnext-cancel {
    --rb-h: 34px;
    --rb-pad: 0 16px;
    --rb-r: 999px;
    --rb-fg: rgba(255, 255, 255, .7);
    --rb-fs: 13px;
}

.rasta-ui .rasta-player__upnext-cancel:hover {
    --rb-bg: rgba(255, 255, 255, .08);
    --rb-fg: #fff;
}

/* لیست پخش */
.rasta-ui .rasta-player__list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 150px);
    overflow: hidden;
    border: 1px solid var(--p-line);
    border-radius: 22px;
    background: rgba(255, 255, 255, .04);
}

.rasta-ui .rasta-player__list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--p-line);
}

.rasta-ui .rasta-player__list-head strong {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.rasta-ui .rasta-player__list-head span {
    color: var(--p-muted);
    font-size: 12.5px;
}

.rasta-ui .rasta-player__list-body {
    flex: 1;
    min-height: 0;
    padding: 8px;
    overflow-y: auto;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
    scrollbar-width: thin;
}

.rasta-ui .rasta-plist__season {
    padding: 12px 10px 6px;
    color: var(--p-muted);
    font-size: 12px;
    font-weight: 800;
}

.rasta-ui .rasta-plist__item {
    --rb-display: flex;
    --rb-w: 100%;
    --rb-h: auto;
    --rb-pad: 10px;
    --rb-r: 14px;
    --rb-gap: 12px;
    --rb-justify: flex-start;
    --rb-align: start;
    --rb-ws: normal;
    --rb-fw: 400;
    --rb-lh: 1.5;
    --rb-fg: rgba(255, 255, 255, .82);
}

.rasta-ui .rasta-plist__item:hover {
    --rb-bg: rgba(255, 255, 255, .06);
    --rb-fg: #fff;
}

.rasta-ui .rasta-plist__item.is-active {
    --rb-bg: rgba(47, 107, 255, .22);
    --rb-fg: #fff;
}

.rasta-ui .rasta-plist__no {
    display: grid;
    flex: 0 0 34px;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    font-size: 12px;
    font-weight: 800;
}

.rasta-ui .rasta-plist__item.is-active .rasta-plist__no {
    background: var(--r-blue);
    color: #fff;
}

.rasta-ui .rasta-plist__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rasta-ui .rasta-plist__title {
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rasta-ui .rasta-plist__time {
    color: rgba(255, 255, 255, .5);
    font-size: 11.5px;
}

.rasta-ui .rasta-plist__time:empty {
    display: none;
}

.rasta-ui .rasta-plist__state {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.rasta-ui .rasta-plist__check {
    display: none;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--r-green);
    color: #fff;
}

.rasta-ui .rasta-plist__check svg {
    width: 11px;
    height: 11px;
}

.rasta-ui .rasta-plist__item.is-watched .rasta-plist__check {
    display: grid;
}

.rasta-ui .rasta-plist__eq {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.rasta-ui .rasta-plist__eq i {
    display: block;
    width: 3px;
    height: 40%;
    border-radius: 2px;
    background: #86ADFF;
    animation: rastaEq .9s ease-in-out infinite;
}

.rasta-ui .rasta-plist__eq i:nth-child(2) {
    animation-delay: -.3s;
}

.rasta-ui .rasta-plist__eq i:nth-child(3) {
    animation-delay: -.6s;
}

.rasta-ui.rasta-player:not(.is-playing) .rasta-plist__eq i {
    animation-play-state: paused;
}

.rasta-ui .rasta-plist__item.is-active .rasta-plist__eq {
    display: inline-flex;
}

.rasta-ui .rasta-plist__item.is-active .rasta-plist__check {
    display: none;
}

@keyframes rastaEq {
    0%, 100% { height: 30%; }
    50%      { height: 100%; }
}

/* ================= موبایل ================= */

@media (max-width: 960px) {
    .rasta-ui.rasta-player {
        align-items: stretch;
        padding: 0;
    }

    .rasta-ui .rasta-player__shell {
        gap: 0;
        width: 100%;
        height: 100%;
    }

    .rasta-ui .rasta-player__top {
        padding: 12px 14px;
    }

    .rasta-ui .rasta-player__title {
        font-size: 15.5px;
    }

    .rasta-ui .rasta-tool {
        --rb-w: 40px;
        --rb-h: 40px;
    }

    .rasta-ui .rasta-player__main {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        flex: 1;
        gap: 0;
    }

    .rasta-ui .rasta-player__stage {
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }

    .rasta-ui .rasta-player__list {
        max-height: none;
        border: 0;
        border-top: 1px solid var(--p-line);
        border-radius: 0;
    }

    .rasta-ui .rasta-ctrl__time {
        margin-left: 4px;
        font-size: 12px;
    }

    .rasta-ui .js-p-back,
    .rasta-ui .js-p-fwd,
    .rasta-ui .js-p-pip,
    .rasta-ui .rasta-vol__range {
        display: none;
    }

    .rasta-ui .rasta-ctrl__next span {
        display: none;
    }
}

@media (max-width: 720px) {
    .rasta-ui.rasta-course {
        margin: 32px 0;
    }

    .rasta-ui .rasta-course__progress {
        flex-wrap: wrap;
        width: 100%;
    }

    .rasta-ui .rasta-cta {
        width: 100%;
        margin: 0;
        --rb-w: 100%;
    }

    .rasta-ui .rasta-cta__text em {
        max-width: none;
    }

    .rasta-ui .rasta-season__head {
        --rb-pad: 16px;
        --rb-gap: 12px;
    }

    .rasta-ui .rasta-season__num {
        min-width: 44px;
        font-size: 32px;
    }

    .rasta-ui .rasta-season__icon {
        display: none;
    }

    .rasta-ui .rasta-season__title {
        font-size: 16.5px;
    }

    .rasta-ui .rasta-season__chev {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .rasta-ui .rasta-season__desc {
        margin-inline: 16px;
    }

    .rasta-ui .rasta-lessons {
        padding: 4px 8px 12px;
    }

    .rasta-ui .rasta-lesson {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
        padding: 10px 6px;
    }

    .rasta-ui .rasta-lesson__thumb {
        --rb-w: 112px;
        width: 112px;
    }

    .rasta-ui .rasta-lesson__title {
        font-size: 14.5px;
    }

    .rasta-ui .rasta-lesson__actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rasta-ui *,
    .rasta-ui *::before,
    .rasta-ui *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}




/* موبایل: وقتی لیست پخش بسته است، ویدیو وسط صفحه قرار می‌گیرد */
@media (max-width: 960px) {
    .rasta-ui.rasta-player.no-list .rasta-player__main {
        grid-template-rows: auto;
        align-content: center;
    }
}



/* =====================================================================
 * بازطراحی سرفصل‌ها — نسخه‌ی ۲ (این بخش باید در انتهای فایل بماند)
 * ===================================================================== */

/* ---------- سربرگ ---------- */
.rasta-ui .rasta-course__eyebrow { font-weight: 600; }
.rasta-ui .rasta-course__title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.45; }
.rasta-ui .rasta-course__stats b { font-weight: 700; }
.rasta-ui .rasta-course__progress-text strong { font-weight: 700; }
.rasta-ui .rasta-ring b { font-weight: 700; }

/* دکمه‌ی ادامه‌ی یادگیری: روشن به جای تیره */
.rasta-ui .rasta-cta { --rb-h: 54px; --rb-pad: 0 7px 0 18px; --rb-bg: var(--r-blue-50); --rb-bd: var(--r-blue-100); --rb-fg: var(--r-ink); --rb-sh: none; }
.rasta-ui .rasta-cta:hover { --rb-bg: var(--r-blue); --rb-bd: var(--r-blue); --rb-fg: #fff; --rb-tf: translateY(-2px); --rb-sh: 0 16px 30px -14px rgba(47, 107, 255, .9); }
.rasta-ui .rasta-cta__icon { background: var(--r-blue); color: #fff; box-shadow: 0 8px 16px -8px rgba(47, 107, 255, .9); }
.rasta-ui .rasta-cta:hover .rasta-cta__icon { background: #fff; color: var(--r-blue); box-shadow: none; }
.rasta-ui .rasta-cta__text small { color: var(--r-blue); font-weight: 600; }
.rasta-ui .rasta-cta:hover .rasta-cta__text small { color: rgba(255, 255, 255, .8); }
.rasta-ui .rasta-cta__text em { font-weight: 700; }

/* ---------- فصل ---------- */
.rasta-ui.rasta-season { margin-bottom: 12px; border-radius: 22px; box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 14px 34px -30px rgba(16, 24, 40, .35); }
.rasta-ui.rasta-season.is-open { border-color: var(--r-blue-100); box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 30px 60px -44px rgba(47, 107, 255, .55); }
.rasta-ui .rasta-season__head { --rb-pad: 18px 20px; --rb-gap: 16px; --rb-r: 22px; }

.rasta-ui .rasta-season__badge { position: relative; display: grid; flex: 0 0 50px; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--r-blue-50); color: var(--r-blue); box-shadow: inset 0 0 0 1px rgba(47, 107, 255, .12); transition: background .3s ease, color .3s ease, box-shadow .3s ease; }
.rasta-ui .rasta-season__badge::after { content: ""; position: absolute; inset: 4px; border: 1.2px dashed rgba(47, 107, 255, .35); border-radius: 12px; transition: border-color .3s ease; }
.rasta-ui .rasta-season__badge svg { width: 22px; height: 22px; }
.rasta-ui .rasta-season__head:hover .rasta-season__badge { box-shadow: inset 0 0 0 1px rgba(47, 107, 255, .28); }
.rasta-ui.rasta-season.is-open .rasta-season__badge { background: var(--r-blue); color: #fff; box-shadow: 0 12px 24px -12px rgba(47, 107, 255, .9); }
.rasta-ui.rasta-season.is-open .rasta-season__badge::after { border-color: rgba(255, 255, 255, .45); }

.rasta-ui .rasta-season__text { gap: 1px; }
.rasta-ui .rasta-season__no { color: var(--r-blue); font-size: 12px; font-weight: 600; line-height: 1.6; }
.rasta-ui .rasta-season__no::before { content: "فصل " counter(rasta-season, rasta-fa); }
.rasta-ui .rasta-season__title { font-size: 16.5px; font-weight: 700; line-height: 1.6; }
.rasta-ui .rasta-season__meta { margin-top: 2px; font-size: 12.5px; }
.rasta-ui .rasta-season .rasta-ring { --size: 42px; --thick: 3.5px; }
.rasta-ui .rasta-season__chev { flex-basis: 38px; width: 38px; height: 38px; }
.rasta-ui .rasta-season__chev svg { width: 16px; height: 16px; }
.rasta-ui .rasta-season__desc { margin: 0 20px 4px; padding-bottom: 14px; font-size: 13.5px; }

/* ---------- جلسات: مسیر کوک‌خورده ---------- */
.rasta-ui .rasta-lessons { padding: 8px 10px 12px; }
.rasta-ui .rasta-lesson { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; padding: 12px 10px; border-radius: 16px; }
.rasta-ui .rasta-lesson + .rasta-lesson::before { display: none; }

/* خط کوک که جلسه‌ها را به هم وصل می‌کند */
.rasta-ui .rasta-lesson::after { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 30px; z-index: 0; width: 2px; background: repeating-linear-gradient(to bottom, var(--r-blue-100) 0 6px, transparent 6px 11px); pointer-events: none; }
.rasta-ui .rasta-lesson:first-child::after { top: 50%; }
.rasta-ui .rasta-lesson:last-child::after { bottom: 50%; }
.rasta-ui .rasta-lesson:only-child::after { display: none; }
.rasta-ui .rasta-lesson.is-watched::after { background: repeating-linear-gradient(to bottom, rgba(18, 183, 106, .55) 0 6px, transparent 6px 11px); }

/* نشانگر جلسه */
.rasta-ui .rasta-lesson__node { --rb-display: grid; --rb-w: 42px; --rb-h: 42px; --rb-pad: 0; --rb-r: 50%; --rb-bg: #fff; --rb-bd: var(--r-line); --rb-fg: var(--r-ink-2); position: relative; z-index: 1; display: grid; place-items: center; width: 42px; height: 42px; margin: 0; padding: 0; border: 1px solid var(--r-line); border-radius: 50%; background: #fff; color: var(--r-ink-2); }
.rasta-ui .rasta-lesson__node::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(var(--r-blue) calc(var(--lp, 0) * 1%), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); pointer-events: none; }
.rasta-ui .rasta-lesson__node > span { display: grid; grid-area: 1 / 1; place-items: center; transition: opacity .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.rasta-ui .rasta-node__no { font-size: 12.5px; font-weight: 700; line-height: 1; }
.rasta-ui .rasta-node__play, .rasta-ui .rasta-node__done { opacity: 0; transform: scale(.5); }
.rasta-ui .rasta-node__play svg { width: 15px; height: 15px; transform: translateX(1px); }
.rasta-ui .rasta-node__done svg { width: 17px; height: 17px; }
.rasta-ui .rasta-lesson__node > .rasta-node__lock { position: absolute; bottom: -3px; inset-inline-end: -3px; display: grid; width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; background: var(--r-ink-2); color: #fff; }
.rasta-ui .rasta-node__lock svg { width: 10px; height: 10px; }

.rasta-ui .rasta-lesson.is-locked .rasta-lesson__node { background: var(--r-soft); color: var(--r-muted); }
.rasta-ui .rasta-lesson.is-watched .rasta-lesson__node { --rb-bg: var(--r-green); --rb-bd: var(--r-green); --rb-fg: #fff; border-color: var(--r-green); background: var(--r-green); color: #fff; }
.rasta-ui .rasta-lesson.is-watched .rasta-lesson__node::before { display: none; }
.rasta-ui .rasta-lesson.is-watched .rasta-node__no { opacity: 0; transform: scale(.5); }
.rasta-ui .rasta-lesson.is-watched .rasta-node__done { opacity: 1; transform: none; }



/* متن جلسه */
.rasta-ui .rasta-lesson__body { position: relative; z-index: 1; }
.rasta-ui .rasta-lesson__title { margin: 0 0 3px; font-size: 15px; font-weight: 600; line-height: 1.75; }
.rasta-ui .rasta-lesson__meta { gap: 4px 12px; color: var(--r-muted); }
.rasta-ui .rasta-lesson__type { margin: 0; font-size: 12.5px; }
.rasta-ui .rasta-lesson__type svg { width: 15px; height: 15px; color: var(--r-blue); }
.rasta-ui .rasta-lesson__dur { display: inline-flex; align-items: center; gap: 5px; color: var(--r-muted); font-size: 12.5px; }
.rasta-ui .rasta-lesson__dur svg { width: 14px; height: 14px; }
.rasta-ui .rasta-lesson__dur .rasta-lesson__time { position: static; z-index: auto; padding: 0; border-radius: 0; background: none; color: inherit; font-size: 12.5px; font-weight: 500; line-height: 1.6; direction: ltr; }
.rasta-ui .rasta-lesson__dur:has(.rasta-lesson__time:empty) { display: none; }
.rasta-ui .rasta-chip { font-weight: 600; }
.rasta-ui .rasta-lesson.is-watched .rasta-chip--done { display: none; }

/* دکمه‌ها */
.rasta-ui .rasta-lesson__actions { position: relative; z-index: 1; gap: 6px; }
.rasta-ui .rasta-play { --rb-w: 44px; --rb-h: 44px; }
.rasta-ui .rasta-play svg { width: 16px; height: 16px; }
.rasta-ui .rasta-check, .rasta-ui .rasta-icon-btn { --rb-w: 38px; --rb-h: 38px; }
.rasta-ui .rasta-check svg, .rasta-ui .rasta-icon-btn svg { width: 16px; height: 16px; }
.rasta-ui .rasta-pill { --rb-h: 38px; --rb-fw: 600; --rb-pad: 0 14px; }
.rasta-ui .rasta-pill--lock { --rb-bg: var(--r-soft); --rb-bd: var(--r-line); --rb-fg: var(--r-ink-2); }
.rasta-ui .rasta-pill--lock:hover { --rb-bg: var(--r-blue-50); --rb-bd: var(--r-blue-100); --rb-fg: var(--r-blue); --rb-tf: none; }

/* ---------- موبایل ---------- */
@media (max-width: 720px) {
    .rasta-ui .rasta-course__title { font-size: 22px; }
    .rasta-ui .rasta-season__head { --rb-pad: 14px; --rb-gap: 12px; }
    .rasta-ui .rasta-season__badge { flex-basis: 42px; width: 42px; height: 42px; border-radius: 14px; }
    .rasta-ui .rasta-season__badge::after { inset: 3px; border-radius: 11px; }
    .rasta-ui .rasta-season__badge svg { width: 19px; height: 19px; }
    .rasta-ui .rasta-season__title { font-size: 15.5px; }
    .rasta-ui .rasta-season .rasta-ring { --size: 38px; --thick: 3px; }
    .rasta-ui .rasta-season .rasta-ring b { font-size: 10px; }
    .rasta-ui .rasta-season__chev { flex-basis: 34px; width: 34px; height: 34px; }
    .rasta-ui .rasta-season__desc { margin-inline: 14px; }
    .rasta-ui .rasta-lessons { padding: 4px 6px 10px; }
    .rasta-ui .rasta-lesson { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 8px; }
    .rasta-ui .rasta-lesson::after { inset-inline-start: 25px; }
    .rasta-ui .rasta-lesson__node { --rb-w: 36px; --rb-h: 36px; width: 36px; height: 36px; }
    .rasta-ui .rasta-node__no { font-size: 11.5px; }
    .rasta-ui .rasta-lesson__title { font-size: 14px; }
    .rasta-ui .rasta-lesson__actions { grid-column: auto; justify-content: flex-end; gap: 4px; }
    .rasta-ui .rasta-lesson__actions:has(.rasta-pill--ghost, .rasta-pill--primary) { grid-column: 2 / -1; justify-content: flex-start; flex-wrap: wrap; margin-top: 6px; }
    .rasta-ui .rasta-play { --rb-w: 40px; --rb-h: 40px; }
    .rasta-ui .rasta-check, .rasta-ui .rasta-icon-btn { --rb-w: 34px; --rb-h: 34px; }
    .rasta-ui .rasta-pill--lock, .rasta-ui .rasta-pill--soon { --rb-w: 38px; --rb-pad: 0; }
    .rasta-ui .rasta-pill--lock span, .rasta-ui .rasta-pill--soon span { display: none; }
    .rasta-ui .rasta-lesson__content { grid-column: 1 / -1; }
}



/* ---------- نسخه‌ی ۲.۱: آیکن عنوان، آیکن دکمه‌ی فصل، جلسه‌ی بعدی ---------- */
.rasta-ui .rasta-course__title { display: flex; align-items: center; gap: 12px; }
.rasta-ui .rasta-course__title-icon { position: relative; display: grid; flex: 0 0 46px; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(145deg, #5B8CFF, var(--r-blue) 60%, var(--r-blue-600)); color: #fff; box-shadow: 0 14px 26px -14px rgba(47, 107, 255, .9); }
.rasta-ui .rasta-course__title-icon::after { content: ""; position: absolute; inset: 4px; border: 1.2px dashed rgba(255, 255, 255, .45); border-radius: 11px; }
.rasta-ui .rasta-course__title-icon svg { width: 22px; height: 22px; }

.rasta-ui .rasta-season__badge::after { display: none; }
.rasta-ui .rasta-season__badge svg { width: 24px; height: 24px; }

.rasta-ui .rasta-lesson.is-next { background: linear-gradient(to left, var(--r-blue-50), rgba(238, 243, 255, .25)); }
.rasta-ui .rasta-lesson.is-next .rasta-lesson__node { border-color: var(--r-blue); color: var(--r-blue); box-shadow: 0 0 0 4px rgba(47, 107, 255, .12); }
.rasta-ui .rasta-lesson.is-next .rasta-play { animation: rastaNextPulse 2.4s ease-out infinite; }
.rasta-ui .rasta-chip--next { gap: 6px; background: var(--r-blue); color: #fff; }
.rasta-ui .rasta-chip--next::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: rastaNextDot 1.4s ease-in-out infinite; }
@keyframes rastaNextPulse { 0% { box-shadow: 0 0 0 0 rgba(47, 107, 255, .45), 0 12px 24px -10px rgba(47, 107, 255, .85); } 70%, 100% { box-shadow: 0 0 0 12px rgba(47, 107, 255, 0), 0 12px 24px -10px rgba(47, 107, 255, .85); } }
@keyframes rastaNextDot { 50% { opacity: .35; } }

@media (max-width: 720px) {
    .rasta-ui .rasta-course__title { gap: 10px; }
    .rasta-ui .rasta-course__title-icon { flex-basis: 40px; width: 40px; height: 40px; border-radius: 13px; }
    .rasta-ui .rasta-course__title-icon::after { inset: 3px; border-radius: 10px; }
    .rasta-ui .rasta-course__title-icon svg { width: 19px; height: 19px; }
    .rasta-ui .rasta-season__badge svg { width: 21px; height: 21px; }
}



/* ---------- جداکننده‌ی محو بین جلسه‌ها ---------- */
.rasta-ui .rasta-lesson + .rasta-lesson::before { display: block; inset-inline-start: 66px; inset-inline-end: 10px; background: linear-gradient(to left, rgba(231, 235, 243, 0), var(--r-line) 10%, var(--r-line) 90%, rgba(231, 235, 243, 0)); opacity: .8; }
.rasta-ui .rasta-lesson.is-next::before,
.rasta-ui .rasta-lesson.is-next + .rasta-lesson::before { opacity: 0; }

@media (max-width: 720px) {
    .rasta-ui .rasta-lesson + .rasta-lesson::before { inset-inline-start: 54px; inset-inline-end: 8px; }
}



/* ---------- نسخه‌ی ۲.۲: نشان رستا در عنوان، کلاه آکادمی در فصل‌ها ---------- */
.rasta-ui .rasta-course__title-icon { overflow: hidden; background: none; box-shadow: 0 14px 26px -14px rgba(37, 99, 235, .9); }
.rasta-ui .rasta-course__title-icon::after { display: none; }
.rasta-ui .rasta-course__title-icon svg { width: 100%; height: 100%; }
.rasta-ui .rasta-season__badge svg { width: 26px; height: 26px; }

@media (max-width: 720px) {
    .rasta-ui .rasta-course__title-icon svg { width: 100%; height: 100%; }
    .rasta-ui .rasta-season__badge svg { width: 23px; height: 23px; }
}


/* ================= جلسه‌های قفل: قفل قرمز و پیام خرید ================= */
.rasta-ui .rasta-lesson__node > .rasta-node__lock { background: #F04438; box-shadow: 0 4px 10px -3px rgba(240, 68, 56, .75); }
.rasta-ui .rasta-pill--lock.is-paid-only { --rb-bg: #FEF3F2; --rb-bd: #FECDCA; --rb-fg: #B42318; }
.rasta-ui .rasta-pill--lock.is-paid-only:hover, .rasta-ui .rasta-pill--lock.is-paid-only[aria-expanded="true"] { --rb-bg: #FEE4E2; --rb-bd: #FDA29B; --rb-fg: #912018; }

.rasta-locktip { position: fixed; z-index: 100000; display: flex; flex-direction: column; gap: 2px; width: max-content; max-width: min(300px, calc(100vw - 24px)); padding: 12px 16px; border: 1px solid #FECDCA; border-radius: 16px; background: #fff; color: #344054; box-shadow: 0 24px 50px -24px rgba(16, 24, 40, .45); direction: rtl; font-family: inherit; font-size: 12.5px; line-height: 1.9; text-align: right; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s ease, transform .25s ease, visibility 0s linear .25s; pointer-events: none; }
.rasta-locktip.is-show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.rasta-locktip b { display: flex; align-items: center; gap: 6px; color: #B42318; font-size: 13.5px; font-weight: 700; }
.rasta-locktip b svg { flex: 0 0 16px; width: 16px; height: 16px; }
.rasta-locktip::before { content: ""; position: absolute; top: -6px; left: var(--tip-x, 50%); width: 10px; height: 10px; border-top: 1px solid #FECDCA; border-left: 1px solid #FECDCA; background: #fff; transform: translateX(-50%) rotate(45deg); }
.rasta-locktip.is-above::before { top: auto; bottom: -6px; border: 0; border-right: 1px solid #FECDCA; border-bottom: 1px solid #FECDCA; }