/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 0%,
            #11181d 0%,
            #090e11 45%,
            #070b0d 100%
        );

    color: #f3f0ed;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.container {
    width: min(calc(100% - 80px), 1440px);
    margin-inline: auto;
}


/* =========================================
   HEADER
========================================= */

.site-header {
    height: 88px;

    background: rgba(8, 12, 15, 0.96);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.05);
}

.site-header__inner {
    display: flex;
    align-items: center;

    height: 100%;
}


/* LOGO */

.site-logo {
    display: flex;
    flex-direction: column;

    flex-shrink: 0;
}

.site-logo__name {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 25px;

    letter-spacing: 8px;
    line-height: 1;

    color: #fff;
}

.site-logo__dot {
    display: inline-block;

    width: 7px;
    height: 7px;

    margin-left: -2px;

    border-radius: 50%;

    background: #d92e35;

    vertical-align: middle;
}

.site-logo__subtitle {
    margin-top: 8px;

    color: #96999c;

    font-size: 10px;

    letter-spacing: 6px;
}


/* NAVIGATION */

.site-nav {
    display: flex;
    align-items: center;

    gap: 46px;

    margin-left: auto;
    margin-right: auto;
}

.site-nav__link {
    position: relative;

    padding:
        34px 0
        29px;

    color: #a8aaad;

    font-size: 14px;

    transition: color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link--active {
    color: #fff;
}

.site-nav__link--active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 21px;

    height: 1px;

    background: #d92e35;
}


/* HEADER ACTIONS */

.site-header__actions {
    display: flex;
    align-items: center;

    gap: 42px;
}

.search-button {
    position: relative;

    width: 25px;
    height: 25px;

    padding: 0;

    border: 0;

    background: transparent;

    cursor: pointer;
}

.search-button__icon {
    position: absolute;

    top: 1px;
    left: 1px;

    width: 17px;
    height: 17px;

    border: 2px solid #fff;
    border-radius: 50%;
}

.search-button__icon::after {
    content: "";

    position: absolute;

    right: -6px;
    bottom: -3px;

    width: 8px;
    height: 2px;

    background: #fff;

    transform: rotate(45deg);
    transform-origin: left center;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 112px;
    height: 45px;

    border: 1px solid #777;
    border-radius: 9px;

    font-size: 14px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.login-button:hover {
    background: #f4f0ed;
    color: #111;
}


/* =========================================
   HOME
========================================= */

.home {
    width: 100%;
}



/* =========================================
   HERO
========================================= */

.hero {
    position: relative;

    width: min(calc(100% - 80px), 1440px);
    height: 520px;

    margin: 0 auto;

    overflow: hidden;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


/* BACKGROUND IMAGE */

.hero-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;
}

.hero-image::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(7, 14, 18, 0.96) 0%,
        rgba(7, 14, 18, 0.78) 22%,
        rgba(7, 14, 18, 0.35) 48%,
        rgba(7, 14, 18, 0.08) 75%,
        rgba(7, 14, 18, 0.02) 100%
    );
}


/* CONTENT */

.hero__content {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    justify-content: center;

    width: 50%;
    height: 100%;

    padding-left: 12px;
}


/* TITLE */

.hero__title {
    margin: 0;

    color: #f4f1ee;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(48px, 4vw, 72px);
    font-weight: 400;

    line-height: 0.98;
    letter-spacing: -2px;
}


/* DESCRIPTION */

.hero__description {
    margin: 26px 0 0;

    color: #d2d3d4;

    font-size: 15px;
    line-height: 1.7;
}


/* BUTTON */

.hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;

    width: 205px;
    height: 56px;

    margin-top: 28px;
    padding: 0 24px;

    border-radius: 8px;

    background: #f4efeb;
    color: #111;

    font-size: 14px;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.hero__button:hover {
    transform: translateY(-2px);
    background: #fff;
}

.hero__button span {
    font-size: 22px;
}


/* PAGINATION */

.hero__pagination {
    position: absolute;

    left: 12px;
    bottom: 38px;

    display: flex;
    align-items: center;
    gap: 16px;

    color: #697177;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 12px;
}

.hero__pagination-current {
    color: #fff;
}

.hero__pagination-line {
    display: block;

    width: 56px;
    height: 1px;

    background: rgba(255, 255, 255, 0.55);
}

.hero__pagination-line--muted {
    opacity: 0.35;
}
/* =========================================
   SECTIONS
========================================= */

.home-section {
    width: min(calc(100% - 80px), 1440px);

    margin: 0 auto;

    padding-top: 45px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 22px;
}

.section-header h2 {
    position: relative;

    margin: 0;
    padding-bottom: 10px;

    color: #f1efec;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 31px;
    font-weight: 400;
}

.section-header h2::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 30px;
    height: 2px;

    background: #d92e35;
}

.section-header > a,
.popular-controls > a {
    color: #d2d2d2;

    font-size: 13px;
}

.section-header > a:hover,
.popular-controls > a:hover {
    color: #fff;
}


/* =========================================
   POPULAR
========================================= */

.popular-controls {
    display: flex;
    align-items: center;

    gap: 12px;

    padding-bottom: 4px;
}

.popular-controls > a {
    margin-left: 10px;
}

.popular-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    border:
        1px solid rgba(255, 255, 255, 0.16);

    border-radius: 50%;

    background: transparent;
    color: #fff;

    font-size: 18px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        opacity 0.2s ease;
}

.popular-arrow:hover:not(:disabled) {
    border-color:
        rgba(255, 255, 255, 0.5);

    background:
        rgba(255, 255, 255, 0.06);
}

.popular-arrow:disabled {
    opacity: 0.25;

    cursor: default;
}


/* POPULAR GRID */

.anime-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 18px;
}

.anime-card {
    min-width: 0;
}

.anime-card__poster {
    position: relative;

    width: 100%;

    aspect-ratio: 2 / 3;

    overflow: hidden;

    border-radius: 6px;

    background: #11191e;
}

.anime-card__poster img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.3s ease;
}

.anime-card:hover .anime-card__poster img {
    transform: scale(1.025);
}

.anime-card__rating {
    position: absolute;

    right: 8px;
    bottom: 8px;

    padding: 5px 8px;

    border-radius: 5px;

    background: rgba(5, 8, 10, 0.88);
    color: #f1d27a;

    font-size: 12px;
}

.anime-card__title {
    display: -webkit-box;

    margin: 11px 0 0;

    overflow: hidden;

    color: #f1efec;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.anime-card__genres {
    margin: 7px 0 0;

    overflow: hidden;

    color: #777f84;

    font-size: 12px;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================
   RECENT EPISODES
========================================= */

.recent-panel {
    width: 100%;

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, 0.09);

    border-radius: 7px;

    background:
        rgba(13, 19, 23, 0.7);
}


/*
    ДВЕ КОЛОНКИ
*/

.recent-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    width: 100%;
}


/*
    ОДНА КАРТОЧКА
*/

.recent-card {
    display: grid;

    grid-template-columns:
        86px minmax(0, 1fr);

    align-items: center;

    gap: 17px;

    min-width: 0;
    min-height: 132px;

    padding: 14px 18px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}


/*
    Вертикальная линия между колонками
*/

.recent-card:nth-child(odd) {
    border-right:
        1px solid rgba(255, 255, 255, 0.07);
}


/*
    У последних двух элементов
    нижняя граница не нужна
*/

.recent-card:nth-last-child(-n + 2) {
    border-bottom: 0;
}


/* POSTER */

.recent-card__poster {
    width: 86px;
    height: 104px;

    overflow: hidden;

    border-radius: 5px;

    background: #11191e;
}

.recent-card__poster img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* CONTENT */

.recent-card__body {
    min-width: 0;
}

.recent-card__title {
    display: -webkit-box;

    margin: 0;

    overflow: hidden;

    color: #f2efec;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.35;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recent-card__details {
    display: flex;
    flex-wrap: wrap;

    gap: 6px 12px;

    margin-top: 9px;

    color: #8b9296;

    font-size: 12px;
}

.recent-card__episode {
    color: #c7cbcd;
}

.recent-card__date {
    display: block;

    margin-top: 8px;

    color: #626b70;

    font-size: 11px;
}

.empty-message {
    margin: 0;

    padding: 30px;

    color: #777f84;
}


/* =========================================
   ARTICLES
========================================= */

.articles {
    padding-bottom: 40px;
}

.articles-grid {
    display: grid;

    grid-template-columns:
        2.2fr 1fr;

    gap: 20px;
}

.featured-article,
.articles-list {
    min-height: 290px;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 7px;

    background:
        rgba(13, 19, 23, 0.7);
}


/* =========================================
   FOOTER
========================================= */

.site-footer {
    margin-top: 50px;

    border-top:
        1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__inner {
    display: flex;
    align-items: center;

    gap: 45px;

    min-height: 110px;
}

.site-logo--footer {
    margin-right: 20px;
}

.site-footer__text {
    margin: 0;

    color: #8f9396;

    font-size: 12px;
}

.site-footer__nav {
    display: flex;

    gap: 30px;

    margin-left: auto;

    color: #8f9396;

    font-size: 12px;
}

.site-footer__nav a:hover {
    color: #fff;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1000px) {

    .container,
    .hero,
    .home-section {
        width: min(calc(100% - 40px), 1440px);
    }

    .site-nav {
        display: none;
    }

    .site-header__actions {
        margin-left: auto;
    }

    .hero {
        height: 480px;
    }

    .hero__content {
        width: 70%;
    }

    .anime-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   MOBILE / RECENT
========================================= */

@media (max-width: 800px) {

    .recent-list {
        grid-template-columns: 1fr;
    }

    .recent-card {
        border-right: 0;
    }

    .recent-card:nth-child(odd) {
        border-right: 0;
    }

    .recent-card:nth-last-child(-n + 2) {
        border-bottom:
            1px solid rgba(255, 255, 255, 0.07);
    }

    .recent-card:last-child {
        border-bottom: 0;
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .container,
    .hero,
    .home-section {
        width: min(calc(100% - 24px), 1440px);
    }

    .site-header {
        height: 70px;
    }

    .site-logo__name {
        font-size: 20px;
        letter-spacing: 6px;
    }

    .site-logo__subtitle {
        font-size: 8px;
        letter-spacing: 4px;
    }

    .site-header__actions {
        gap: 18px;
    }

    .login-button {
        min-width: 82px;
        height: 38px;
    }

    .hero {
        height: 430px;
    }

    .hero__content {
        width: 100%;

        padding:
            0 12px;
    }

    .hero__title {
        font-size: 43px;
    }

    .hero__description {
        font-size: 13px;
    }

    .section-header {
        align-items: center;
    }

    .section-header h2 {
        font-size: 25px;
    }

    .anime-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 14px;
    }

    .popular-controls > a {
        display: none;
    }

    .recent-card {
        grid-template-columns:
            72px minmax(0, 1fr);

        min-height: 112px;

        padding: 12px;
    }

    .recent-card__poster {
        width: 72px;
        height: 88px;
    }

    .recent-card__title {
        font-size: 15px;
    }

    .site-footer__inner {
        flex-wrap: wrap;

        padding:
            25px 0;
    }

    .site-footer__nav {
        width: 100%;

        margin-left: 0;

        flex-wrap: wrap;
    }
}


.recent-load-more {
    display: flex;
    justify-content: center;

    margin-top: 22px;
}

.load-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    min-width: 180px;
    height: 46px;

    padding: 0 24px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;

    background: transparent;
    color: #e8e5e2;

    font-family: inherit;
    font-size: 13px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.load-more-button span {
    font-size: 16px;
}

.load-more-button:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.4);

    background: rgba(255, 255, 255, 0.04);
}

.load-more-button:disabled {
    opacity: 0.5;
    cursor: default;
}



/* =========================================
   ANIME DETAIL
========================================= */

.anime-detail {
    padding: 55px 0 90px;
}

.anime-detail__container {
    width: min(calc(100% - 80px), 1400px);
    margin: 0 auto;
}


/* POSTER + INFO */

.anime-profile {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 55px;

    padding-bottom: 55px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


/* POSTER */

.anime-profile__poster {
    width: 100%;
    aspect-ratio: 2 / 3;

    overflow: hidden;

    background: #0c1114;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.anime-profile__poster img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* INFO */

.anime-profile__content {
    min-width: 0;
    padding-top: 5px;
}

.anime-profile__top {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 40px;
}

.anime-profile__label {
    display: block;

    margin-bottom: 12px;

    color: #d84a50;

    font-size: 10px;
    letter-spacing: 4px;

    text-transform: uppercase;
}

.anime-profile__title {
    margin: 0;

    color: #f2efec;

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(36px, 4vw, 58px);
    font-weight: 400;
    line-height: 1.08;
}

.anime-profile__original {
    margin-top: 12px;

    color: #70787d;

    font-size: 14px;
}


/* RATING */

.anime-rating {
    display: flex;

    align-items: baseline;

    gap: 5px;

    flex-shrink: 0;

    padding: 12px 0 12px 25px;

    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.anime-rating__star {
    margin-right: 4px;

    color: #e6a958;

    font-size: 22px;
}

.anime-rating strong {
    color: #f2efec;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 30px;
    font-weight: 400;
}

.anime-rating > span:last-child {
    color: #70787d;

    font-size: 12px;
}


/* GENRES */

.anime-genres {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 28px;
}

.anime-genres span {
    padding: 7px 14px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;

    color: #cfd1d2;

    font-size: 12px;
}


/* STATS */

.anime-stats {
    display: flex;

    flex-wrap: wrap;

    margin-top: 32px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.anime-stat {
    min-width: 140px;

    padding: 18px 25px 18px 0;

    margin-right: 25px;
}

.anime-stat + .anime-stat {
    padding-left: 25px;

    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.anime-stat span {
    display: block;

    margin-bottom: 7px;

    color: #70787d;

    font-size: 11px;
}

.anime-stat strong {
    color: #e0e0de;

    font-size: 14px;
    font-weight: 400;
}


/* DESCRIPTION */

.anime-description {
    margin-top: 32px;
}

.anime-description__label {
    color: #70787d;

    font-size: 10px;
    letter-spacing: 4px;

    text-transform: uppercase;
}

.anime-description p {
    max-width: 850px;

    margin: 13px 0 0;

    color: #bdc1c3;

    font-size: 14px;
    line-height: 1.8;
}


/* META */

.anime-meta {
    margin-top: 28px;
}

.anime-meta__row {
    display: grid;

    grid-template-columns: 160px minmax(0, 1fr);

    gap: 20px;

    padding: 7px 0;

    font-size: 13px;
}

.anime-meta__row span {
    color: #6d757a;
}

.anime-meta__row strong {
    color: #c5c8c9;

    font-weight: 400;
}


/* =========================================
   PLAYER
========================================= */

.anime-watch {
    padding-top: 50px;
}

.anime-watch__header {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 30px;

    margin-bottom: 22px;
}

.anime-watch__label {
    display: block;

    margin-bottom: 8px;

    color: #d84a50;

    font-size: 10px;
    letter-spacing: 4px;

    text-transform: uppercase;
}

.anime-watch__header h2 {
    margin: 0;

    color: #f2efec;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 28px;
    font-weight: 400;
}

.anime-watch__episode {
    color: #70787d;

    font-size: 12px;
}


/* IFRAME */

.anime-player {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #020303;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.anime-player iframe {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}

.anime-player__empty {
    display: flex;

    width: 100%;
    height: 100%;

    align-items: center;
    justify-content: center;

    color: #687176;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {

    .anime-detail__container {
        width: min(calc(100% - 40px), 1400px);
    }

    .anime-profile {
        grid-template-columns: 230px minmax(0, 1fr);
        gap: 30px;
    }

    .anime-profile__top {
        flex-direction: column;
        gap: 15px;
    }

    .anime-rating {
        padding-left: 0;
        border-left: 0;
    }
}


@media (max-width: 650px) {

    .anime-detail {
        padding-top: 25px;
    }

    .anime-detail__container {
        width: calc(100% - 24px);
    }

    .anime-profile {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .anime-profile__poster {
        width: min(70%, 300px);
        margin: 0 auto;
    }

    .anime-profile__title {
        font-size: 34px;
    }

    .anime-stat {
        min-width: 50%;
        margin-right: 0;
    }

    .anime-stat + .anime-stat {
        padding-left: 0;
        border-left: 0;
    }

    .anime-meta__row {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .anime-watch__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}



.hero {
    position: relative;
    overflow: hidden;
}

.hero__content {
    position: relative;
    z-index: 2;

    min-height: 560px;

    display: flex;
    flex-direction: column;

    padding: 70px 30px 45px;
    box-sizing: border-box;
}

/* Картинка на ВСЮ секцию */
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    display: block;

    object-fit: cover;
    object-position: center;
}

/* Затемняем левую часть под текст */
.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(7, 14, 18, 0.98) 0%,
            rgba(7, 14, 18, 0.90) 20%,
            rgba(7, 14, 18, 0.55) 42%,
            rgba(7, 14, 18, 0.15) 68%,
            rgba(7, 14, 18, 0.05) 100%
        );

    z-index: 1;
}

/* Контент поверх изображения */
.hero__title,
.hero__description,
.hero__button,
.hero__pagination {
    position: relative;
    z-index: 2;
}