:root {
    --aap-header: 96px;
    --aap-shell: 1390px;
    --aap-panel-bg: rgba(51, 51, 51, 0.95);
    --aap-panel-head: rgba(49, 49, 49, 0.98);
    font-size: 16px;
}

html {
    background: #222;
    overflow-y: scroll;
}

::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #222;
}

::-webkit-scrollbar-thumb {
    background: #8a8a8a;
    border-radius: 8px;
}

body {
    background-color: #777;
    background-image: url("../images/portal-landscape-source.jpg");
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-blend-mode: multiply;
    font-size: 16px;
}

.aap-shell {
    max-width: var(--aap-shell);
    padding-inline: 0;
}

.aap-site-header {
    background: transparent;
    border: 0;
    height: var(--aap-header);
    position: relative;
    top: auto;
}

.aap-site-header::before {
    background: rgba(49, 49, 49, 0.95);
    content: "";
    height: 66px;
    left: 0;
    position: absolute;
    right: 0;
    top: 30px;
}

.admin-bar .aap-site-header {
    top: auto;
}

.aap-site-header__inner {
    align-items: center;
    display: flex;
    gap: 0;
    height: 66px;
    padding-right: 10px;
    position: relative;
    top: 30px;
}

.aap-site-header .aap-brand {
    flex: 0 0 241px;
    gap: 15px;
    height: 86px;
    margin-left: 10px;
    margin-right: 20px;
    overflow: visible;
    position: relative;
    z-index: 3;
}

.aap-site-header .aap-brand__mark {
    border-radius: 8px;
    flex: 0 0 86px;
    height: 86px;
    width: 86px;
}

.aap-site-header .aap-brand__mark .aap-icon {
    height: 48px;
    width: 48px;
}

.aap-site-header .aap-brand__custom {
    border-radius: 8px;
    height: 86px;
    object-fit: cover;
    width: 86px;
}

.aap-brand__copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.aap-brand__copy strong {
    color: #fff;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aap-brand__copy small {
    align-items: center;
    color: #eee;
    display: flex;
    font-size: 14px;
    gap: 5px;
    margin-top: 7px;
    white-space: nowrap;
}

.aap-brand__copy small .aap-icon {
    color: var(--aap-accent);
    fill: var(--aap-accent);
}

.aap-search-cluster {
    align-items: center;
    display: flex;
    flex: 0 0 391px;
    width: 391px;
}

.aap-site-header .aap-header-search {
    background: #272727;
    border: 0;
    border-radius: 6px;
    height: 34px;
    max-width: none;
    min-width: 0;
    padding: 0 10px;
    width: 347px;
}

.aap-site-header .aap-header-search span {
    font-size: 14px;
}

.aap-site-header .aap-header-search kbd {
    background: transparent;
    border: 0;
    color: #d1d1d1;
    font-size: 14px;
    font-weight: 400;
    padding: 0;
}

.aap-header-filter {
    align-items: center;
    background: #272727;
    border: 0;
    border-radius: 6px;
    display: flex;
    height: 34px;
    justify-content: center;
    margin-left: 10px;
    width: 34px;
}

.aap-header-filter:hover,
.aap-header-filter:focus-visible {
    background: #3b3b3b;
    outline: 0;
}

.aap-site-header .aap-desktop-nav {
    flex: 1 1 auto;
    height: 66px;
    margin-left: 15px;
    min-width: 0;
}

.aap-site-header .aap-nav-link {
    border: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    gap: 5px;
    height: 66px;
    padding: 0 12px;
    text-transform: uppercase;
}

.aap-site-header .aap-nav-link.is-active {
    border: 0;
}

.aap-site-header .aap-nav-link:hover,
.aap-site-header .aap-nav-link:focus-visible {
    background: rgba(255, 255, 255, 0.055);
    outline: 0;
}

.aap-site-header .aap-nav-menu > .aap-nav-link::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #aaa;
    bottom: 7px;
    content: "";
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
}

.aap-site-header .aap-nav-popover {
    top: 61px;
}

.aap-site-header .aap-header-actions {
    flex: 0 0 52px;
    height: 66px;
    justify-content: center;
    margin-left: auto;
}

.aap-site-header .aap-header-actions > [data-theme-toggle],
.aap-site-header .aap-notification-button {
    display: none;
}

.aap-site-header .aap-account-menu {
    height: 66px;
}

.aap-site-header .aap-account-button,
.aap-site-header .aap-login-button {
    background: #272727;
    border: 0;
    border-radius: 10px;
    height: 42px;
    justify-content: center;
    padding: 0;
    width: 42px;
}

.aap-site-header .aap-account-button img {
    height: 28px;
    width: 28px;
}

.aap-site-header .aap-account-button span,
.aap-site-header .aap-account-button > .aap-icon,
.aap-site-header .aap-login-button span {
    display: none;
}

.aap-layout {
    padding-block: 20px 72px;
}

.aap-home {
    display: block;
}

.aap-home > .aap-layout__aside {
    display: none;
}

.aap-home > .aap-layout__main {
    width: 100%;
}

.aap-home .aap-section,
.aap-home .aap-social-strip {
    margin-left: 10px;
    margin-right: 10px;
    width: calc(100% - 20px);
}

.aap-home .aap-social-strip {
    display: none;
}

.aap-home .aap-section {
    margin-bottom: 20px;
}

.aap-home .aap-section:first-child {
    margin-top: 10px;
}

.aap-season {
    background: var(--aap-panel-bg);
    border: 0;
    border-radius: 10px;
    height: 361px;
    overflow: hidden;
    position: relative;
}

.aap-season .aap-section-heading {
    align-items: center;
    background: var(--aap-panel-head);
    border-bottom: 3px solid #f2bd00;
    height: 51px;
    justify-content: center;
    margin: 0;
    position: relative;
}

.aap-season .aap-section-heading h1 {
    align-items: center;
    display: flex;
    font-size: 16px;
    font-weight: 500;
    gap: 9px;
    line-height: 1;
    text-transform: uppercase;
}

.aap-season .aap-section-heading h1::before {
    content: "\2600";
    font-size: 20px;
}

.aap-season .aap-heading-actions > a {
    display: none;
}

.aap-season .aap-heading-actions {
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.aap-season .aap-heading-actions button {
    background: rgba(39, 39, 39, 0.82);
    border: 0;
    border-radius: 0 10px 10px 0;
    height: 54px;
    pointer-events: auto;
    position: absolute;
    top: 179px;
    width: 32px;
    z-index: 5;
}

.aap-season .aap-heading-actions button:first-child {
    left: 0;
}

.aap-season .aap-heading-actions button:nth-child(2) {
    border-radius: 10px 0 0 10px;
    right: 0;
}

.aap-season .aap-card-rail {
    gap: 10px;
    grid-auto-columns: 200px;
    height: 310px;
    overflow-x: hidden;
    padding: 15px;
    scroll-snap-type: none;
}

.aap-season .aap-card-rail > div {
    transform: none;
}

.aap-season .aap-anime-card {
    height: 280px;
    position: relative;
}

.aap-season .aap-anime-card__poster {
    border-radius: 8px;
    height: 280px;
}

.aap-season .aap-anime-card__body {
    background: rgba(18, 18, 18, 0.68);
    bottom: 0;
    left: 0;
    padding: 10px;
    position: absolute;
    right: 0;
    z-index: 3;
}

.aap-season .aap-anime-card__body h3 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    min-height: 0;
    text-align: center;
}

.aap-season .aap-anime-card__body h3 a {
    -webkit-line-clamp: 3;
}

.aap-season .aap-anime-card__body p,
.aap-season .aap-anime-card__play {
    display: none;
}

.aap-season .aap-anime-card__rating {
    background: #3cce7b;
    border-radius: 6px;
    font-size: 15px;
    left: 10px;
    line-height: 30px;
    min-height: 30px;
    padding: 0 8px;
    top: 10px;
}

.aap-season .aap-anime-card__rating .aap-icon {
    color: #fff;
    fill: #fff;
}

.aap-anime-card__catalog {
    display: none;
}

.aap-season .aap-anime-card__catalog {
    align-items: center;
    background: rgba(28, 28, 28, 0.82);
    border-radius: 6px;
    display: flex;
    height: 28px;
    justify-content: center;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 28px;
    z-index: 3;
}

.aap-history-section {
    background: var(--aap-panel-bg);
    border-radius: 10px;
    height: 413px;
    overflow: hidden;
}

.aap-history-section .aap-section-heading {
    align-items: center;
    background: var(--aap-panel-head);
    border-bottom: 3px solid var(--aap-accent);
    height: 51px;
    justify-content: center;
    margin: 0;
}

.aap-history-section .aap-section-heading h2 {
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
}

.aap-history-section .aap-section-heading > a {
    display: none;
}

.aap-history-section .aap-history-empty,
.aap-history-section .aap-history-empty--small {
    background-color: rgba(35, 35, 35, 0.88);
    background-image: url("../images/portal-landscape.png");
    background-position: center 66%;
    background-repeat: no-repeat;
    background-size: cover;
    background-blend-mode: multiply;
    border: 0;
    border-radius: 0;
    display: block;
    height: 362px;
    min-height: 362px;
    padding: 17px 15px 0;
    position: relative;
    text-align: center;
}

.aap-history-section .aap-history-empty__visual {
    display: none;
}

.aap-history-section .aap-history-empty > div {
    position: relative;
    z-index: 2;
}

.aap-history-section .aap-history-empty h3 {
    font-size: 0;
    margin: 0;
}

.aap-history-section .aap-history-empty h3::after {
    content: "Ничего не найдено";
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.aap-history-section .aap-history-empty p,
.aap-history-section .aap-history-empty .aap-button {
    display: none;
}

.aap-history-section .aap-history-empty::after {
    background: url("../images/history-character.png") center bottom / contain no-repeat;
    bottom: 0;
    content: "";
    height: 288px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 288px;
}

@media (min-width: 1390px) {
    .aap-shell {
        left: -4px;
        position: relative;
    }
}

@media (max-width: 1389px) {
    .aap-shell {
        padding-inline: 10px;
    }

    .aap-site-header .aap-brand {
        margin-left: 0;
    }

    .aap-site-header .aap-nav-link {
        font-size: 14px;
        padding-inline: 9px;
    }
}

@media (max-width: 1180px) {
    :root {
        --aap-header: 102px;
    }

    .aap-site-header {
        background: rgba(49, 49, 49, 0.97);
        height: var(--aap-header);
    }

    .aap-site-header::before {
        display: none;
    }

    .aap-site-header__inner {
        height: 56px;
        top: 0;
    }

    .aap-site-header .aap-brand {
        flex-basis: auto;
        height: 56px;
        margin: 0;
    }

    .aap-site-header .aap-brand__mark,
    .aap-site-header .aap-brand__custom {
        flex-basis: 38px;
        height: 38px;
        width: 38px;
    }

    .aap-site-header .aap-brand__mark .aap-icon {
        height: 22px;
        width: 22px;
    }

    .aap-brand__copy strong {
        font-size: 17px;
        font-weight: 700;
    }

    .aap-brand__copy small,
    .aap-search-cluster,
    .aap-desktop-nav {
        display: none;
    }

    .aap-site-header .aap-header-actions {
        margin-left: auto;
    }

    .aap-mobile-menu-button {
        display: inline-flex;
    }

    .aap-mobile-search {
        display: block;
        height: 46px;
        padding-bottom: 9px;
    }

    .aap-layout {
        padding-top: 14px;
    }

    .aap-home .aap-section,
    .aap-home .aap-social-strip {
        margin-inline: 0;
        width: 100%;
    }
}

@media (max-width: 820px) {
    body {
        background-attachment: scroll;
    }

    .aap-shell {
        padding-inline: 12px;
    }

    .aap-season {
        height: 286px;
    }

    .aap-season .aap-section-heading {
        height: 46px;
    }

    .aap-season .aap-section-heading h1 {
        font-size: 15px;
    }

    .aap-season .aap-card-rail {
        gap: 10px;
        grid-auto-columns: 150px;
        height: 240px;
        margin-inline: 0;
        overflow-x: auto;
        padding: 12px;
    }

    .aap-season .aap-anime-card,
    .aap-season .aap-anime-card__poster {
        height: 216px;
    }

    .aap-season .aap-heading-actions button {
        display: none;
    }

    .aap-season .aap-anime-card__body h3 {
        font-size: 12px;
    }

    .aap-season .aap-anime-card__rating {
        font-size: 12px;
        left: 7px;
        line-height: 24px;
        min-height: 24px;
        top: 7px;
    }

    .aap-history-section {
        height: 360px;
    }

    .aap-history-section .aap-section-heading {
        height: 46px;
    }

    .aap-history-section .aap-history-empty,
    .aap-history-section .aap-history-empty--small {
        height: 314px;
        min-height: 314px;
    }

    .aap-history-section .aap-history-empty h3::after {
        font-size: 21px;
    }

    .aap-history-section .aap-history-empty::after {
        height: 250px;
        width: 250px;
    }
}

@media (max-width: 420px) {
    .aap-site-header .aap-brand__copy strong {
        max-width: 170px;
    }

    .aap-season .aap-card-rail {
        grid-auto-columns: 142px;
    }
}
