
* {
    box-sizing: border-box;
}

html {
    overflow: auto;
    padding: 0;
    margin: 0;
    color: #e0e0e0;
    height: 100%;
    width: 100%;
    font-family: "Poppins", system-ui;
}

body {
    margin: 0;
    background-color: #282938;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

header {
    order: -1;
    z-index: 100;
    position: sticky;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 1rem 2rem;
}

header::before {
    content: "";
    width: 100%;
    height: 140%;
    position: absolute;
    top: -60%;
    left: 0;
    right: 0;
    background: #282938dd;
    backdrop-filter: blur(10px);
    filter: blur(15px);
}

.menu {
    position: relative;
    z-index: 110;
    margin-left: 1rem;
}

.menu ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu > ul {
    margin: 1rem 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 0.75rem 1.5rem 0 rgba(0, 0, 0, 0.2);
}

.menu ul li {
    position: relative;
    flex: 100%;
    width: 100%;
}

.menu ul ul {
    flex-direction: column;
    position: absolute;
    top: 100%;
    opacity: 0;
    pointer-events: none;
    background: #282938dd;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: 0 0.75rem 1.5rem 0 rgba(0, 0, 0, 0.2);
    min-width: 100%;
    transition: all ease .3s;
}
.menu ul ul::before {
    content: "";
    position: absolute;
    display: block;
    top: -4px;
    right: 0;
    left: 0;
    height: 8px;
    z-index: 10;
}

.menu ul li:hover ul {
    opacity: 1;
    pointer-events: auto;
}

.menu a {
    display: block;
    height: 44px;
    padding: 0.55rem .75rem 0.5rem;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: background-color ease .3s;
    border-radius: 10px;
    font-size: 16px;
}

.menu a:hover {
    background-color: #0001;
}

.menu ul ul a {
    margin: 0;
    padding: 0.6rem 1rem 0.5rem;
    width: 100%;
    display: block;
    text-align: left;
}

.menu ul ul a:hover {

}

.menu a.active {
    background-color: #fff;
    color: #282938;
}

.menu ul ul a {
    margin: 0;
    padding: 0.5rem 1rem;
    width: 100%;
}

.search {
    width: auto;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 100;
    top: 0;
    padding: 1rem;
}


.search input.search-input {
    position: relative;
    z-index: 1;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: 0 0.75rem 1.5rem 0 rgba(0, 0, 0, 0.2);
    background: #28293833;
    height: 44px;
    width: 100%;
    padding: .55rem 1rem .6rem;
    color: #fff;
    font-size: 16px;
    transition: box-shadow ease .3s;
}

.search input.search-input:focus,
.search input.search-input:hover {
    outline: 1px solid #fff1;
}

.search input.error {
    background: #ff000029;
    border-color: #f003;
}

#movies {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 30px;
}

.movie-container {
    perspective: 400px;
    width: 220px;
}

.movie {
    width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 0.75rem 1.5rem 0 rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: clip;
    transition: box-shadow ease .3s, transform ease .2s;
    cursor: default;
    transform: rotateX(0deg);
}

.movie a {
    display: block;
}

.movie .image {
    position: relative;
}

.category {
    padding: 3px 8px;
    margin: 5px 5px 0 0;
    display: inline-block;
    width: auto;
    background-color: #282938ee;
    color: #eee;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.category:hover {
    background-color: #eee;
    color: #282938ff;
}

.image .cat {
    position: absolute;
    top: 0;
    left: 5px;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    header {
        padding: 0 .5rem 1rem;
    }
    header::before {
        height: 160%;
        filter: none;
    }
    .menu {
        margin: 0;
        width: 100%;
    }
    .menu-4 {
        display: none;
    }
    .menu ul ul {
        right: 0;
    }
    #movies {
        padding: 10px 0 15px;
        gap: 15px;
    }
    #movies > div {
        width: calc(50% - 15px);
    }
    #movies .movie {
        width: 100%;
    }
    .movie-container {
        perspective: unset;
    }
    .search {
        padding: 0;
    }
}

.search input:focus,
.search input:hover,
.search button:hover,
.movie:hover {

    box-shadow: 0 0.75rem 1.5rem 0 rgba(0, 0, 0, 0.4);
}

.buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.buttons a {
    height: 40px;
    display: block;
    color: #ddd;
    transition: color ease .3s, background-color ease .3s;
}

.buttons a.dl-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: calc(100% - 40px);
}

.buttons a.source {
    width: 40px;
    height: 40px;
    font-style: italic;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff9
}

.buttons a:hover {
    background-color: #ffffff03;
    color: #fff;
}

img {
    width: 100%;
    max-width: calc(100% - 6px);
    height: auto;
    max-height: 300px;
    margin: 3px;
    border-radius: 7px;
    aspect-ratio: 9 / 14;
    object-fit: cover;
    object-position: top center;
}

h3 {
    margin: 0;
    padding: .5em 1em;
    text-align: center;
    font-size: 14px;
    font-weight: 400;
}

a {
    color: #fff;
    text-decoration: none;
}

.filter {
    position: relative;
    z-index: 5;
}

.filter button {
    height: 44px;
    box-shadow: 0 0.75rem 1.5rem 0 rgba(0, 0, 0, 0.2);
    background: #28293833;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: .5rem 2rem .6rem;
    margin: 0 0 0 1rem;
    cursor: pointer;
    transition: background-color ease .3s;
    font-size: 16px;
}

.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 100;
    box-shadow: 0 0.75rem 1.5rem 0 rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #282938dd;
    backdrop-filter: blur(10px);
    padding: .5rem;
    border-radius: 10px;
    max-height: 40vh;
    overflow: scroll;
}

.dropdown.show {
    display: block;
}

.dropdown input[type="checkbox"] {
    appearance: none;
    font: inherit;
    color: #c0c0c0;
    width: 1.15em;
    height: 1.15em;
    border: 0.15em solid currentColor;
    border-radius: .25em;
    transform: translateY(-0.075em);
    display: inline-grid;
    place-content: center;
}

input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    border-radius: .15em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #fff;
}

input[type="checkbox"]:checked {
    color: #fff;
}
input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.dropdown label {
    width: 100%;
    display: block;
    white-space: nowrap;
    padding: 0 .25rem .25rem;
    cursor: pointer;
    color: #e0e0e0;
}

.dropdown label:hover {
    color: #fff;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 1);
}

.categories-door {
    display: flex;
    z-index: 100;
    margin: 0 -.25rem .25rem;
    padding: 0.5rem;
}

.categories-door label {
    width: 50%;
    height: 44px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px 0 0 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: box-shadow ease .3s
}

.categories-door label:last-of-type {
    border-radius: 0 6px 6px 0;
    border-left: 0;
}

.categories-door input[type="radio"] {
    display: none;
}

.categories-door input[type="radio"]:checked + label {
    box-shadow: inset 0 0 30px #19192399;
    color: #fff;
}

