/* ==========================================================================
   Страница просмотра и плеер AniBaza (Anime4K)
   ========================================================================== */

.wp {
    max-width: 1920px;
    margin: 0 auto;
    padding: 8px clamp(16px, 3.6vw, 70px) 80px;
}

.wp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.wp-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 17px;
    font-weight: 600;
}

.wp-back .ic {
    flex: none;
    width: 18px;
    height: 18px;
    transform: rotate(90deg);
}

.wp-back span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: inherit;
    color: inherit;
}

.wp-back:hover {
    color: var(--text-color-emphasis);
}

.wp-blocked {
    max-width: 640px;
    margin: 40px auto;
    text-align: center;
    display: grid;
    gap: 14px;
    justify-items: center;
}

.wp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
    gap: 24px;
    align-items: start;
}

.wp-grid.is-theater {
    grid-template-columns: minmax(0, 1fr);
}

.wp-grid.is-theater .wp-side {
    max-height: none;
}

.wp-grid.is-theater .wp-eps {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.wp-main {
    min-width: 0;
}

.wp-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.wp-title {
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 1.5vw, 28px);
    font-weight: 700;
}

.wp-title span {
    font-size: inherit;
    color: inherit;
}

.wp-title b {
    font-size: inherit;
    color: var(--text-color-emphasis);
}

.wp-sub {
    margin-top: 4px;
    color: var(--text-color-muted);
}

.wp-nav {
    display: flex;
    flex: none;
    gap: 10px;
}

.wp-side {
    display: flex;
    flex-direction: column;
    max-height: min(78vh, 900px);
    padding: 20px;
}

.wp-side__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wp-side__head .cm-card__title {
    margin: 0;
}

.wp-eps {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0 4px 0 0;
    list-style: none;
    overflow-y: auto;
}

.wp-ep {
    display: flex;
    gap: 12px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: background-color .2s ease;
}

.wp-ep:hover {
    background: rgba(255, 255, 255, .05);
}

.wp-ep.is-active {
    border-color: rgba(1, 174, 76, .6);
    background: rgba(1, 174, 76, .1);
}

.wp-ep__thumb {
    flex: none;
    width: 112px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #1b1224;
}

.wp-ep__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-ep__num {
    position: absolute;
    right: 6px;
    bottom: 4px;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.wp-ep__body {
    display: grid;
    align-content: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.wp-ep__title {
    color: #fff;
    font-weight: 600;
}

.wp-ep.is-active .wp-ep__title {
    color: var(--text-color-emphasis);
}

.wp-ep__meta {
    color: var(--text-color-faint);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-ep__bar {
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
}

.wp-ep__bar i {
    display: block;
    height: 100%;
    background: var(--text-color-emphasis);
}

.wp-comments {
    max-width: 1100px;
    margin-top: 40px;
}

/* ---------- Плеер ---------- */

.ap-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.ap {
    --ap-accent: #01ae4c;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - var(--header-height) - 40px);
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.ap.is-theater {
    max-height: calc(100vh - var(--header-height) - 24px);
}

.ap.is-fs {
    max-height: none;
    border-radius: 0;
}

.ap *,
.ap svg,
.ap svg * {
    color: inherit;
}

.ap,
.ap button {
    color: #fff;
}

.ap svg {
    width: 24px;
    height: 24px;
    fill: none;
}

.ap-stage {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.ap-video,
.ap-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.ap.is-upscaled .ap-video {
    visibility: hidden;
}

.ap-canvas[hidden] {
    display: none;
}

.ap:not(.is-active):not(.is-paused) .ap-stage {
    cursor: none;
}

/* Субтитры */
.ap-subs {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: var(--sub-bottom, 8%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    pointer-events: none;
    transition: bottom .25s ease;
    container-type: inline-size;
}

.ap.is-active .ap-subs,
.ap.is-paused .ap-subs {
    bottom: calc(var(--sub-bottom, 8%) + 64px);
}

.ap-subs span {
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--sub-bg, rgba(0, 0, 0, .5));
    color: var(--sub-color, #fff);
    font-family: var(--sub-font);
    font-size: calc(clamp(15px, 2.6cqw, 44px) * var(--sub-size, 1));
    font-weight: 600;
    line-height: 1.3;
    white-space: pre-line;
}

.ap-subs span * {
    font-size: inherit;
    color: inherit;
    font-family: inherit;
}

.ap-subs.is-outline span {
    text-shadow: 0 0 3px #000, 0 0 3px #000, 1px 1px 2px #000, -1px -1px 2px #000;
}

/* Сравнение */
.ap-compare {
    position: absolute;
    pointer-events: none;
}

.ap-compare[hidden] {
    display: none;
}

.ap-compare__label {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .6);
    font-size: 13px;
    font-weight: 600;
}

.ap-compare__label_right {
    left: auto;
    right: 14px;
    color: var(--ap-accent);
}

.ap-compare__handle {
    position: absolute;
    top: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .5);
    cursor: ew-resize;
    pointer-events: auto;
    touch-action: none;
}

.ap-compare__handle::before,
.ap-compare__handle::after {
    content: "";
    position: absolute;
    top: 50%;
    border: 6px solid transparent;
    margin-top: -6px;
}

.ap-compare__handle::before {
    left: 3px;
    border-right-color: #111;
}

.ap-compare__handle::after {
    right: 3px;
    border-left-color: #111;
}

/* Центр: кнопка, загрузка, вспышка */
.ap-big {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    border: 0;
    border-radius: 50%;
    background: var(--ap-accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    cursor: pointer;
    opacity: 0;
    transform: scale(.8);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.ap-big svg {
    width: 38px;
    height: 38px;
    margin-left: 4px;
}

.ap.is-paused:not(.is-loading) .ap-big {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.ap-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    display: none;
    pointer-events: none;
}

.ap-spinner i {
    position: absolute;
    inset: 0;
    border: 4px solid rgba(255, 255, 255, .2);
    border-top-color: var(--ap-accent);
    border-radius: 50%;
    animation: ap-spin .8s linear infinite;
}

.ap.is-loading:not(.is-paused) .ap-spinner,
.ap.is-gpu-loading .ap-spinner {
    display: block;
}

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

.ap-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .6);
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.ap-flash b {
    font-size: 18px;
    color: #fff;
}

.ap-flash.is-on {
    animation: ap-flash .7s ease;
}

@keyframes ap-flash {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.9); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; }
}

/* Всплывающие плашки */
.ap-chip {
    height: 36px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ap-chip:hover {
    background: rgba(255, 255, 255, .16);
}

.ap-chip_accent {
    border-color: transparent;
    background: var(--ap-accent);
}

.ap-chip_accent:hover {
    background: var(--ap-accent);
    filter: brightness(1.1);
}

.ap-toast {
    position: absolute;
    top: 18px;
    left: 50%;
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .75);
    font-size: 14px;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.ap-toast[hidden],
.ap-resume[hidden],
.ap-skip[hidden],
.ap-upnext[hidden],
.ap-error[hidden],
.ap-stats[hidden],
.ap-menu[hidden] {
    display: none;
}

.ap-resume {
    position: absolute;
    left: 20px;
    bottom: 96px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(10, 6, 16, .85);
    backdrop-filter: blur(8px);
}

.ap-resume span {
    font-size: 14px;
}

.ap-skip {
    position: absolute;
    right: 20px;
    bottom: 96px;
    height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 12px;
    background: rgba(0, 0, 0, .65);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.ap-skip:hover {
    border-color: var(--ap-accent);
    background: rgba(0, 0, 0, .8);
}

.ap-upnext {
    position: absolute;
    right: 20px;
    bottom: 96px;
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(10, 6, 16, .9);
}

.ap-upnext p,
.ap-upnext b {
    font-size: 15px;
}

.ap-upnext__btns {
    display: flex;
    gap: 8px;
}

.ap-error {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    padding: 20px;
    background: rgba(0, 0, 0, .8);
    text-align: center;
}

.ap-stats {
    position: absolute;
    top: 14px;
    left: 14px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .7);
    font: 12px/1.5 Consolas, "JetBrains Mono", monospace;
    color: #c8ffd9;
    max-width: min(520px, calc(100% - 28px));
    white-space: pre-wrap;
    pointer-events: none;
}

/* Нижняя панель */
.ap-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 16px 10px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}

.ap.is-active .ap-bar,
.ap.is-paused .ap-bar,
.ap.is-menu .ap-bar,
.ap:focus-within .ap-bar {
    opacity: 1;
    transform: none;
}

.ap-progress {
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.ap-progress__rail {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .22);
    transition: height .15s ease;
}

.ap-progress:hover .ap-progress__rail,
.ap.is-seeking .ap-progress__rail {
    height: 6px;
}

.ap-progress__rail i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: inherit;
}

.ap-progress__buf {
    background: rgba(255, 255, 255, .35);
}

.ap-progress__played {
    background: var(--ap-accent);
}

.ap-progress__op {
    background: rgba(255, 214, 0, .55);
    z-index: 1;
}

.ap-progress__op[hidden] {
    display: none;
}

.ap-progress__thumb {
    top: 50% !important;
    bottom: auto !important;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50% !important;
    background: var(--ap-accent);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .25);
    transform: scale(0);
    transition: transform .15s ease;
    z-index: 2;
}

.ap-progress:hover .ap-progress__thumb,
.ap.is-seeking .ap-progress__thumb {
    transform: scale(1);
}

.ap-progress__tip {
    position: absolute;
    bottom: 22px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .85);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
}

.ap-progress:hover .ap-progress__tip {
    opacity: 1;
}

.ap-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.ap-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    transition: background-color .15s ease;
}

.ap-btn:hover {
    background: rgba(255, 255, 255, .12);
}

.ap-btn:disabled {
    opacity: .35;
    cursor: default;
    background: none;
}

.ap-btn[hidden] {
    display: none;
}

.ap-btn.is-on {
    color: var(--ap-accent);
}

.ap-btn_gear svg {
    transition: transform .3s ease;
}

.ap-btn_gear.is-on svg {
    transform: rotate(60deg);
}

.ap-badge {
    position: absolute;
    top: 4px;
    right: 1px;
    padding: 0 3px;
    border-radius: 4px;
    background: var(--ap-accent);
    font-size: 9px;
    font-weight: 800;
    line-height: 13px;
}

.ap-badge[hidden] {
    display: none;
}

.ap-spacer {
    flex: 1;
}

.ap-time {
    margin-left: 8px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ap-time span {
    font-size: inherit;
}

.ap-volume {
    display: flex;
    align-items: center;
}

.ap-volume__range {
    width: 0;
    opacity: 0;
    transition: width .2s ease, opacity .2s ease;
}

.ap-volume:hover .ap-volume__range,
.ap-volume:focus-within .ap-volume__range {
    width: 90px;
    opacity: 1;
    margin: 0 6px;
}

.ap-range {
    --fill: 100%;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--ap-accent) var(--fill), rgba(255, 255, 255, .25) var(--fill));
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.ap-range::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.ap-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.ap-a4k {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    height: 32px;
    margin-right: 4px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    font-size: 14px;
    font-weight: 800;
    line-height: 30px;
    cursor: pointer;
}

.ap-a4k small {
    font-size: 11px;
    font-weight: 600;
    opacity: .8;
}

.ap-a4k:hover {
    border-color: var(--ap-accent);
}

.ap-a4k.is-on {
    border-color: transparent;
    background: var(--ap-accent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--ap-accent) 60%, transparent);
}

.ap-a4k.is-error {
    background: rgba(255, 77, 94, .3);
}

/* Меню настроек */
.ap-menu {
    position: absolute;
    right: 14px;
    bottom: 82px;
    width: min(380px, calc(100% - 28px));
    max-height: calc(100% - 100px);
    border-radius: 16px;
    background: rgba(14, 9, 20, .94);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
    overflow-y: auto;
    overscroll-behavior: contain;
    cursor: default;
}

.ap-menu__panel {
    display: grid;
    padding: 8px;
}

.ap-menu__head,
.ap-menu__row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    text-align: left;
    cursor: pointer;
}

.ap-menu__head {
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px 10px 0 0;
    font-weight: 700;
}

.ap-menu__head span {
    font-size: 15px;
    font-weight: 700;
}

.ap-menu__head svg,
.ap-menu__row svg {
    flex: none;
    width: 18px;
    height: 18px;
    opacity: .7;
}

.ap-menu__row:hover,
.ap-menu__head:hover {
    background: rgba(255, 255, 255, .07);
}

.ap-menu__label {
    flex: 1;
    display: grid;
    gap: 2px;
    font-size: 15px;
}

.ap-menu__label small {
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    line-height: 1.35;
}

.ap-menu__value {
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
    text-align: right;
}

.ap-menu__radio i {
    flex: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
}

.ap-menu__radio.is-on i {
    border: 5px solid var(--ap-accent);
}

.ap-menu__radio.is-on .ap-menu__label {
    color: #fff;
}

.ap-menu__toggle i {
    flex: none;
    width: 40px;
    height: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .2);
    transition: background-color .2s ease;
}

.ap-menu__toggle i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}

.ap-menu__toggle.is-on i {
    background: var(--ap-accent);
}

.ap-menu__toggle.is-on i::after {
    transform: translateX(18px);
}

.ap-menu__slider {
    display: grid;
    gap: 10px;
    padding: 10px 12px;
}

.ap-menu__slider .ap-menu__label {
    display: flex;
    justify-content: space-between;
}

.ap-menu__slider b {
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
    font-weight: 600;
}

.ap-menu__swatches {
    display: grid;
    gap: 10px;
    padding: 10px 12px;
}

.ap-menu__swatches div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ap-menu__swatches button,
.ap-menu__swatches input {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    cursor: pointer;
}

.ap-menu__swatches input {
    background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
    overflow: hidden;
}

.ap-menu__swatches input::-webkit-color-swatch-wrapper {
    padding: 0;
    opacity: 0;
}

.ap-menu__swatches button.is-on {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .6) inset;
}

.ap-menu__note {
    padding: 8px 12px 4px;
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    line-height: 1.45;
    text-transform: none;
}

.ap-menu__note.is-warn {
    color: #ffb4bb;
}

.ap-menu__action {
    margin: 8px 12px 4px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
    font-size: 14px;
    cursor: pointer;
}

.ap-menu__action:hover {
    background: rgba(255, 255, 255, .1);
}

.ap-menu__action.is-accent {
    border-color: transparent;
    background: var(--ap-accent);
}

.ap-menu__demo {
    display: grid;
    place-items: center;
    height: 70px;
    margin: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3a2a5a, #12304a);
}

.ap-menu__demo span {
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--sub-bg, rgba(0, 0, 0, .5));
    color: var(--sub-color, #fff);
    font-family: var(--sub-font);
    font-weight: 600;
}

.ap-menu__keys {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 4px 12px 8px;
}

.ap-menu__keys div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.ap-menu__keys dt {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ap-menu__keys dd {
    margin: 0;
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
    text-align: right;
}

/* ---------- Адаптив ---------- */

@media screen and (max-width: 1100px) {
    .wp-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .wp-side {
        max-height: 460px;
    }
}

@media screen and (max-width: 640px) {
    .wp {
        padding-left: 0;
        padding-right: 0;
    }

    .wp-top,
    .wp-info,
    .wp-side,
    .wp-comments {
        margin-left: 16px;
        margin-right: 16px;
    }

    .ap {
        border-radius: 0;
    }

    .wp-info {
        flex-direction: column;
    }

    .ap-btn {
        width: 36px;
        height: 36px;
    }

    .ap-btn[data-ap-prev],
    .ap-btn[data-ap-theater],
    .ap-volume__range,
    .ap-a4k small {
        display: none;
    }

    .ap-time {
        font-size: 12px;
    }

    .ap-menu {
        right: 8px;
        bottom: 64px;
        max-height: calc(100% - 72px);
    }

    .ap-resume,
    .ap-skip,
    .ap-upnext {
        bottom: 72px;
    }
}

/* ---------- Источники: AniBaza 4K, Kodik, Sibnet в одном плеере ---------- */
.wp-sources {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 16px;
}

.wp-sources__tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
}

.wp-src {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .75);
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.wp-src:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.wp-src.is-active {
    background: #01ae4c;
    color: #fff;
}

.wp-src small {
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .25);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.wp-sources__note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
}

.wp-sources__note svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: #01ae4c;
    fill: currentColor;
}

.wp-sources__note b {
    color: #fff;
}

.wp-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.wp-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.wp-side__note {
    margin: 0 0 16px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .wp-sources__tabs {
        width: 100%;
        overflow-x: auto;
    }

    .wp-src {
        flex: 1;
        justify-content: center;
        padding: 9px 12px;
    }
}

.wp-title > span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.wp-back span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
