/* reset css */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    font-size: 62.5%;
    font-family: "Roboto", "sans-serif";
    font-weight: normal;
    background-color: #17161B;
    color: #ffffff;
}

img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

ul {
    padding-left: 0;
}

ul>li {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

h1,
h2,
h3,
h4,
h4,
h5,
h6 {
    padding: 0;
    margin: 0;
}

button,
input {
    outline: none;
    border: none;
    cursor: pointer;
}

.header {
    grid-area: my-header;
}

.main {
    grid-area: my-main;
}

.aside {
    grid-area: my-aside;
}

/* grid */
.grid {
    display: grid;
    grid-template-areas:
        "my-header my-header"
        "my-aside my-main"
        "my-aside my-main";
    grid-template-columns: 1fr 2fr;
    gap: 3rem 0;
}

.grid-init {
    max-width: 144rem;
    margin: auto;
    padding: 3rem 2.4rem 4rem;
}

/* header */
.header {
    box-shadow: 0 0.4rem 1rem rgba(255, 255, 255, 0.07);
}

.header__wrap {
    display: flex;
    align-items: center;
}

.header__logo {
    font-size: 6.4rem;
    font-weight: 700;
    line-height: 117%;
    margin-right: 7rem;
}

.header__nav {
    margin-right: 9.2rem;
}

.header__nav a {
    font-size: 2.4rem;
    font-weight: 500;
    line-height: 117%;
}

.header__nav a:not(:last-child) {
    margin-right: 2rem;
}

.header__find {
    width: 33rem;
    height: 4.1rem;
    border-radius: 0.8rem;
    margin-right: 4rem;
}

.header__find input {
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.08);
    background-image: url('../img/search.svg');
    background-repeat: no-repeat;
    background-size: 2rem;
    background-position: top 50% right 1.5rem;
    border-radius: 0.8rem;
    padding-left: 1rem;
    padding-right: 4rem;
    font-size: 2rem;
    font-weight: 400;
    line-height: 115%;
    color: #ffffff;
}

.header__find input::placeholder {
    font-size: 2rem;
    color: #ffffff;
}

.header__date {
    text-align: center;
    margin-right: 8.6rem;
}

.header__hour {
    font-size: 2rem;
    font-weight: 400;
    line-height: 115%;
}

.header__days {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 117%;
}

.header__personal {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
}

/* aside */

.aside {
    padding-right: 3.6rem;
    position: relative;
}

.aside::after {
    content: url('../img/triangle.svg');
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.2rem;
    height: 2.6rem;
    background-color: #FCFCFE;
    border-radius: 2rem;
    position: absolute;
    top: 10.7rem;
    right: 2.5rem;
    cursor: pointer;
}

.aside__wrap {
    background-color: rgba(255, 255, 255, 0.02);
    margin-left: -2.4rem;
}

.aside__top {
    padding-top: 5rem;
    padding-right: 2.3rem;
    padding-left: 2.4rem;
    padding-bottom: 4rem;
    background-color: #17161B;
    /* border-right: 0.1rem solid  #1C1B1F; */
    border-right: 0.1rem solid rgba(255, 255, 255, 0.4);
}

.aside__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.6rem;
}

.aside__header {
    font-size: 2.0rem;
    font-weight: 400;
    line-height: 115%;
}

.aside__sort {
    display: flex;
}

.aside__sort-text {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 114%;
    color: rgba(255, 255, 255, 0.4);
}

.aside__sort-select {
    display: flex;
    align-items: center;
}

.aside__sort-select span {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 114%;
}

.aside__sort-img {
    display: flex;
    flex-direction: column;
    margin-left: 0.4rem;
}

.aside__sort-img img {
    width: 0.7rem;
    height: 0.7rem;
    cursor: pointer;
}

.aside__sort-img img:nth-child(1) {
    margin-bottom: 0.3rem;
}

.aside__item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 22.6rem;
    border-radius: 1.5rem;
    padding: 1.9rem 0 1.9rem 1.9rem;
    background-image: url('../img/aside-item.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.aside__item:nth-child(3) {
    margin-top: 3rem;
    /* margin-bottom: 4rem; */
}

.aside__views {
    position: relative;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 119%;
    z-index: 10;
}

.aside__footer {
    position: relative;
    z-index: 10;
}

.aside__footer-bottom {
    position: relative;
}

.aside__footer-bottom::before {
    content: '';
    display: block;
    width: 24rem;
    height: 0.1rem;
    background-color: rgba(255, 255, 255, 0.4);
    position: absolute;
    top: -50%;
    left: 0;
    transform: translate(0, 50%);
}

.aside__item-name {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 117%;
    margin-bottom: 0.5rem;
}

.aside__item-date {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 114%;
}

.aside__bottom {
    padding: 2.5rem 0 2rem 2.4rem;
    /* background-color: rgba(255, 255, 255, 0.02); */
}

.aside__favourite {
    margin-bottom: 6rem;
}

.aside__favourite-text {
    font-size: 2.0rem;
    font-weight: 400;
    line-height: 115%;
    margin-bottom: 2.0rem;
}

.aside__genre-items {
    display: flex;
    flex-wrap: wrap;
    align-content: space-between;
    padding-right: 5rem;
}

.aside__genre {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 117%;
    padding: 0.5rem 1rem;
    border-radius: 3rem;
    margin-bottom: 2rem;
    margin-right: 3rem;
}

.perple {
    background-color: #8066F6;
}

.orange {
    background-color: #E1784F;
}

.green {
    background-color: #63CFE1;
}

.aside__add {
    display: flex;
    margin-bottom: 2rem;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 114%;
    cursor: pointer;
}

.aside__add-round {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2B2A2F;
    margin-right: 0.5rem;
}

.gray {
    background-color: #2B2A2F;
}

/* main */

.main-display {
    padding-top: 5rem;
}

.main-display__trailer {
    position: relative;
    width: 98.5%;
    height: 20.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-image: url('../img/back-trailer.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 1.6rem;
    padding: 1.9rem 0 1.9rem 1.9rem;
}

.main-display__trailer::after,
.trending__item::after,
.popular__item::after,
.aside__item::after,
.aside__item::after {
    content: '';
    position: absolute;
    display: block;
    inset: 0;
    border-radius: 1.6rem;
    background-color: rgba(0, 0, 0, 0.04);
    z-index: 0;
}


.main-display__views {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 119%;
}

.main-display__header {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 150%;
}

.main-display__date {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 114%;
}

.button-play__wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 8.1rem;
    height: 8.1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    /* filter: blur(1.6rem); */
    cursor: pointer;
}

.button-play {
    width: 0;
    height: 0;
    border-top: 1.5rem solid rgba(255, 255, 255, 0.07);
    border-left: 2.5rem solid #ffffff;
    border-bottom: 1.5rem solid rgba(255, 255, 255, 0.07);
    border-radius: 0.2rem;
    cursor: pointer;
}

.title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
    padding-right: 1rem;
}

.title__left,
.title__right {
    display: flex;
    align-items: center;
}

.title__main {
    font-size: 2.0rem;
    font-weight: 400;
    line-height: 115%;
}

.title__count {
    font-size: 2.0rem;
    font-weight: 400;
    line-height: 115%;
    margin-left: 2rem;
    padding-top: 0.3rem;
    color: rgba(255, 255, 255, 0.2);
}

.title__right span {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 114%;
    color: rgba(255, 255, 255, 0.2);
}

.title__right img {
    width: 2rem;
    height: 1.6rem;
    margin-left: 0.4rem;
}

/* trending */
.trending,
.popular {
    display: flex;
    justify-content: space-between;
    padding-right: 1.6rem;
}

.trending__item {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 47%;
    height: 25rem;
    border-radius: 1.6rem;
    background-image: url('../img/trending-item-back.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.trending__plash {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 114%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 1.6rem;
    padding: 0.4rem 1.3rem;
    z-index: 10;
}

.trending__footer,
.popular__footer {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem 1rem 1.8rem 6.4rem;
    border-radius: 1.6rem;
    background-color: rgba(255, 255, 255, 0.3);
}

.small {
    width: 5rem;
    height: 5rem;
    left: 7%;
}

.small-plus {
    width: 3rem;
    height: 3rem;
    left: 10%;
}

.button-play__wrap.small .button-play {
    width: 0;
    height: 0;
    border-top: 1rem solid rgba(255, 255, 255, 0.07);
    border-left: 1.5rem solid #ffffff;
    border-bottom: 1rem solid rgba(255, 255, 255, 0.07);
    border-radius: 0.2rem;
    cursor: pointer;
}

.button-play__wrap.small-plus .button-play {
    width: 0;
    height: 0;
    border-top: 0.5rem solid rgba(255, 255, 255, 0.07);
    border-left: 1rem solid #ffffff;
    border-bottom: 0.5rem solid rgba(255, 255, 255, 0.07);
    border-radius: 0.2rem;
    cursor: pointer;
}

.trending__header {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 150%;
}

.trending__date {
    font-size: 1.0rem;
    font-weight: 700;
    line-height: 120%;
}

.trending__time {
    padding: 0.4rem 1.3rem;
    background-color: #ffffff;
    border-radius: 1.6rem;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 114%;
    color: #000000;
}

/* popular */

.popular__item {
    display: flex;
    align-items: flex-end;
    width: 30%;
    height: 19.2rem;
    border-radius: 1.6rem;
    background-image: url('../img/popular-item-back.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.popular__footer {
    background-color: rgba(255, 255, 255, 0.4);
    padding: 0.8rem 1.9rem 0.8rem 6.4rem;
}

.popular__header {
    font-size: 1.0rem;
    font-weight: 400;
    line-height: 120%;
}

.popular__date {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 113%;
}

.popular__rating {
    display: flex;
    align-items: center;
}

.popular__rating span {
    font-size: 1.0rem;
    font-weight: 700;
    line-height: 120%;
    margin-left: 0.4rem;
}

/* modal */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 3rem 0;
    z-index: 1000;
    display: none;
}


.close {}

.modal__inner {
    width: 100rem;
    height: 60rem;
}

.active {
    display: flex;
}

/* media grid */

@media (max-width: 108em) {
    html {
        font-size: 9px;
    }
}

@media (max-width: 105em) {
    html {
        font-size: 8.75px;
    }
}

@media (max-width: 91.5em) {
    html {
        font-size: 7.9px;
    }
}

@media (max-width: 91em) {
    html {
        font-size: 8.4px;
    }
}

@media (max-width: 90em) {
    html {
        font-size: 7.9px;
    }
}

@media (max-width: 80em) {
    html {
        font-size: 7.2px;
    }
}

@media (max-width: 72em) {
    html {
        font-size: 6.5px;
    }
}

@media (max-width: 64em) {
    html {
        font-size: 5.5px;
    }
}

@media (max-width: 48em) {
    html {
        font-size: 10px;
    }
}

@media (max-width: 44em) {
    html {
        font-size: 9px;
    }
}

@media (max-width: 38em) {
    html {
        font-size: 8px;
    }
}

@media (max-width: 34em) {
    html {
        font-size: 7px;
    }
}

@media (max-width: 30em) {
    html {
        font-size: 6px;
    }
}

@media (max-width: 26em) {
    html {
        font-size: 4.5px;
    }
}

@media (max-width: 21em) {
    html {
        font-size: 4.4px;
    }
}