@charset "UTF-8";

/*
 * Страница просмотра
 *
 * Файл выделен из общего style.css: правило для одной зоны ответственности.
 */

/*===================================================================================================================
    Страница просмотра
===================================================================================================================*/
.watch-page {
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.watch-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    color: #a5a5a5;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.watch-back:hover {
    color: #ffffff;
}

.watch-error {
    font-size: 16px;
    color: #d5d5d7;
    padding: 40px 0;
}

/*===================================================================================================================
    Индикатор загрузки
===================================================================================================================*/
.watch-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 46vh;
    padding: 40px 0;
    text-align: center;
}

.watch-spinner {
    width: 46px;
    height: 46px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #cc1d1d;
    border-radius: 50%;
    animation: watch-spin 0.9s linear infinite;
}

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

.watch-loading-text {
    margin: 0;
    font-size: 14px;
    color: #8b8b90;
}

@media (prefers-reduced-motion: reduce) {
    .watch-spinner {
        animation: none;
        border-color: rgba(255, 255, 255, 0.16);
        border-top-color: #cc1d1d;
    }
}

.player {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 28px;
    border-radius: 14px;
    overflow: hidden;
    background-color: #050506;
    /* Кнопка «Смотреть» ведёт сюда — не прячем плеер под фиксированной шапкой */
    scroll-margin-top: 96px;
}

.player-video {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #000000;
}

.player-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background-color: #000000;
}

/*===================================================================================================================
    Свои контролы плеера
===================================================================================================================*/
.plr {
    position: absolute;
    inset: 0;
    z-index: 4;
    --plr-accent: #cc1d1d;
    --plr-text: #ffffff;
    --plr-dim: rgba(255, 255, 255, 0.62);
}

/* Нижняя панель: появляется над видео, пока не «заснула» */
.plr-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 26px 16px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.plr.is-idle .plr-panel {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

/* Полоса прокрутки серии: буфер, прогресс и ползунок */
.plr-timeline {
    position: relative;
    height: 18px;
    margin: 0 2px;
    cursor: pointer;
    touch-action: none;
}

.plr-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    transform: translateY(-50%);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.22);
    transition: height 0.15s ease;
}

.plr-buffered,
.plr-progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 6px;
    transform: translateY(-50%);
    border-radius: 999px;
    transition: height 0.15s ease;
}

.plr-buffered {
    background-color: rgba(255, 255, 255, 0.3);
}

.plr-progress {
    background-color: var(--plr-accent);
}

.plr-timeline:hover::before,
.plr-timeline:hover .plr-buffered,
.plr-timeline:hover .plr-progress,
.plr-timeline:focus-visible::before,
.plr-timeline:focus-visible .plr-buffered,
.plr-timeline:focus-visible .plr-progress {
    height: 8px;
}

.plr-handle {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    transform: translateY(-50%) scale(0.6);
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(204, 29, 29, 0.35);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.plr-timeline:hover .plr-handle,
.plr-timeline:focus-visible .plr-handle {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.plr-timeline:focus-visible {
    outline: none;
}

.plr-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.plr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--plr-text);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.plr-btn:hover {
    background-color: rgba(255, 255, 255, 0.14);
}

.plr-btn:active {
    transform: scale(0.94);
}

.plr-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.plr-icon {
    display: block;
}

/* Иконка переключается классом состояния плеера */
.plr-icon--pause,
.player.is-playing .plr-icon--play {
    display: none;
}

.player.is-playing .plr-icon--pause {
    display: block;
}

.plr-icon--muted,
.player.is-muted .plr-icon--sound {
    display: none;
}

.player.is-muted .plr-icon--muted {
    display: block;
}

.plr-time {
    padding: 0 4px 0 2px;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    color: var(--plr-dim);
    white-space: nowrap;
}

.plr-time #player-current {
    color: var(--plr-text);
}

.plr-time-sep {
    margin: 0 4px;
    opacity: 0.5;
}

.plr-volume {
    display: flex;
    align-items: center;
    gap: 2px;
}

.plr-volume-range {
    width: 74px;
    height: 4px;
    appearance: none;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    accent-color: var(--plr-accent);
}

.plr-volume-range::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background-color: #ffffff;
    cursor: pointer;
}

.plr-volume-range::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background-color: #ffffff;
    cursor: pointer;
}

.plr-spacer {
    flex: 1;
}

/* Большая кнопка по центру — когда пауза */
.plr-center {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    transform: translate(-50%, -50%) scale(1);
    border: 0;
    border-radius: 50%;
    background-color: rgba(204, 29, 29, 0.92);
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

/* Треугольник нарисован симметрично внутри viewBox — дополнительных сдвигов не нужно */
.plr-center svg {
    width: 24px;
    height: 24px;
}

.plr-center:hover {
    background-color: #e52e2e;
    transform: translate(-50%, -50%) scale(1.06);
}

.plr-center:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 3px;
}

.player.is-playing .plr-center {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    pointer-events: none;
}

/* «Пропустить опенинг» — над панелью справа, видна и когда контролы «спят» */
.plr-skip {
    position: absolute;
    right: 16px;
    bottom: 84px;
    z-index: 2;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.plr-skip:hover {
    border-color: rgba(204, 29, 29, 0.8);
    background-color: rgba(204, 29, 29, 0.85);
}

.plr-skip:active {
    transform: scale(0.97);
}

/* В полноэкранном режиме панель крупнее и не упирается в края */
.player.is-fullscreen {
    border-radius: 0;
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
}

.player.is-fullscreen .plr-panel {
    padding: 34px 28px 20px;
}

.player.is-fullscreen .plr-center {
    width: 68px;
    height: 68px;
}

@media (max-width: 640px) {
    .plr-panel {
        padding: 22px 10px 8px;
    }

    .plr-btn {
        width: 30px;
        height: 30px;
    }

    /* На телефоне громкость меняют кнопками устройства — ползунок убираем */
    .plr-volume-range {
        display: none;
    }

    .plr-time {
        font-size: 11.5px;
    }

    .plr-center {
        width: 46px;
        height: 46px;
    }

    .plr-center svg {
        width: 18px;
        height: 18px;
    }

    .plr-skip {
        right: 10px;
        bottom: 72px;
        padding: 8px 14px;
        font-size: 12.5px;
    }
}

.player-status {
    position: absolute;
    left: 12px;
    bottom: 56px;
    z-index: 7;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.72);
    font-size: 12.5px;
    color: #e6e6e6;
    pointer-events: none;
}

.player-status[hidden] {
    display: none;
}

.player-source {
    margin: -18px 0 24px;
    font-size: 13px;
    color: #7a7a80;
}

.player-placeholder {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 24px;
    text-align: center;
    font-size: 14px;
    color: #7a7a80;
    background: radial-gradient(circle at 50% 40%, rgba(204, 29, 29, 0.16), transparent 60%), #08080a;
}

.player-placeholder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding-left: 4px;
    border-radius: 50%;
    background-color: #cc1d1d;
    color: #ffffff;
    font-size: 22px;
}

.player-placeholder[hidden],
.player-video[hidden],
.player-frame[hidden] {
    display: none;
}

.watch-info {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
}

/* Другие сезоны: карточки с постерами во всю ширину страницы, под постером и кнопками */
.watch-seasons {
    margin-bottom: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.watch-seasons-title {
    margin: 0 0 12px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #7a7a80;
}

.watch-seasons-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 18px 14px;
}

/* Карточки тут мельче, чем в каталоге: подписи компактнее */
.watch-seasons-list .card-title {
    margin: 8px 0 5px;
    font-size: 12.5px;
    line-height: 1.32;
}

.watch-seasons-list .card-meta {
    gap: 6px;
    font-size: 11px;
}

.watch-seasons-list .card-meta-episodes {
    padding: 1px 6px;
    font-size: 10px;
}

/* Текущий сезон: не ссылка, а подсвеченная карточка */
.watch-seasons-list .anime-card.is-current:hover {
    transform: none;
}

.watch-seasons-list .is-current .card-poster {
    box-shadow: 0 0 0 2px #cc1d1d;
}

.watch-seasons-list .is-current .card-title {
    color: #ff6b6b;
}

.watch-main {
    flex: 1;
    min-width: 0;
}

.watch-title {
    margin: 0 0 14px;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.watch-description {
    max-width: 760px;
    font-size: 15px;
    line-height: 1.7;
    color: #d5d5d7;
    /* Длинные описания не должны раздувать блок выше плеера */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* высоту плавно ведём через max-height из js */
    transition: max-height 0.35s ease;
}

.watch-description.is-expanded {
    display: block;
    /* не visible: иначе max-height не обрезает и анимация не видна */
    overflow: hidden;
}

.watch-description-toggle {
    margin-top: 8px;
    padding: 0;
    border: none;
    background: none;
    color: #ff6b6b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.watch-description-toggle:hover {
    color: #ff8b8b;
}

.watch-description-toggle[hidden] {
    display: none;
}

.watch-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 200px;
    flex-shrink: 0;
}

.watch-poster {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1a1a1c;
}

.watch-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.watch-poster img.is-loaded {
    opacity: 1;
}

.watch-side .btn-fav,
.watch-play {
    width: 100%;
    justify-content: center;
}

.watch-play {
    gap: 8px;
}

/*===================================================================================================================
    Выбор серии
===================================================================================================================*/
.episode-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.episode-step {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background-color: #16161a;
    color: #c9c9cf;
    font-family: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.episode-step:hover:not(:disabled) {
    background-color: #22222a;
    color: #ffffff;
}

.episode-step:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.episode-picker {
    position: relative;
    min-width: 0;
}

.episode-current {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    max-width: min(520px, 62vw);
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background-color: #16161a;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.episode-current:hover,
.episode-current[aria-expanded='true'] {
    background-color: #22222a;
    border-color: rgba(255, 255, 255, 0.12);
}

.episode-current-number {
    flex-shrink: 0;
    font-weight: 700;
}

.episode-current-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #a5a5a5;
    font-size: 13px;
}

.episode-current-title[hidden] {
    display: none;
}

.episode-caret {
    margin-left: auto;
    padding-left: 4px;
    flex-shrink: 0;
    color: #7a7a80;
    font-size: 11px;
}

.episode-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    width: max(100%, 380px);
    max-width: calc(100vw - 48px);
    max-height: 340px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background-color: #101012;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.episode-menu[hidden] {
    display: none;
}

/* Места снизу нет — список раскрывается вверх */
.episode-menu.is-up {
    top: auto;
    bottom: calc(100% + 8px);
}

.episode-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 9px;
    background: none;
    color: #d5d5d7;
    font-family: inherit;
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.episode-option:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.episode-option.is-active {
    background-color: rgba(204, 29, 29, 0.16);
    color: #ffffff;
}

/* Серия есть в списке, но отсутствует у текущего источника видео */
.episode-option:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.episode-option-number {
    flex-shrink: 0;
    width: 34px;
    color: #7a7a80;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.episode-option.is-active .episode-option-number {
    color: #ff6b6b;
}

.episode-option-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.episode-counter {
    margin-left: auto;
    font-size: 13px;
    color: #7a7a80;
    font-variant-numeric: tabular-nums;
}

/* Ещё не вышедшая серия в конце списка — видно, когда ждать продолжение */
.episode-option--next {
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 9px 9px;
    padding-top: 11px;
    opacity: 0.6;
    cursor: default;
}

.episode-option--next .episode-option-title {
    color: #8b8b90;
}

/* Подпись под панелью серий для онгоингов */
.episode-upcoming {
    /* .episode-bar уже даёт отступ снизу — подтягиваем подпись ближе к панели */
    margin: -18px 0 30px;
    font-size: 13px;
    color: #8b8b90;
}

.episode-upcoming strong {
    color: #ffffff;
    font-weight: 600;
}

/*===================================================================================================================
    Комментарии
===================================================================================================================*/
.comments {
    margin-top: 8px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.comments-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.comments-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.comments-count {
    font-size: 13px;
    color: #8b8b90;
    font-variant-numeric: tabular-nums;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

/* Поле ввода вместе с панелью инструментов — один визуальный блок */
.comment-input-wrap {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background-color: #101012;
    transition: border-color 0.2s ease;
}

.comment-input-wrap:focus-within {
    border-color: rgba(255, 255, 255, 0.18);
}

.comment-input {
    display: block;
    width: 100%;
    min-height: 64px;
    padding: 12px 14px 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    /* Высоту задаёт форма: растягивать поле вручную нельзя */
    resize: none;
    outline: none;
}

.comment-input::placeholder {
    color: #6f6f75;
}

/* Панель под текстом: спойлер и счётчик слева, отправка справа */
.comment-input-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.comment-input-bar .comment-submit {
    height: 32px;
    padding: 0 18px;
    font-size: 13px;
}

/* Кнопка внутри поля ввода */
.comment-tool {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.04);
    color: #d5d5d7;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.comment-tool:hover {
    border-color: rgba(204, 29, 29, 0.45);
    background-color: rgba(204, 29, 29, 0.14);
    color: #ffffff;
}

.comment-tool:focus-visible {
    outline: 2px solid #cc1d1d;
    outline-offset: 2px;
}

/*
 * Спойлер в тексте комментария: пока читатель не нажал, вместо текста
 * видна надпись «Спойлер». Это <button>, поэтому работает и клик, и клавиатура.
 */
.comment-spoiler {
    padding: 0 6px;
    border: 0;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.12);
    color: #d5d5d7;
    font: inherit;
    user-select: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.comment-spoiler-label {
    font-size: 0.82em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comment-spoiler-text {
    display: none;
}

.comment-spoiler:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.comment-spoiler.is-revealed {
    background-color: rgba(204, 29, 29, 0.18);
    color: #ffffff;
    user-select: auto;
    cursor: default;
}

.comment-spoiler.is-revealed .comment-spoiler-label {
    display: none;
}

.comment-spoiler.is-revealed .comment-spoiler-text {
    display: inline;
}

.comment-spoiler:focus-visible {
    outline: 2px solid #cc1d1d;
    outline-offset: 1px;
}

.comment-form-hint {
    font-size: 12px;
    color: #6f6f75;
    /* Прижимает кнопку «Отправить» к правому краю панели */
    margin-right: auto;
}

/* Плашка «ответ на сообщение» над полем ввода */
.comment-reply {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background-color: rgba(204, 29, 29, 0.12);
    border-left: 3px solid #cc1d1d;
    font-size: 13px;
    color: #d5d5d7;
}

.comment-reply strong {
    color: #ffffff;
    font-weight: 600;
}

.comment-reply-cancel {
    margin-left: auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #d5d5d7;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.comment-reply-cancel:hover {
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.comment-submit {
    padding: 0 22px;
    height: 36px;
}

.comment-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Гостю вместо формы — кнопка входа */
.comment-guest {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background-color: #101012;
}

.comment-guest-text {
    font-size: 14px;
    color: #a5a5a5;
}

.comments-state {
    padding: 10px 0 4px;
    font-size: 14px;
    color: #8b8b90;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
}

.comment {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: rgba(204, 29, 29, 0.18);
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 700;
}

.comment-body {
    min-width: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background-color: #101012;
}

.comment-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

/* Действия в углу сообщения: «Ответить», у своих — карандаш и корзинка */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.comment-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    border: none;
    border-radius: 7px;
    background: none;
    color: #7a7a80;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.comment-action:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.comment-action--delete {
    padding: 3px 6px;
}

.comment-action--delete:hover {
    background-color: rgba(204, 29, 29, 0.18);
    color: #ff6b6b;
}

/* Кнопки-иконки (карандаш): без лишних отступов, значок по центру */
.comment-action--icon {
    padding: 3px 5px;
    line-height: 0;
}

/* base.css задаёт color: white всем элементам — значкам возвращаем цвет кнопки */
.comment-action svg,
.comment-action svg * {
    color: inherit;
}

.comment-action--icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.comment-action--icon svg {
    display: block;
}

/* Меню «⋮» у сообщения */
.comment-actions {
    position: relative;
}

.comment-menu-toggle {
    padding: 3px 7px;
    line-height: 0;
}

.comment-menu-toggle svg {
    display: block;
}

.comment-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 220px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background-color: #101012;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72);
}

.comment-menu-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: none;
    color: #d5d5d7;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.comment-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.comment-menu-item--danger {
    color: #ff6b6b;
}

.comment-menu-item--danger:hover {
    background-color: rgba(204, 29, 29, 0.18);
    color: #ff8b8b;
}

/* Скрытые авторы: сколько сообщений спрятано и как вернуть */
.comments-muted {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 13px;
    color: #7a7a80;
}

.comments-muted-reset {
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: none;
    color: #d5d5d7;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.comments-muted-reset:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Цитата сообщения, на которое отвечают */
.comment-quote {
    margin-bottom: 6px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    color: #8b8b90;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.comment-date {
    font-size: 12px;
    color: #6f6f75;
}

.comment-text {
    font-size: 14px;
    line-height: 1.55;
    color: #d5d5d7;
    overflow-wrap: anywhere;
}

/* Правка сообщения: поле вместо текста и кнопки сохранения */
.comment-edit {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}

.comment-edit-input {
    width: 100%;
    min-height: 72px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background-color: #0b0b0d;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
}

.comment-edit-input:focus {
    border-color: rgba(255, 255, 255, 0.24);
}

.comment-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-edit-hint {
    margin-right: auto;
    font-size: 12px;
    color: #6f6f75;
}

.comment-edit-cancel {
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    background: none;
    color: #a5a5a5;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.comment-edit-cancel:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.comment-edit-save {
    height: 30px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background-color: #ffffff;
    color: #000000;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.comment-edit-save:hover:not(:disabled) {
    background-color: #e6e6e6;
}

.comment-edit-save:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Оценка комментария: лайк / счёт / дизлайк */
.comment-votes {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.comment-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    /* Только значок: без рамки и без подложки */
    border: 0;
    background: none;
    appearance: none;
    -webkit-appearance: none;
    color: #8b8b90;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Наведение: лайк зеленеет, дизлайк краснеет */
.comment-vote--up:hover:not(:disabled) {
    color: #66bb6a;
}

.comment-vote--down:hover:not(:disabled) {
    color: #e35d5d;
}

/* base.css задаёт color: white всем элементам — иконке и её частям возвращаем наследование */
.comment-vote svg,
.comment-vote svg * {
    color: inherit;
}

.comment-vote:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

/* Лайк — зелёный, дизлайк — красный (и при наведении тоже) */
.comment-vote--up.is-active,
.comment-vote--up.is-active:hover:not(:disabled) {
    color: #66bb6a;
}

.comment-vote--down.is-active,
.comment-vote--down.is-active:hover:not(:disabled) {
    color: #e35d5d;
}

.comment-vote:disabled {
    opacity: 0.6;
    cursor: default;
}

.comment-vote-score {
    min-width: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #8b8b90;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Плюс — зелёный, минус — красный */
.comment-vote-score.is-positive {
    color: #66bb6a;
}

.comment-vote-score.is-negative {
    color: #e35d5d;
}

/*===================================================================================================================
    Окно подтверждения (удаление комментария)
===================================================================================================================*/
.confirm-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(360px, calc(100vw - 32px));
    height: fit-content;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background-color: #101012;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.confirm-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(2px);
}

.confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.confirm-text {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #a5a5a5;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.confirm-cancel,
.confirm-accept {
    height: 36px;
    padding: 0 18px;
}

.confirm-cancel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.confirm-cancel:hover {
    background-color: rgba(255, 255, 255, 0.14);
}

.confirm-accept {
    background-color: #cc1d1d;
    color: #ffffff;
}

.confirm-accept:hover {
    background-color: #e52e2e;
}

/*===================================================================================================================
    Окно жалобы на комментарий
===================================================================================================================*/
.report-dialog {
    width: min(430px, calc(100vw - 32px));
}

.report-quote {
    margin-top: 10px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    line-height: 1.4;
    color: #8b8b90;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.report-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.report-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #8b8b90;
}

.report-select,
.report-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background-color: #16161a;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.report-select {
    cursor: pointer;
}

.report-input {
    min-height: 76px;
    line-height: 1.5;
    resize: vertical;
}

.report-input::placeholder {
    color: #6f6f75;
}

.report-select:focus,
.report-input:focus {
    border-color: rgba(255, 255, 255, 0.22);
}

.report-error {
    font-size: 13px;
    color: #ff6b6b;
}

@media (max-width: 760px) {
    .watch-info {
            flex-direction: column;
            gap: 20px;
    }

    .watch-side {
            flex-direction: row;
            align-items: center;
            width: 100%;
    }

    .watch-poster {
            width: 96px;
    }

    .watch-side .btn-fav,
    .watch-play {
            width: auto;
    }

    .watch-title {
            font-size: 26px;
    }

    .episode-current {
            max-width: calc(100vw - 160px);
    }

    .episode-counter {
            display: none;
    }
}

/*===================================================================================================================
    Отметка тайтла: смотрю / в планах / просмотрено / отложено / брошено
===================================================================================================================*/
.watch-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 18px 0 4px;
}

.watch-status-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #5f5f66;
}

.watch-status-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.watch-status-option {
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background-color: transparent;
    color: #a5a5a5;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.watch-status-option:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.watch-status-option.is-active {
    border-color: rgba(204, 29, 29, 0.65);
    background-color: rgba(204, 29, 29, 0.18);
    color: #ff6b6b;
    font-weight: 600;
}

.watch-status-option:disabled {
    opacity: 0.55;
    cursor: default;
}

@media (max-width: 640px) {
    .watch-status {
        margin-top: 14px;
    }

    .watch-status-option {
        padding: 7px 11px;
        font-size: 12px;
    }
}
