body {
    background-image: url("../img/background.9646a4cbd954.jpg");
    background-size: 100%;


    overflow-y: auto;
    overflow-x: hidden; /* чтобы не было горизонтального скролла */
    scrollbar-gutter: stable; /* предотвращает "прыгание" контента */
    padding-right: 4px; /* место для скроллбара */

    @media screen and (max-width: 800px) {
        background-image: url("../img/background_vert.9646a4cbd954.jpg");
    }
}

/* 1 row =====================================================  */
.first-row {
    height: 20vh;
    align-items: center;


    @media screen and (max-width: 800px) {
        margin-bottom: 2em;
    }
}


.title {
    font-size: 3.5rem;
    color: var(--red-color);
    font-weight: bold;

    @media (min-width: 2400px) {
        font-size: 6em;

    }
    @media (min-width: 3000px) {
        font-size: 9em;

    }
}

.header-img {
    height: 100%;

    @media screen and (max-width: 800px) {
        height: 0;
        display: none;
    }
}

.header-options {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

}

#users-panel {
    height: 28%;
    width: 25%;
    display: flex;
    align-items: center;
    align-content: center;
    text-align: center;
    background-color: var(--black-color);
    border-radius: var(--bs-border-radius);

    .dropdown-toggle {
        height: 100%;
        width: 100%;
        text-align: center;
        font-weight: bold;
        color: var(--white-color);

        /* Аватарка + имя в одну строку по центру, кнопку не растягивают */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4em;

        @media screen and (max-width: 800px) {
            text-align: center;
            font-size: 0.7em;
        }

        &:after {
            content: none;
        }
    }

    #current-user-avatar {
        height: 1.4em;
        width: 1.4em;
        object-fit: cover;
        border-radius: 50%;
        flex-shrink: 0;
    }

    #current-user-avatar.hide {
        display: none;
    }

    .dropdown-menu {
        color: var(--black-color);
        background-color: bisque;
        height: 16em;
    }

    .user-name {
        height: 25%;

        .dropdown-item {
            /*height: 3em;*/
            font-size: 1.5em;
        }

        img {
            height: 99%;
            object-fit: contain;
        }

    }
    .user-note {
        width: 1em;
    }


    @media (min-width: 2400px) {
        border-radius: 8%;
        height: 29%;
        width: 29%;

        .dropdown-toggle {
            font-size: 1.5em;
        }

        .dropdown-item {
            height: 3em;
            font-size: 1.5em;
        }
    }

    @media (min-width: 3000px) {

        .dropdown-toggle {
            font-size: 2.5em;
        }

        .dropdown-item {
            height: 3em;
            font-size: 3em;
        }
    }
}

/* Рубильник тёмной темы: спрайт-лента 34 кадров по 81x120 (2x в файле).
   to-dark/to-light — анимация щелчка, is-dark/is-light — крайние положения */
#light-switch {
    --switch-frame: 81px;
    width: var(--switch-frame);
    height: 120px;
    margin-left: 0.8em;
    cursor: pointer;
    flex-shrink: 0;
    background-image: url("../img/light_switch_sprite.06541d6e274d.webp");
    background-size: calc(var(--switch-frame) * 34) 120px;
    background-repeat: no-repeat;
}

#light-switch.is-light {
    background-position-x: 0;
}

/* До инициализации JS: в тёмной теме рубильник сразу в верхнем положении */
html.dark-mode #light-switch {
    background-position-x: calc(var(--switch-frame) * -13);
}

#light-switch.is-dark {
    background-position-x: calc(var(--switch-frame) * -13);
}

#light-switch.to-dark {
    animation: switch-to-dark 0.45s steps(13) forwards;
}

#light-switch.to-light {
    animation: switch-to-light 0.35s steps(9) forwards;
}

@keyframes switch-to-dark {
    from { background-position-x: 0; }
    to { background-position-x: calc(var(--switch-frame) * -13); }
}

@keyframes switch-to-light {
    from { background-position-x: calc(var(--switch-frame) * -24); }
    to { background-position-x: calc(var(--switch-frame) * -33); }
}


/* Кнопка корзины - выпадающий список с фильмами */
#cart {
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0 1em 0 1em;
}

#cart-img {
    height: 30%;

    &:hover {
        cursor: pointer;
    }

}

#cart-list {
    visibility: hidden;

    position: absolute;
    z-index: 10;

    top: 20vh;
    right: 6vw;
    width: 22em;
    max-height: 60vh;
    overflow: auto;


    span {
        font-weight: bold;
        font-size: 1em;
    }

    img {
        width: 5em;
        object-fit: contain;
    }

    .film-remove {
        visibility: hidden;
        cursor: pointer;
    }

    li {
        background-color: var(--black-color);
        color: var(--white-color);

        padding: 0 10px 0 2px;
        border-bottom: 2px solid black;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: center;
    }

    li:hover {
        background-color: lightslategrey;
        color: var(--black-color);
        cursor: default;

        .film-remove {
            visibility: visible;
        }

    }

    @media (min-width: 2400px) {
        right: 5vw;
        width: 33em;

        span {
            font-size: 1.5em;
        }

        img {
            width: 10em;
        }
    }


    @media (min-width: 3000px) {
        right: 8vw;
        width: 41em;

        span {
            font-size: 2.3em;
        }

        img {
            width: 12em;
        }
    }

}


/* 2 row =====================================================*/
.second-row {
    height: 80vh;

}

.nav-column {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    overflow: hidden;


    @media screen and (max-width: 800px) {
        display: none;
        position: absolute;
        top: 5em;
        z-index: 10;

        background-color: var(--white-color);
        padding: 0;
    }


    .nav-link {
        font-weight: bold;
        font-size: 2rem;
        color: var(--black-color);

        @media screen and (max-width: 800px) {
            font-size: 1.5em;
            border: 2px solid black;
        }

        @media screen and (min-width: 2400px) {
            font-size: 3em;
        }

        @media screen and (min-width: 3000px) {
            font-size: 4rem;
        }

        &:hover {
            color: var(--orange-color);

        }

    }

}

.nav-img {
    height: 45%;

    @media screen and (max-width: 800px) {
        backdrop-filter: blur(15px);
    }

}


/* Для мобилок поменяем навигацию */
