/* ==========================================================================
   Поиск по макету: строка поиска, категории-чипы, лучший результат,
   секции по типам и страницы-категории (жанры аниме).
   ========================================================================== */

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

.sr .ic,
.sr .ic * {
    color: inherit;
}

.sr_under-hero {
    padding-top: 28px;
}

.sr-h2 {
    margin: 0 0 18px;
    font-size: clamp(20px, 1.6vw, 30px);
    font-weight: 700;
}

.sr-note {
    margin: 0 0 18px;
    color: var(--text-color-muted, rgba(255, 255, 255, .6));
}

/* ---------- Строка поиска ---------- */
.sr-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.sr-field {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(860px, 100%);
    height: 64px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    color: rgba(255, 255, 255, .7);
}

.sr-field:focus-within {
    border-color: #01ae4c;
}

.sr-field > svg {
    width: 22px;
    height: 22px;
    flex: none;
}

.sr-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 17px;
}

.sr-field input::-webkit-search-cancel-button {
    display: none;
}

.sr-field__clear {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #fff;
}

.sr-field__clear:hover {
    background: rgba(255, 255, 255, .08);
}

.sr-field__clear svg {
    width: 18px;
    height: 18px;
}

.sr-top__link {
    margin-left: auto;
    color: rgba(255, 255, 255, .7);
    white-space: nowrap;
}

.sr-top__link:hover {
    color: #fff;
}

/* ---------- Чипы категорий ---------- */
.sr-chips {
    display: flex;
    gap: 12px;
    margin-bottom: 36px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sr-chips::-webkit-scrollbar {
    display: none;
}

.sr-chip {
    flex: none;
    padding: 9px 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font-size: 15px;
    transition: background .15s;
}

.sr-chip:hover {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.sr-chip.is-active {
    background: #01ae4c;
    font-weight: 600;
}

/* ---------- Лучший результат ---------- */
.sr-best {
    display: grid;
    grid-template-columns: minmax(0, 820px) minmax(0, 1fr);
    gap: clamp(20px, 4vw, 76px);
    padding-bottom: 36px;
    margin-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sr-best__card {
    position: relative;
    display: flex;
    gap: 24px;
    padding: 28px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(110deg, #1c1828 0%, #161321 55%, #0f2a20 100%);
    color: #fff;
}

.sr-best__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .22;
    filter: blur(2px);
}

.sr-best__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(14, 10, 22, .95) 20%, rgba(14, 10, 22, .4));
}

.sr-best__poster {
    position: relative;
    width: 150px;
    aspect-ratio: 1 / 1.05;
    flex: none;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
}

.sr-best__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-best__body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.sr-best__title {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(18px, 1.4vw, 24px);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sr-best__meta {
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
}

.sr-best__rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
}

.sr-best__rating svg {
    width: 20px;
    height: 20px;
    color: #ffc531;
    fill: currentColor;
}

.sr-best__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 11px 26px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    font-weight: 600;
    transition: background .15s;
}

.sr-best__btn:hover {
    background: #01ae4c;
}

.sr-best__btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.sr-best__desc {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, .85);
    line-height: 1.55;
}

.sr-best__facts {
    display: grid;
    gap: 8px;
    margin: 0;
}

.sr-best__facts div {
    display: flex;
    gap: 6px;
}

.sr-best__facts dt {
    color: rgba(255, 255, 255, .5);
}

.sr-best__facts dd {
    margin: 0;
}

.sr-best__facts a {
    color: #fff;
}

.sr-best__facts a:hover {
    color: #01ae4c;
}

/* ---------- Секции ---------- */
.sr-section {
    margin-bottom: 44px;
}

.sr-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.sr-anime {
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 45%), 1fr));
}

.sr-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 45%), 1fr));
    gap: 18px;
}

.sr-tiles_users {
    grid-template-columns: repeat(auto-fill, minmax(min(140px, 30%), 1fr));
}

.sr-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 20px 14px 16px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: #1e1e26;
    color: #fff;
    text-align: center;
    transition: border-color .15s, transform .15s;
}

.sr-tile:hover {
    border-color: rgba(1, 174, 76, .7);
    color: #fff;
    transform: translateY(-2px);
}

.sr-tile .cm-avatar {
    margin-bottom: 6px;
}

.sr-tile__name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sr-tile__name svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: #01ae4c;
}

.sr-tile small {
    max-width: 100%;
    overflow: hidden;
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sr-folders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 20px;
}

.sr-news {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 24px;
}

.sr-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 60px 16px;
    text-align: center;
}

.sr-empty b {
    font-size: 20px;
}

.sr-empty p {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, .6);
}

/* ---------- Категория: шапка и плитки жанров ---------- */
.sr-hero {
    position: relative;
    height: clamp(220px, 22vw, 440px);
    margin-top: calc((var(--header-height) + 24px) * -1);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background:
        radial-gradient(60% 120% at 10% 90%, rgba(1, 174, 76, .55), rgba(1, 174, 76, 0) 70%),
        radial-gradient(50% 90% at 35% 10%, rgba(1, 120, 60, .35), rgba(1, 120, 60, 0) 70%),
        #07040d;
}

.sr-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        conic-gradient(from 45deg at 14% 64%, transparent 0 80deg, rgba(1, 174, 76, .35) 80deg 100deg, transparent 100deg 170deg, rgba(1, 174, 76, .35) 170deg 190deg, transparent 190deg 260deg, rgba(1, 174, 76, .35) 260deg 280deg, transparent 280deg 350deg, rgba(1, 174, 76, .35) 350deg 360deg);
    mask: radial-gradient(circle at 14% 64%, #000 0 26%, transparent 27%);
    opacity: .7;
}

.sr-hero__art {
    position: absolute;
    inset: 0 0 0 auto;
    width: 46%;
    background-size: cover;
    background-position: center top;
    mask: linear-gradient(90deg, transparent, #000 45%);
}

.sr-hero__in {
    position: absolute;
    left: clamp(16px, 3.6vw, 70px);
    right: 16px;
    bottom: clamp(20px, 2.4vw, 44px);
}

.sr-hero__crumb {
    color: rgba(255, 255, 255, .7);
    font-size: 15px;
}

.sr-hero__crumb:hover {
    color: #fff;
}

.sr-hero__title {
    margin: 4px 0 0;
    font-size: clamp(40px, 5vw, 96px);
    font-weight: 800;
    line-height: 1;
}

.sr-hero__desc {
    max-width: 640px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .8);
}

.sr-genres {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 45%), 1fr));
    gap: 20px;
}

.sr-genre {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: #17141f;
    color: #fff;
    isolation: isolate;
}

.sr-genre__img {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    opacity: .35;
    transition: opacity .2s, transform .3s;
}

.sr-genre::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 6, 16, .55), rgba(10, 6, 16, .1));
}

.sr-genre:hover {
    border-color: rgba(1, 174, 76, .7);
    color: #fff;
}

.sr-genre:hover .sr-genre__img {
    opacity: .55;
    transform: scale(1.05);
}

.sr-genre b {
    font-size: clamp(18px, 1.3vw, 26px);
    font-weight: 600;
}

.sr-genre small {
    align-self: flex-end;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: rgba(255, 255, 255, .8);
    font-size: 12px;
}

@media (max-width: 1000px) {
    .sr-best {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .sr-field {
        height: 52px;
    }

    .sr-top__link {
        display: none;
    }

    .sr-best__card {
        padding: 16px;
        gap: 14px;
    }

    .sr-best__poster {
        width: 96px;
    }

    .sr-genre {
        height: 90px;
    }

    .sr-hero__art {
        width: 70%;
        opacity: .5;
    }
}
