/* ==========================================
КАРТОЧКА АНИМЕ AnimeHub
========================================== */
:root, .ad-page {
    --ad-accent: #ff4d6d;
    --ad-accent-glow: rgba(255, 77, 109, 0.45);
    --ad-accent-bg: rgba(255, 77, 109, 0.14);
}
.ad-page { color: #fff; font-family: 'MyCustomFont'; }
.ad-crumbs {
    max-width: 1400px; margin: 0 auto; padding: 18px 40px 0;
    display: flex; gap: 10px; align-items: center;
    font-size: 12.5px; color: #6f727c;
}
.ad-crumbs a { color: #8b8e98; text-decoration: none; transition: color .2s; }
.ad-crumbs a:hover { color: var(--ad-accent, #ff8fa3); }
.ad-crumbs b { color: #e8e8ec; font-weight: 600; }

/* ---------- Hero ---------- */
.ad-hero { position: relative; overflow: hidden; min-height: 480px; }
.ad-banner {
    position: absolute; inset: 0;
    background-size: cover; background-position: center 25%;
    filter: brightness(0.92) saturate(1.15);
    transition: background-image 0.5s ease;
}
.ad-banner::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(10, 10, 12, 0.15) 0%,
        transparent 35%,
        rgba(10, 10, 12, 0.8) 75%,
        #0a0a0c 100%);
}
.ad-hero-inner {
    position: relative; z-index: 1;
    max-width: 1400px; margin: 0 auto; padding: 50px 40px 40px;
    display: flex; gap: 32px; align-items: flex-start;
}
.ad-poster {
    flex: 0 0 230px; width: 230px;
    border-radius: 16px; overflow: hidden;
    border: 1px solid var(--ad-accent, rgba(255,77,109,.35));
    box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 30px var(--ad-accent-glow, rgba(255,77,109,.15));
    transition: border-color .4s, box-shadow .4s;
}
.ad-poster img { width: 100%; display: block; aspect-ratio: 3/4; object-fit: cover; }
.ad-hero-info { flex: 1; min-width: 0; padding-top: 6px; }
.ad-title {
    margin: 0 0 6px; font-size: 42px; line-height: 1.05; font-weight: 800;
    background: linear-gradient(100deg, #fff 20%, #ffd7de 55%, var(--ad-accent, #ff8fa3) 90%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    text-shadow: 0 8px 40px var(--ad-accent-glow, rgba(255,77,109,.25));
}
.ad-subtitle {
    color: #e2e5ec;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 4px 12px;
    display: inline-block;
    backdrop-filter: blur(8px);
}

.ad-chips {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}
.ad-chips::-webkit-scrollbar { display: none; }
.ad-chip {
    padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
    color: #fff; background: var(--ad-accent-bg, rgba(255,77,109,.12));
    border: 1px solid var(--ad-accent, rgba(255,77,109,.45));
    transition: all .3s;
    flex-shrink: 0;
    white-space: nowrap;
}
.ad-score-row { display: none !important; }
.ad-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.ad-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: 'MyCustomFont'; font-size: 14px; font-weight: 700;
    padding: 12px 22px; border-radius: 12px; cursor: pointer;
    text-decoration: none; transition: all .22s; border: 1px solid transparent;
}
.ad-btn svg { width: 16px; height: 16px; }
.ad-btn.primary {
    background: linear-gradient(135deg, var(--ad-accent, #ff4d6d), #d63a6a); color: #fff;
    box-shadow: 0 8px 26px var(--ad-accent-glow, rgba(255,77,109,.4));
}
.ad-btn.primary:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 12px 32px var(--ad-accent-glow, rgba(255,77,109,.5)); }
.ad-btn.ghost { background: rgba(29,30,36,.7); border-color: #2c2e36; color: #c9ccd4; backdrop-filter: blur(6px); }
.ad-btn.ghost:hover { border-color: var(--ad-accent, rgba(255,77,109,.5)); color: var(--ad-accent, #ff8fa3); }
.ad-btn.ghost.faved { border-color: var(--ad-accent, rgba(255,77,109,.7)); color: var(--ad-accent, #ff8fa3); background: var(--ad-accent-bg, rgba(255,77,109,.12)); }
.ad-btn.ghost.faved svg { fill: var(--ad-accent, #ff4d6d); stroke: var(--ad-accent, #ff4d6d); }
.ad-share { display: flex; gap: 6px; }
.ad-btn.icon {
    width: 42px; height: 42px; padding: 0; justify-content: center;
    background: rgba(29,30,36,.7); border-color: #2c2e36; color: #8b8e98;
    font-size: 11px; font-weight: 800; backdrop-filter: blur(6px);
}
.ad-btn.icon:hover { color: #fff; border-color: #3a3d46; }
.ad-btn.icon.copied { color: #6ee7a0; border-color: rgba(110,231,160,.5); }
.ad-btn.icon svg { width: 15px; height: 15px; }
.ad-meta { display: flex; gap: 34px; flex-wrap: wrap; }
.ad-meta-item { display: flex; flex-direction: column; gap: 4px; }
.ad-meta-item span { font-size: 11.5px; color: #6f727c; text-transform: uppercase; letter-spacing: .6px; }
.ad-meta-item b { font-size: 15px; color: #e8e8ec; }

/* ---------- Layout ---------- */
.ad-layout {
    max-width: 1400px; margin: 0 auto; padding: 26px 40px 70px;
    display: grid; grid-template-columns: 1fr 340px; gap: 24px;
}
.ad-main { min-width: 0; }
.ad-tabs {
    display: flex; gap: 4px; border-bottom: 1px solid #23252c; margin-bottom: 20px;
}
.ad-tab {
    background: none; border: none; cursor: pointer;
    font-family: 'MyCustomFont'; font-size: 14px; font-weight: 700; color: #8b8e98;
    padding: 12px 18px; position: relative; transition: color .2s;
}
.ad-tab:hover { color: #e8e8ec; }
.ad-tab.active { color: var(--ad-accent, #ff8fa3); }
.ad-tab.active::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px;
    height: 2px; background: var(--ad-accent, #ff4d6d);
    border-radius: 2px; box-shadow: 0 0 10px var(--ad-accent-glow, rgba(255,77,109,.6));
}

.ad-pane { display: none; }
.ad-pane.active { 
    display: block; 
    animation: adFade .22s cubic-bezier(0.2, 0.85, 0.32, 1); 
    will-change: transform, filter, opacity;
}
@keyframes adFade { 
    0% { 
        opacity: 0; 
        transform: translateY(8px); 
        filter: blur(4px); 
    } 
    60% {
        filter: blur(1.5px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
        filter: blur(0px); 
    } 
}
.ad-pane h3 { margin: 0 0 12px; font-size: 16px; color: #e8e8ec; }
.ad-desc { color: #b8bcc6; font-size: 14px; line-height: 1.75; white-space: pre-line; margin: 0 0 26px; }

/* ---------- Хронология франшизы ---------- */
.ad-timeline-header h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px;
    color: #fff;
}
.ad-timeline-sub {
    font-size: 13.5px;
    color: #8b8e98;
    margin: 0 0 24px;
}
.ad-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 28px;
    margin-bottom: 30px;
}
.ad-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: linear-gradient(180deg, var(--ad-accent, #ff4d6d) 0%, rgba(255,255,255,0.1) 100%);
}
.ad-tl-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #17181e;
    border: 1px solid #282a33;
    border-radius: 14px;
    padding: 12px 18px;
    transition: all 0.25s ease;
}
.ad-tl-item:hover {
    border-color: var(--ad-accent, #ff4d6d);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.ad-tl-item.current {
    border-color: var(--ad-accent, #ff4d6d);
    background: var(--ad-accent-bg, rgba(255, 77, 109, 0.08));
    box-shadow: 0 0 20px var(--ad-accent-glow, rgba(255, 77, 109, 0.3));
}
.ad-tl-node {
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1d1e26;
    border: 3px solid var(--ad-accent, #ff4d6d);
    box-shadow: 0 0 8px var(--ad-accent-glow, rgba(255, 77, 109, 0.5));
    z-index: 2;
}
.ad-tl-item.watched .ad-tl-node {
    background: #4ade80;
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
}
.ad-tl-poster {
    width: 50px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #111;
}
.ad-tl-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ad-tl-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}
.ad-tl-title:hover {
    color: var(--ad-accent, #ff8fa3);
}
.ad-tl-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #8b8e98;
}
.ad-tl-kind {
    background: rgba(255, 255, 255, 0.08);
    color: #c9ccd4;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}
.ad-tl-current-badge {
    background: var(--ad-accent, #ff4d6d);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}
.ad-tl-check-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #8b8e98;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
    flex-shrink: 0;
}
.ad-tl-check-btn:hover {
    border-color: #4ade80;
    color: #4ade80;
}
.ad-tl-check-btn.checked {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.6);
    color: #4ade80;
}
.ad-empty, .ad-empty-small { color: #6f727c; font-size: 13px; }

/* ---------- Распределение оценок ---------- */
.ad-dist-bars { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.ad-dist-row { display: flex; align-items: center; gap: 12px; }
.ad-dist-star { width: 34px; font-size: 12.5px; color: #c9ccd4; font-weight: 700; }
.ad-dist-track { flex: 1; height: 7px; background: #23252c; border-radius: 4px; overflow: hidden; }
.ad-dist-fill { height: 100%; background: linear-gradient(90deg, #ff4d6d, #ff8fa3); border-radius: 4px; }
.ad-dist-pct { width: 40px; text-align: right; font-size: 12px; color: #8b8e98; }

/* ---------- Серии ---------- */
#ad-info-mobile-slot:not(:empty) {
    margin-bottom: 22px;
}
.ad-seasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.ad-season {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: #1d1e24;
    border: 1px solid #2c2e36;
    color: #c9ccd4;
    font-family: 'MyCustomFont';
    font-size: 13.5px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
}
.ad-season:hover { border-color: #3a3d46; color: #fff; }
.ad-season.active {
    background: rgba(255,77,109,.14); border-color: rgba(255,77,109,.6); color: #ff8fa3;
}
.ad-eps-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ad-eps-head-left {
    display: flex;
    gap: 10px;
    align-items: baseline;
}
.ad-eps-head-left b { font-size: 15px; }
.ad-eps-head-left span { color: #6f727c; font-size: 12.5px; }
.ad-batch-dl-btn {
    background: rgba(255, 77, 109, 0.12);
    border: 1px solid rgba(255, 77, 109, 0.35);
    color: #ff8fa3;
    padding: 6px 12px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}
.ad-batch-dl-btn:hover {
    background: #ff4d6d;
    color: #fff;
    box-shadow: 0 0 14px rgba(255, 77, 109, 0.4);
}
.ad-batch-dl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ad-eps { display: flex; flex-direction: column; }
.ad-ep-row {
    display: grid;
    grid-template-columns: 34px 1fr 70px 90px 76px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background .15s;
}
.ad-ep-row:hover { background: rgba(255,255,255,.04); }
.ad-ep-num { color: #6f727c; font-weight: 700; font-size: 13.5px; }
.ad-ep-name { color: #d6d9e0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-ep-dur, .ad-ep-date { color: #6f727c; font-size: 12px; }

.ad-ep-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.ad-ep-dl {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #8b8e98;
    cursor: pointer;
    transition: all .2s;
    padding: 0;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    outline: none;
}
.ad-ep-dl:hover {
    background: rgba(255, 77, 109, 0.18);
    border-color: rgba(255, 77, 109, 0.6);
    color: #ff8fa3;
}
.ad-ep-dl.downloaded {
    background: rgba(74, 222, 128, 0.18);
    border-color: rgba(74, 222, 128, 0.6);
    color: #4ade80;
}
.ad-ep-dl.loading {
    border-color: #ff4d6d;
    color: #ff4d6d;
}
.ad-dl-icon { width: 14px; height: 14px; }
.ad-ep-dl.downloaded .ad-dl-icon { display: none; }
.ad-ep-dl.downloaded::after { content: '✓'; font-size: 13px; font-weight: 800; color: #4ade80; }
.ad-dl-text:not(:empty) { margin-left: 2px; }

.ad-ep-play {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,77,109,.6); color: #ff8fa3; transition: all .2s;
    background: transparent;
    flex-shrink: 0;
}
.ad-ep-play:hover { background: #ff4d6d; color: #fff; box-shadow: 0 0 14px rgba(255,77,109,.5); }
.ad-ep-play svg { width: 13px; height: 13px; }

@media (max-width: 768px) {
    .ad-ep-row {
        grid-template-columns: 28px 1fr 74px !important;
        gap: 8px;
        padding: 9px 8px;
    }
    .ad-ep-dur, .ad-ep-date { display: none !important; }
}

/* ---------- Персонажи ---------- */
.ad-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ad-char {
    background: #1d1e24; border: 1px solid #2c2e36; border-radius: 14px;
    padding: 12px; text-align: center; transition: all .2s;
}
.ad-char:hover { transform: translateY(-3px); border-color: rgba(255,77,109,.5); }
.ad-char img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.ad-char b { display: block; font-size: 13px; color: #e8e8ec; margin-bottom: 4px; }
.ad-char span { font-size: 11.5px; color: #8b8e98; }

/* ---------- Похожие ---------- */
.ad-sim { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.ad-sim-card {
    display: block; text-decoration: none;
    background: #1d1e24; border: 1px solid #2c2e36; border-radius: 14px;
    padding: 10px; transition: all .2s;
}
.ad-sim-card:hover { transform: translateY(-3px); border-color: rgba(255,77,109,.5); }
.ad-sim-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.ad-sim-card b { display: block; font-size: 12.5px; color: #e8e8ec; margin-bottom: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-sim-card span { font-size: 11.5px; color: #ff8fa3; font-weight: 700; }

/* ---------- Отзывы ---------- */
.ad-revs { display: flex; flex-direction: column; gap: 14px; }
.ad-rev { background: #1d1e24; border: 1px solid #2c2e36; border-radius: 14px; padding: 16px; }
.ad-rev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ad-rev-head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.ad-rev-head b { font-size: 13.5px; color: #e8e8ec; }
.ad-rev-rating {
    margin-left: auto; font-size: 12px; font-weight: 800; color: #ff8fa3;
    background: rgba(255,77,109,.12); border: 1px solid rgba(255,77,109,.4);
    padding: 3px 10px; border-radius: 999px;
}
.ad-rev p { margin: 0; color: #b8bcc6; font-size: 13px; line-height: 1.7; }

/* ---------- Сайдбар ---------- */
.ad-side { display: flex; flex-direction: column; gap: 16px; }
.ad-card { background: #1d1e24; border: 1px solid #2c2e36; border-radius: 16px; padding: 18px; }
.ad-card h4 { margin: 0 0 12px; font-size: 14px; color: #e8e8ec; }
.ad-voices { display: flex; flex-direction: column; gap: 8px; }
.ad-voice {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    font-size: 13px; color: #c9ccd4; padding: 8px 10px; border-radius: 10px;
    border: 1px solid transparent; transition: all .15s;
}
.ad-voice:hover { background: rgba(255,255,255,.04); }
.ad-voice.active { background: rgba(255,77,109,.1); border-color: rgba(255,77,109,.45); color: #ff8fa3; }
.ad-voice input { display: none; }
.ad-voice span {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #4a4d57; position: relative; flex-shrink: 0; transition: all .15s;
}
.ad-voice.active span { border-color: #ff4d6d; }
.ad-voice.active span::after {
    content: ''; position: absolute; inset: 2px; border-radius: 50%; background: #ff4d6d;
}
.ad-info { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.ad-info-row { display: flex; gap: 12px; font-size: 12.5px; }
.ad-info-row dt { color: #6f727c; flex: 0 0 92px; }
.ad-info-row dd { margin: 0; color: #d6d9e0; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .ad-layout { grid-template-columns: 1fr; }
    .ad-side { flex-direction: row; flex-wrap: wrap; }
    .ad-card { flex: 1 1 300px; }
}
@media (max-width: 760px) {
    .ad-crumbs, .ad-hero-inner, .ad-layout { padding-left: 16px; padding-right: 16px; }
    .ad-hero-inner { flex-direction: column; }
    .ad-poster { flex: none; width: 170px; }
    .ad-title { font-size: 30px; }
    .ad-ep-dur, .ad-ep-date { display: none; }
}


/* ---------- Галерея кадров ---------- */
.ad-gallery-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.ad-gallery-strip img {
    height: 160px; flex: 0 0 auto; border-radius: 12px;
    border: 2.5px solid #2c2e36; object-fit: cover;
    transition: transform .25s, border-color .25s;
}
.ad-gallery-strip img:hover {
    border-color: rgba(255,77,109,1);
    color: #ff8fa3;
    box-shadow: inset 0 0 15px rgba(255,77,109,1);
}

.ad-gallery-strip::-webkit-scrollbar { height: 6px; }
.ad-gallery-strip::-webkit-scrollbar-track { background: transparent; }
.ad-gallery-strip::-webkit-scrollbar-thumb { background: #3a3d46; border-radius: 3px; }


/* ---------- Продолжить просмотр ---------- */
.ad-continue-note {
    margin: -10px 0 16px; font-size: 12.5px; color: #ff8fa3; font-weight: 600;
}
.ad-continue-note a { color: #8b8e98; font-weight: 500; text-decoration: underline; }
.ad-continue-note a:hover { color: #fff; }
.ad-continue-note.hidden { display: none; }

/* Баннер-фолбэк: обложка как размытая подложка, а не зум */
.ad-banner.is-fallback { filter: blur(22px) saturate(1.3) brightness(.7); transform: scale(1.15); }

/* ---------- Iframe-режим (резервный плеер Kodik) ---------- */
.awp-player.iframe-mode .awp-controls,
.awp-player.iframe-mode .awp-big-play,
.awp-player.iframe-mode .awp-loading { display: none; }

.awp-screen iframe.awp-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.awp-iframe-note {
    position: absolute; top: 10px; left: 12px; z-index: 4;
    font-size: 11px; color: #c9ccd4;
    background: rgba(13,14,17,.7); border: 1px solid #2c2e36;
    padding: 4px 10px; border-radius: 8px;
    backdrop-filter: blur(6px);
}

/* Кнопка «открыть плеер в новой вкладке» (iframe-режим) */
.awp-open-tab {
    display: none !important;
}

/* Чипы переключения источников (Alloha/Animedia/Kodik) */
.awp-src-chip {
    position: absolute; top: 34px; left: 12px; z-index: 5;
    margin-right: 6px;
    font-size: 11px; color: #c9ccd4; cursor: pointer;
    background: rgba(13,14,17,.7); border: 1px solid #2c2e36;
    padding: 4px 10px; border-radius: 8px; backdrop-filter: blur(6px);
}
.awp-src-chip + .awp-src-chip { left: auto; }
.awp-src-chip.active { color: #ff8fa3; border-color: rgba(255,77,109,.6); }


/* ---------- Топлайн поверх баннера ---------- */
.ad-hero { position: relative; }
.ad-topline {
    position: absolute; top: 18px; left: 24px; right: 24px;
    display: flex; align-items: center; gap: 14px; z-index: 6;
}
.ad-back {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 10px;
    background: rgba(18,18,24,.55); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.08);
    color: #e8e8ec; font-size: 13px; font-weight: 600; text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.ad-back:hover { background: rgba(255,59,91,.18); border-color: rgba(255,59,91,.5); color: #fff; }
.ad-back svg { width: 16px; height: 16px; }
.ad-topline-title {
    color: #fff; font-weight: 700; font-size: 14px;
    text-shadow: 0 1px 8px rgba(0,0,0,.65); opacity: .92;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Скелетон и индикатор батчей персонажей ---------- */
.ad-chars-skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }
.ad-char-sk { height: 190px; border-radius: 12px; background: linear-gradient(90deg, #1c1f26 25%, #262a33 50%, #1c1f26 75%); background-size: 200% 100%; animation: ad-sk 1.2s infinite; }
@keyframes ad-sk { to { background-position: -200% 0; } }
.ad-chars-sentinel { grid-column: 1 / -1; text-align: center; color: #8b8e98; font-size: 12.5px; padding: 12px 0 4px; }

/* ==========================================
   МОБИЛЬНЫЙ АДАПТИВ СТРАНИЦЫ АНИМЕ (screens <= 768px)
   ========================================== */
@media (max-width: 768px) {
    .ad-crumbs {
        padding: 12px 14px 0;
        font-size: 11.5px;
        flex-wrap: wrap;
    }

    .ad-hero {
        min-height: auto;
    }

    .ad-topline {
        top: 12px;
        left: 14px;
        right: 14px;
    }

    .ad-hero-inner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 55px 14px 24px !important;
        gap: 16px !important;
    }

    .ad-poster {
        flex: 0 0 170px !important;
        width: 170px !important;
        margin: 0 auto;
        border-radius: 14px !important;
    }

    .ad-hero-info {
        padding-top: 0 !important;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .ad-title {
        font-size: 24px !important;
        text-align: center;
        margin-bottom: 4px;
    }

    .ad-subtitle {
        font-size: 12.5px;
        text-align: center;
        margin: 0 auto 12px;
        display: inline-block;
    }

    .ad-chips {
        justify-content: center;
        gap: 6px;
    }

    .ad-chip {
        padding: 4px 10px;
        font-size: 11px;
    }

    .ad-score-row {
        justify-content: center;
        margin-bottom: 14px;
    }

    .ad-actions {
        justify-content: center;
        width: 100%;
        gap: 8px;
    }

    .ad-btn.primary {
        flex: 1 1 auto;
        justify-content: center;
        padding: 10px 16px;
    }

    .ad-btn.ghost {
        padding: 10px 14px;
    }

    .ad-meta {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 8px 10px !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

    .ad-meta-item {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        text-align: center !important;
        align-items: center !important;
    }

    .ad-meta-item span {
        font-size: 10px !important;
        letter-spacing: 0.2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        max-width: 100% !important;
        color: #8b8e98 !important;
    }

    .ad-meta-item b {
        font-size: 12.5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        max-width: 100% !important;
        color: #fff !important;
    }

    .ad-layout {
        grid-template-columns: 1fr !important;
        padding: 16px 14px 24px !important;
        gap: 20px !important;
    }

    .ad-tabs {
        overflow-x: auto;
        overflow-y: hidden !important;
        touch-action: pan-x;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .ad-tabs::-webkit-scrollbar {
        display: none;
    }

    .ad-tab {
        padding: 10px 14px;
        font-size: 13px;
        flex-shrink: 0;
    }


    .ad-timeline {
        padding-left: 20px;
    }

    .ad-tl-node {
        left: -20px;
    }

    .ad-tl-item {
        padding: 10px 14px;
        gap: 12px;
    }

    .ad-tl-poster {
        width: 44px;
        height: 60px;
    }

    .ad-tl-title {
        font-size: 13.5px;
    }

    .ad-chars-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
        gap: 10px !important;
    }
}

/* ========== Модальное окно выбора серий для скачивания ========== */
.ad-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 8, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.ad-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.ad-dl-modal {
    background: #141720;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.ad-modal-backdrop.open .ad-dl-modal {
    transform: scale(1);
}
.ad-dl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ad-dl-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ad-dl-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #a4b0be;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.ad-dl-modal-close:hover {
    background: rgba(255, 77, 109, 0.2);
    color: #ff4d6d;
}
.ad-dl-modal-priority-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(255, 77, 109, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    color: #e2e8f0;
}
.ad-dl-modal-priority-bar label {
    font-size: 12.5px;
    font-weight: 700;
    color: #ff8fa3;
    white-space: nowrap;
    flex-shrink: 0;
}
.ad-dl-voice-select {
    flex: 1;
    min-width: 0;
    background: #1a1d26;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 12.5px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.ad-dl-voice-select:focus {
    border-color: #ff4d6d;
}
.ad-dl-voice-select option {
    background: #141720;
    color: #e8e8ec;
}
.ad-dl-modal-subbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    color: #8b8e98;
}
.ad-dl-modal-subbar-btns {
    display: flex;
    gap: 8px;
}
.ad-dl-quick-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d6d9e0;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.ad-dl-quick-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.ad-dl-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.ad-dl-modal-list::-webkit-scrollbar {
    width: 6px;
}
.ad-dl-modal-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
.ad-dl-ep-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.ad-dl-ep-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}
.ad-dl-ep-item.selected {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.35);
}
.ad-dl-ep-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.ad-dl-ep-item.selected .ad-dl-ep-check {
    background: #22c55e;
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.45);
}
.ad-dl-ep-check svg {
    width: 13px;
    height: 13px;
    stroke: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.15s ease;
}
.ad-dl-ep-item.selected .ad-dl-ep-check svg {
    opacity: 1;
    transform: scale(1);
}
.ad-dl-ep-item.already-downloaded {
    opacity: 0.6;
}
.ad-dl-ep-item.already-downloaded .ad-dl-ep-check {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.4);
}
.ad-dl-ep-item.already-downloaded .ad-dl-ep-check svg {
    opacity: 1;
    stroke: #4ade80;
}
.ad-dl-ep-title {
    flex: 1;
    font-size: 13.5px;
    color: #e8e8ec;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-dl-ep-meta {
    font-size: 11.5px;
    color: #8b8e98;
    flex-shrink: 0;
}
.ad-dl-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 16, 23, 0.95);
    gap: 12px;
}
.ad-dl-start-btn {
    background: #ff4d6d;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
    flex-grow: 1;
    justify-content: center;
}
.ad-dl-start-btn:hover {
    background: #ff3355;
    box-shadow: 0 4px 18px rgba(255, 77, 109, 0.45);
}
.ad-dl-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

