@font-face {
    font-family: "Inter";
    src: url("/fonts/Inter-VariableFont_opsz,wght.ttf");
    font-display: swap;
}
:root {
    --color-bg: #171717;
    --color-toggle: #E5E5E5;
    --color-moon: #171717;
    --color-sun: #E5E5E5;
    --color-header: #212121;
    --color-header-text: #A1A1A1;
    --color-header-text-active: #FFFFFF;
    --color-search-li: #FAFAFA;
    --color-h1: #FAFAFA;
    --color-info-span-bg: #171717;
    --color-info-span-text: #A1A1A1;
    --color-info-span-border: #2E2F2F;
    --color-h2: #FAFAFA;
    --color-line: #343535;
    --color-descr-bg: #1E1E1E;
    --color-descr-border: #343535;
    --color-descr-p: #C8C8C8;
    --color-descr-h3: #FFFFFF;
    --color-name-comment: #FFFFFF;
    --color-text-comment: #C8C8C8;
    --color-date-comment: #A1A1A1;
    --opacity-button: .8;
}
.light-theme {
    --color-bg: #F5F5F5;
    --color-toggle: #0A0A0A;
    --color-moon: #0A0A0A;
    --color-sun: #FFFFFF;
    --color-header: #FFFFFF;
    --color-header-text: #737373;
    --color-header-text-active: #000000;
    --color-search-li: #000000;
    --color-h1: #0A0A0A;
    --color-info-span-bg: #FFFFFF;
    --color-info-span-text: #737373;
    --color-info-span-border: #EBEBEB;
    --color-h2: #0A0A0A;
    --color-line: #E5E5E5;
    --color-descr-bg: #FFFFFF;
    --color-descr-border: #DDDDDD;
    --color-descr-p: #737373;
    --color-descr-h3: #0A0A0A;
    --color-name-comment: #0A0A0A;
    --color-text-comment: #737373;
    --color-date-comment: #737373;
    --opacity-button: .9;
}
body {
    min-height: 100vh;
    background-color: #0A0A0A;
    font-family: "Inter", sans-serif;
}
.content {
    position: relative;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}
/*
    Фоновое изображение
*/
.back-img-wrapper {
    position: absolute;
    width: 100%;
    top: 0;
}
.back-img-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    opacity: .4;
}
.back-img-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, #0A0A0A 0%, rgba(0,0,0,0) 13%);
}
.logo {
    margin-bottom: 40px;
    padding: 20px 40px;
}
.logo img {
    width: 278px;
    height: 60px;
}
/*
    Шапка
 */
header {
    background: linear-gradient(to bottom, #568F56, #305930);
    padding: 0 30px;
    width: 1020px;
    height: 80px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    gap: 20px;
    align-items: center;
    border-radius: 20px;
    z-index: 1;
}
/*
Переключение темы
 */
.toggle label {
    width: 74px;
    height: 40px;
    position: relative;
    display: block;
    background-color: var(--color-header);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}
.toggle label:after {
    content: "";
    width: 34px;
    height: 34px;
    position: absolute;
    top: 3px;
    left: 3px;
    background-color: var(--color-toggle);
    border-radius: 8px;
    transition: 0.3s;
}
#theme-toggle {
    display: none;
}
#theme-toggle:checked + label:after {
    left: 37px;
    background-color: var(--color-toggle);
}
.moon {
    position: absolute;
    width: 16px;
    height: 16px;
    left: 12px;
    top: 12px;
    z-index: 5;
    color: var(--color-moon);
    fill: var(--color-moon);
}
.sunMedium {
    position: absolute;
    width: 16px;
    height: 16px;
    right: 12px;
    top: 12px;
    z-index: 5;
    color: var(--color-sun);
    fill: var(--color-sun);
}
/*
Поиск
 */
.search {
    position: relative;
    width: 100%;
}
.search input {
    background-color: var(--color-header);
    color: var(--color-header-text-active);
    border: none;
    width: 100%;
    height: 40px;
    border-radius: 10px;
    padding: 11px 20px 11px 46px;
    box-sizing: border-box;
    font-size: 15px;
}
.search input:focus {
    outline: none;
}
.search input::placeholder {
    color: var(--color-header-text);
}
.search:focus-within .magnifier {
    color: var(--color-header-text-active);
}
.magnifier{
    color: var(--color-header-text);
    position: absolute;
    left: 20px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    z-index: 1;
}
.result-search {
    display: none;
}
header.active ul.result-search {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: absolute;
    background-color: var(--color-header);
    width: 100%;
    min-height: 58px;
    border: #305930 3px solid;
    border-top: none;
    border-radius: 0 0 20px 20px;
    box-sizing: border-box;
    margin: 0;
    padding: 20px;
    top: 60px;
    list-style-type: none;
}
.result-search li a, .result-search li{
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    font-weight: bold;
    color: var(--color-search-li);
    text-decoration: none;
    width: 100%;
}
.result-search li:hover {
    background-color: var(--color-bg);
    box-shadow: 0 0 0 8px var(--color-bg);
    border-radius: 10px;
}
.result-search img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}
/*
Ссылки
 */
.links {
    width: 74px;
    padding: 0 3px;
    height: 40px;
    background-color: var(--color-header);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.links .telegram {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #28A8EA;
    border-radius: 8px 0 0 8px;
    width: 34px;
    height: 34px;
}
.links .vk {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0077FF;
    border-radius: 0 8px 8px 0;
    width: 34px;
    height: 34px;
}
/*
Основной контент
 */
main {
    background-color: var(--color-bg);
    border-left: #222222 1px solid;
    border-right: #222222 1px solid;
    margin-top: -40px;
    width: 1000px;
    padding: 60px 20px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
/*
Информация
 */
.info-anime {
    display: flex;
    gap: 20px;
}
.info-anime img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}
.info-anime > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}
h1 {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-h1);
    margin: 0;
}
.info-anime .category {
    display: flex;
    gap: 10px;
}
.info-anime span {
    background-color: var(--color-info-span-bg);
    color: var(--color-info-span-text);
    border: var(--color-info-span-border) 1px solid;
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 500;
}
/*
Серии
 */
.anime-content {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.name-season {
    display: flex;
    align-items: center;
    justify-content: center;
}
h2.name-season {
    color: var(--color-h2);
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}
.name-season::before {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--color-line);
    margin-right: 20px;
}
.name-season::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--color-line);
    margin-left: 20px;
}
.list-series {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.list-series a {
    background: linear-gradient(to bottom, #568F56, #305930);
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
    padding: 0 20px;
    border-radius: 10px;
    height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    opacity: var(--opacity-button);
}
.list-series a.viewed {
    opacity: .4;
}
.list-series a.viewed:hover {
    opacity: .6;
}
.other-recommendation {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
}
.other-recommendation a {
    text-decoration: none;
    display: flex;
    gap: 20px;
    align-items: center;
    color: var(--color-h1);
    font-size: 15px;
    font-weight: bold;
}
.other-recommendation img {
    height: 60px;
    width: 60px;
    object-fit: cover;
    border-radius: 10px;
}
/*
Описание аниме
 */
.description-content {
    color: var(--color-descr-p);
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: break-word;
    background-color: var(--color-descr-bg);
    border-top: var(--color-descr-border) 1px solid;
    border-bottom: var(--color-descr-border) 1px solid;
    border-left: #222222 1px solid;
    border-right: #222222 1px solid;
    width: 1000px;
    padding: 40px 20px;
    box-sizing: border-box;
}
.description-content *:first-child {
    padding-top: 0;
}
.description-content *:last-child {
    padding-bottom: 0;
}
.description-content h3, .description-content h2 {
    color: var(--color-descr-h3);
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    padding: 20px 0;
}
.description-content p {
    margin: 0;
    padding-bottom: 20px;
}
.description-content img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 20px;
}
.description-content ul, ol {
    margin: 0 0 0 26px;
    padding: 0 0 20px 0;
}
.description-content iframe {
    width: 100%;
    border: 0;
    aspect-ratio: 16/9;
}
/*
Подвал
 */
footer {
    width: 1000px;
    background-color: var(--color-bg);
    border: #222222 1px solid;
    font-size: 13px;
    color: #A1A1A1;
    box-sizing: border-box;
    border-top: var(--color-descr-border);
    border-radius: 0 0 20px 20px;
    padding: 20px;
    text-align: center;
    font-weight: 300;
    line-height: 1.5;
}
footer p {
    margin: 0;
}
footer a {
    font-weight: bold;
    color: #A1A1A1;
    text-underline-offset: 0.15em;

}

/*
Просмотр серии
 */
.info-series {
    display: flex;
    gap: 20px;
    align-items: center;
    color: var(--color-h1);
}
.info-series img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}
.info-series h1 {
    font-size: 15px;
    font-weight: bold;
    margin: 0;
}
.info-series span {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}
.players-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.players-buttons button {
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
    padding: 11px 20px;
    border-radius: 10px;
    background: linear-gradient(to bottom, #568F56, #305930);
    border: 0;
    opacity: .4;
    cursor: pointer;
}
.players-buttons button:hover, .add-comment-avatar img:hover {
    opacity: 0.8;
}
.players-buttons button.active {
    opacity: 1;
}
.players {
    height: 100%;
}
.players iframe {
    display: none;
}
.players iframe.active {
    display: block;
    width: 100%;
    border: 0;
    aspect-ratio: 16/9;
}
.manage-series {
    display: flex;
    justify-content: space-between;
}
.manage-series a {
    display: block;
    background: linear-gradient(to bottom, #568F56, #305930);
    color: #FFFFFF;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
    padding: 11px 20px;
    border-radius: 10px;
    opacity: var(--opacity-button);
}
.manage-series a:hover, .add-comment button:hover, .list-series a:hover{
    opacity: 1;
}
/*
Комментарии
 */
.comments {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}
.comment {
    display: flex;
    gap: 20px;
}
.comment > div {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 0;
}
.comment img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 10px;
}
.info-comment{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.name-comment {
    font-size: 15px;
    font-weight: bold;
    color: var(--color-name-comment);
    margin: 0;
    overflow-wrap: break-word;
}
.text-comment {
    font-size: 15px;
    color: var(--color-text-comment);
    line-height: 1.5;
    margin: 0;
    overflow-wrap: break-word;
}
.date-publication {
    color: var(--color-date-comment);
    font-size: 13px;
    margin-top: -7px;
}
.reply-to-comment {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
/*
Действия с комментариями
 */
.actions-with-comment {
    display: flex;
    gap: 16px;
}
.actions-with-comment button {
    background: none;
    color: var(--color-date-comment);
    border: none;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}
.answer-button svg {
    width: 14px;
    height: 14px;
    color: var(--color-date-comment);
}
.like svg {
    width: 14px;
    height: 14px;
    color: var(--color-date-comment);
}
.like.active span, .like.active svg, .complain.active span{
    color: #ff5861;
}
.complain.active > svg {
    fill: #ff5861;
}
.complain > svg {
    width: 13px;
    height: 13px;
    color: var(--color-bg);
    fill: var(--color-date-comment);
}
.complain {
    margin-left: auto;
    align-items: center;
}
/*
Добавление комментария
 */
.add-comment {
    width: 1000px;
    background-color: var(--color-descr-bg);
    border-top: var(--color-descr-border) 1px solid;
    border-bottom: var(--color-descr-border) 1px solid;
    border-left: #222222 1px solid;
    border-right: #222222 1px solid;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.answer-to{
    display: none;
}
.answer-to.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.answer-to > div.answer-label {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}
.answer-label > p {
    color: var(--color-header-text);
    font-size: 13px;
    margin: 0;
}
.answer-label svg {
    color: var(--color-header-text);
    width: 20px;
    height: 20px;
    cursor: pointer;
}
.answer-label svg:hover {
    color: var(--color-name-comment);
}
.answer-to > div.info-comment {
    width: 100%;
    background-color: var(--color-descr-border);
    border-radius: 10px;
    padding: 12px;
    box-sizing: border-box;
}
.add-comment label {
    color: var(--color-header-text);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.add-comment input {
    background-color: var(--color-bg);
    border: var(--color-descr-border) 1px solid;
    color: var(--color-name-comment);
    padding: 0 20px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    height: 40px;
}
.add-comment textarea {
    background-color: var(--color-bg);
    border: var(--color-descr-border) 1px solid;
    color: var(--color-text-comment);
    padding: 11px 20px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    height: 100px;
    resize: vertical;
}
.avatar-button {
    display: inline-flex;
    justify-content: space-between;
    align-items: end;
}
.add-comment legend{
    color: var(--color-header-text);
    font-size: 13px;
    display: block;
    margin-bottom: 10px;
}
.add-comment-avatar {
    border: none;
    display: inline-flex;
    gap: 5px;
    padding: 0;
    margin: 0;
}
.add-comment-avatar input{
    display: none;
}
.add-comment-avatar img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    opacity: .4;
}
.add-comment-avatar input:checked + img {
    opacity: 1;
}
.add-comment button {
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
    height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    background: linear-gradient(to bottom, #568F56, #305930);
    border: 0;
    cursor: pointer;
    opacity: var(--opacity-button);
}
#error {
    display: none;
}
#error.active {
    display: block;
    background-color: #ff5861;
    color: black;
    padding: 16px;
    font-size: 13px;
    overflow-wrap: break-word;
    border-radius: 10px;
    line-height: 1.5;
}
/*
Описание серии
 */
.description-content.description-series {
    background-color: var(--color-bg);
    border-left: #222222 1px solid;
    border-right: #222222 1px solid;
    border-bottom: var(--color-descr-border) 1px solid;
    padding: 40px 20px;
}
.description-series p {
    padding-bottom: 10px;
}
@media (max-width: 1023px) {
    h1 {
        text-align: center;
    }
    .back-img-wrapper {
        display: none;
    }
    .content {
        padding: 0;
    }
    .logo {
        margin: 0;
        padding: 40px 0;
        width: 100%;
        text-align: center;
    }
    header {
        width: 100%;
        border-radius: 0;
        padding: 0 20px;
    }
    main {
        width: 100%;
    }
    .info-anime {
        flex-direction: column;
        align-items: center;
    }
    .info-anime .category {
        justify-content: center;
    }
    .other-recommendation {
        grid-template-columns: 1fr;
    }
    .description-content {
        width: 100%;
    }
    .description-content ul, ol {
        margin-left: 20px;
    }
    footer {
        width: 100%;
        border-radius: 0;
    }
    header.active ul.result-search {
        left: -20px;
        right: -20px;
        width: auto;
        border-radius: 0;
    }
    header.display-none-button .toggle, header.display-none-button .links{
        display: none;
    }
    .info-series {
        flex-direction: column;
        text-align: center;
    }
    .players-buttons {
        justify-content: center;
    }
    .manage-series {
        flex-wrap: wrap;
        gap: 10px;
        text-align: center;
    }
    .manage-series a:first-child {
        order: 0;
        flex: 1;
    }
    .manage-series a:last-child {
        order: 1;
        flex: 1;
    }
    .list-series-button {
        flex-basis: 100%;
        order: 2;
    }
    .complain span {
        display: none;
    }
    .add-comment {
        width: 100%;
    }
    .add-comment > div.avatar-button {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    .add-comment > div.avatar-button > button {
        width: 100%;
    }
    .actions-with-comment {
        flex-wrap: wrap;
    }
}
