.movies-section h2,
.movies-list h3 {
    color: rgb(62, 62, 63);
}

.movies-section {
    padding: 8px 0;
    position: relative;
    background-color: #eceaff;
    width: 72%;
    margin: 0 auto;
}

#no-movies-msg,
#no-matches {
    color: #7126e0;
    width: 55%;
    margin: 3% auto;
}

#no-matches-img{
    max-width: 800px;
}

#no-matches{
    display: none;
}



.movies-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    position: relative;
    margin-top: 2%;
    align-items: center;
    justify-content: center;

}

.movie-card {
    flex: 0 1 20%;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 1%;
    position: relative;
    height: 45vh;
}


.movie-card:hover {
    border: #7126e0 3.5px solid;
    transform: scale(1.03);
}

.movie-image {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.movie-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.movie-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: #e3e3f1;
    border-radius: 50%;
    background-color: #8e47f8;
}

.movie-card-title {
    font-size: 0.9rem;
    text-align: center;
    padding: 4.5% 1%;
    color: #adadb1;
}

.movie-details-button {
    display: block;
    width: 100%;
    padding: 4.6% 0;
    border-radius: 0 0 8px 8px;
    border: none;
    background-color: #8e47f8;
    color: #e3e3f1;
    font-size: 1rem;
    transition: background-color 0.2s ease-in-out;
    text-align: center;
    text-decoration: none;

}

.movie-details-button:hover {
    background-color: #7126e0;
    color: white;
    cursor: pointer;
    transform: scale(1.02);
}



select {
    font-size: 16px;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    appearance: none;
}

select:hover {
    border-color: #666;
}

select:focus {
    outline: none;
    border-color: #8e47f8;
    box-shadow: 0 0 5px rgba(79, 144, 254, 0.5);
}

option {
    font-size: 16px;
    background-color: #fff;
}

option:checked {
    background: #8e47f8;
}

.search-category {
    border-radius: 24px;
    padding: 1.1%;
    border: solid 1px #bcbdbe;
    background-color: #fff;
    color: #2a2c32;
    flex-direction: row;
    cursor: pointer;
    position: relative;
    margin: 0.7% 0;

}

.sort-section {
    margin-left: 7%;
    display: flex;
    flex-wrap: wrap;
}

.sort-section * {
    margin-right: 8px;
}

.search-category *,
.category-menu .menu * {
    color: rgb(95, 94, 94);
}

.search-category span {
    font-size: 0.8rem;
    line-height: 1.1;
    color: #505257;
    letter-spacing: .12px;
    text-transform: uppercase;
    font-weight: bold;
    margin: 0 auto;
}



.search-category a {
    width: 100%;
    height: 100%;
    font-size: 1px;
    display: flex;
    align-items: center;
    text-decoration: none;
    text-transform: capitalize;
}

.search-category a i {
    display: inline-block;
    margin-left: 4px;
    font-size: 12px;
    transition: all 0.2s;
}

.search-category:hover a i {
    transform: rotate(180deg);
}

.category-menu {
    width: 240px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: all 0.38s;
    z-index: 2;
}

.category-menu .subject {
    margin: 4px 0;
    color: rgb(62, 62, 63);
    text-transform: capitalize;
    font-size: 14px;
}

.subject {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.category-menu .menu-item {
    position: relative;
    padding: 6px 0 6px 36px;
    font-size: 1.02rem;
    line-height: 22px;
    text-transform: capitalize;
    transition: all 0.18s;
}

.category-menu .menu-item:hover,
.selected-category,
.selected-type {
    /* color: #fbbc05; */
    color: #8e47f8;
    font-weight: bold;
    font-size: 1.05rem;
}

.search-category:hover .category-menu {
    top: calc(100% + 1px);
    opacity: 1;
    pointer-events: all;
}

.genre-item input[type="checkbox"]:checked {
    accent-color: #8e47f8;
}

.genre-list label {
    font-size: 1.02rem;
    position: relative;
    line-height: 22px;
    text-transform: capitalize;
    transition: all 0.18s;
}

input[type="checkbox"]:checked+label {
    color: #8e47f8;
    font-weight: bold;
    font-size: 1.05rem;
}

.genre-item label:hover {
    cursor: pointer;
}


@media only screen and (max-width:1330px) {
    .movie-card {
        flex: 0 1 23%;
        height: 40.2vh;
    }

    .sort-section {
        margin-left: 1.2%;
    }

    .movie-rating {
        height: 32px;
        width: 32px;
        font-size: 0.9rem;
    }

    #no-movies-msg{
        font-size: 2rem;
    }

}

@media only screen and (max-width:1040px) {
    .movie-card {
        flex: 0 1 28%;
        height: 39vh;
    }

    .sort-section {
        margin-left: 6%;
    }
}

@media only screen and (max-width:860px) {
    .movies-section {
        width: 100%;
    }

    .movie-card {
        flex: 0 1 26.5%;
        height: 41vh;
    }

    .sort-section {
        margin-left: 8.5%;
    }

    #back-to-top-btn {
        bottom: 9%;
        right: 1.4%;
        width: 36px;
        height: 36px;
    }

    #no-movies-msg{
        font-size: 1.8rem;
    }

    #back-to-top-btn i {
        font-size: 18px;
        padding: 8px;
    }

    .category-menu {
        width: 180px;
    }

    .category-menu .menu-item {
        font-size: 0.9rem;
        padding-left: 14px;
    }

    .category-menu .menu-item:hover,
    .selected-category,
    .selected-type {
        font-size: 0.95rem;

    }
}

@media only screen and (max-width:680px) {
    .movies-section {
        width: 100%;
    }

    .search-category {
        padding: 1.5% 1.2%;
    }

    .movie-card {
        flex: 0 1 41%;
        height: 48vh;
        margin: 1.6%;
    }

    .sort-section {
        margin: 0 auto;
        justify-content: center;
    }

    #reset-all-btn {
        display: block;
        padding: 1.3%;
        margin: 2% 16%;
    }

    .movies-section h2 {
        font-size: 32px;
        margin-bottom: 5%;
    }
}

@media only screen and (max-width:550px) {
    .movie-card {
        flex: 0 1 46%;
        height: 42.5vh;
    }

    #no-movies-msg{
        font-size: 1.6rem;
    }

}

@media only screen and (max-width:460px) {
    .movie-card {
        flex: 0 1 71%;
        height: 56.5vh;
        margin: 2.5%;
    }

    input[type="checkbox"]:checked+label {
        font-size: 1.03rem;
    }

    .sort-section {
        margin: 0 auto;
    }

    #reset-all-btn {
        margin-top: 2.3%;
    }

    .search-category {
        width: 42%;
        padding: 1.8% 2.4%;
        margin: 1.5% 2%;
    }

    .search-category a {
        text-align: center;
    }

    #reset-all-btn {
        width: 57%;
        padding: 2.6% 5%;
        margin: 3% auto;
    }

    .category-menu .menu-item:hover,
    .selected-category,
    .selected-type {
        font-size: 0.96rem;
    }


}

@media only screen and (max-width:380px) {
    .movie-card {
        flex: 0 1 75%;
        height: 66.5vh;
        margin: 2.5%;
    }

    input[type="checkbox"]:checked+label {
        font-size: 1.02rem;
    }

    .movies-section h2 {
        font-size: 30px;
    }

    .category-menu {
        width: 166px;
        font-size: 12px;
        padding: 14px;
        left: -10.5%;
    }

    .category-menu .menu-item{
        padding-left: 6px;
        font-size: 0.9;
    }

    #no-movies-msg{
        font-size: 1.5rem;
    }

    .category-menu .menu-item:hover,
    .selected-category,
    .selected-type {
        font-size: 0.91rem;
    }
}