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

body {
    font-family: sans-serif;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 3rem;
    text-align: center;
}

h2 {
    font-size: 2rem;
    text-align: center;
}

.header {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #0139af;
    padding-top: 8rem;
}

.results {
    width: 100%;
    background: #0139af;
    color: #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.results h2 {
    margin-bottom: 3.5rem;
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    width: 40%;
    padding: 5rem 8rem;
    background: #0139af;
    height: 75vh;
    color: #eee;
    gap: 2rem;
}

.title-wrapper h2,
.title-wrapper h1{
    text-align: left;
    margin: 0;
}

.title-wrapper h2 {
    font-size: 1.5rem;
    opacity: .8;
}

.title-wrapper p {
    opacity: .7;
}

.form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 4rem;
    background: #eee;
    border-radius: 20px 0 0 20px;
    width: 60%;
    height: 100%;
    min-height: 75vh;
    box-shadow: 6px 0 31px 0 rgba(0,0,0,0.24) inset;
}

form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

label {
    font-weight: 500;
    margin-bottom: 0.4rem;
}

input[type="text"], input[type="number"], input[type="file"] {
    border: solid 2px #d8d8d8;
    outline: none;
    border-radius: 12px;
    padding: 0.6rem;
    background: white;
    color: black;
    margin-bottom: 1.5rem;
    transition: 0.2s ease-out;
}

input[type="text"]:focus, input[type="number"]:focus {
    border: solid 2px #0139af;
}

input[type="text"]::placeholder, input[type="number"]::placeholder, input[type="file"]::placeholder {
    opacity: .45;
}

input[type="text"]#search {
    margin: 0;
    padding: .9rem;
    border-radius: 30px;
    border: solid 2px #eee;
    width: 100%;
}

input[type="text"]#search::placeholder {
    font-size: 1rem;
}

input[type="text"]#search:focus {
    border: solid 3px #af013e;
}

.file-wrapper input[type="file"] {
    width: 40%;
    margin: 0 .5rem 0 0;
}

input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
}

.file-label {
    background: #fff;
    padding: .6rem;
    border-radius: 12px;
    border: solid 2px #d8d8d8;
    transition: 0.2s ease-out;
    color: rgba(0, 0, 0, 0.25);
    font-size: .8rem;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.file-label:focus {
    border: solid 2px #0139af;
}

.file-wrapper label {
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    margin-bottom: .5rem;
    gap: .5rem;
}

.file-wrapper p {
    margin: 0 0 .4rem 0;
}

.file-wrapper img {
    width: 30px;
}

.silent-text {
    color: #ccc;
    font-size: 0.8rem;
    margin-top: 0;
}

.semi-silent-text {
    opacity: .5;
    font-size: .8rem;
    margin-top: 0;
}

input[type="submit"] {
    border: none;
    border-radius: 12px;
    background: #0139af;
    color: #eee;
    padding: .9rem 1.5rem;
    margin-top: 4rem;
    transition: 0.2s ease-out;
    margin-left: auto;
}

input[type="submit"],
button[type="submit"] {
    cursor: pointer;
}

input[type="submit"]:hover {
    opacity: 0.8;
}

.success {
    background: #27af01;
    color: #eee;
    border-radius: 20px;
    margin-top: 2rem;
    text-align: center;
    padding: 1rem 0;
    width: 100%;
}

.error {
    background: #af013e;
    color: #eee;
    border-radius: 20px;
    margin-top: 2rem;
    text-align: center;
    padding: 1rem 0;
    width: 100%;
}

.error p {
    display: block;
}

.refresh {
    padding: 0;
    border: none;
    width: unset;
    display: flex;
    flex-direction: row;
}

.refresh button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    border-radius: 30px;
    padding: .7rem .7rem .7rem 1.5rem;
    border: solid 2px #0139af;
    background: #eee;
    cursor: pointer;
    transition: 0.2s ease-out;
    color: black;
}

.refresh button img {
    width: 30px;
}

.refresh button:hover {
    border-color: #af013e;
}

.full-width {
    width: 100%;
}

.list-items {
    min-width: 50%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-radius: 20px;
    margin-bottom: 4rem;
}

.item-wrapper {
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    width: 100%;
}

.item {
    display: flex;
    flex-direction: column;
    background: #eee;
    box-shadow: 5px 0 30px 0 rgba(0,0,0,0.3);
    border-radius: 20px;
    padding: 1rem;
    gap: .5rem;
}

.item p {
    color: black;
    margin: 0;
}

.item .info-item-list div {
    width: 23%;
}

.item .info-item-list div input {
    margin: 0;
}

.item p:first-of-type {
    font-weight: 600;
    opacity: .5;
    font-size: .8rem;
    margin-bottom: .3rem;
}

.nonEditableImage {
    width: 90px;
    height: 90px;
    border-radius: 15px;
}

.editableImage {
    width: 90px;
    height: 90px;
    border-radius: 15px;
}

.item .search-sub-wrapper.editable-genres-wrapper {
    margin-bottom: 0;
}

.edit-file-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: auto;
}

.info-item-list .edit-file-wrapper .file-label {
    width: 100%;
    margin: 0;
}

.info-item-list .edit-file-wrapper label {
    margin: 0;
}

.genres-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background: #ddd;
    padding: .5rem 1rem;
    border-radius: 15px;
}

.genres-list p:first-of-type {
    margin: 0;
}

.genres-list p {
    margin: 0;
    font-size: .8rem;
    opacity: .5;
}

.genres-list p:empty {
    display: none;
}

.info-item-list {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding-left: .3rem;
}

.info-item-wrapper-results {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.info-item-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.info-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.info-item p {
    color: #eee;
}

.extra-buttons-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.extra-buttons-wrap button {
    border: 2px solid #bbb;
    border-radius: 30px;
    background: #eee;
    color: black;
    padding: .5rem 1rem;
    transition: 0.2s ease-out;
    cursor: pointer;
}

.extra-buttons-wrap button.saveButton {
    border: 2px solid #0139af;
    background: #0139af;
    color: #fff;
}

.search-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.search-sub-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
    gap: .5rem;
}

.search-sub-wrapper:last-of-type {
    margin-bottom: 3rem;
}

.search-sub-wrapper img {
    width: 50px;
    cursor: pointer;
    transition: 0.2s ease-out;
}

.search-sub-wrapper img:hover {
    opacity: 0.8;
}

.search-sub-wrapper div,
.checkbox-wrapper {
    background: #fff;
    padding: .7rem;
    border-radius: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    cursor: pointer;
    border: solid 2px #fff;
    color: #000;
    transition: 0.2s ease-out;
    font-size: .8rem;
}

.form-wrapper .search-sub-wrapper {
    margin: 0;
}

.genres-wrapper p:first-of-type {
    margin-bottom: .3rem;
}

.genres-wrapper p:last-of-type {
    margin-bottom: .8rem;
}

.search-sub-wrapper div label,
.search-sub-wrapper div input {
    margin: 0;
    cursor: pointer;
}

button.search-icon {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

ul.pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.pagination li {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: #eee;
    border-radius: 30px;
    padding: .7rem;
    cursor: pointer;
}

ul.pagination li a,
ul.pagination li span,
ul.pagination li.disabled {
    text-decoration: none;
    color: black;
    font-size: .8rem;
}

@media screen and (min-width: 0px) {
    .item-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    }

    h1 {
        font-size: 2rem;
    }

    .header {
        flex-direction: column;
        padding: 1.5rem;
        align-items: stretch;
        gap: 2rem;
    }

    .title-wrapper {
        width: 100%;
        padding: 0;
        height: unset;
        gap: 0;
    }

    .form-wrapper {
        width: 100%;
        height: unset;
        min-height: unset;
        padding: 1.5rem;
        border-radius: 20px;
    }

    input[type="text"], input[type="number"], input[type="file"] {
        margin-bottom: 1rem;
    }

    input[type="submit"] {
        margin-top: 2rem;
    }

    .item {
        flex-direction: column;
        gap: .5rem;
    }

    .info-item-list {
        flex-direction: column;
        gap: 1rem;
    }

    .item .info-item-list div {
        width: 100%;
        text-align: center;
    }

    .item p:first-of-type,
    .item .info-item-list div input,
    .info-item-list .edit-file-wrapper label {
        width: 100%;
    }

    .info-item-list .edit-file-wrapper label {
        margin-bottom: .5rem;
    }

    .item .genres-list p:first-of-type {
        width: unset;
    }

    .info-item-wrapper-results {
        justify-content: space-between;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .info-item-wrapper {
        flex-direction: column;
        align-items: center;
        gap: .5rem;
    }

    .list-items {
        min-width: unset;
        width: 100%;
        margin-bottom: 0;
    }

    .search-item {
        gap: .5rem;
    }

    .search-sub-wrapper {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .search-sub-wrapper:last-of-type {
        margin-bottom: 0;
    }

    .results {
        padding: 1.5rem;
        align-items: stretch;
    }

    .extra-buttons-wrap {
        margin-bottom: 1rem;
    }

    .search-sub-wrapper div, .checkbox-wrapper {
        margin-bottom: 0;
    }

    .form-wrapper .search-sub-wrapper {
        margin-bottom: .5rem;
    }

    .text-data-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
    }

    .refresh {
        justify-content: center;
    }
}

@media screen and (min-width: 481px) {
    .list-items {
        gap: 2.5rem;
    }


    .item-wrapper {
        display: grid;
        grid-gap: 1rem;
        grid-template-columns: repeat(auto-fit, minmax(47.2%, 1fr));
        width: 100%;
    }

    .item {
        width: 100%;
        justify-content: space-between;
    }
}

@media screen and (min-width: 1025px) {
    h1 {
        font-size: 3rem;
    }

    .list-items {
        align-items: center;
    }

    .info-item-wrapper:first-of-type {
        width: 60%;
    }

    .item-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(30%, 1fr));
    }

    .item {
        gap: 2rem;
    }

    .extra-buttons-wrap {
        margin-bottom: 0;
    }

    .header {
        flex-direction: row;
        min-height: 100vh;
        align-items: center;
        padding: 3rem;
    }

    .form-wrapper {
        padding: 2.5rem;
    }

    .title-wrapper {
        padding-left: 3rem;
    }

    ul.pagination {
        width: 100%;
    }

    .info-item-list {
        flex-direction: row;
    }

    .item-wrapper .item .info-item-list .text-data-wrapper,
    .item-wrapper .item .info-item-list .text-data-wrapper div{
        text-align: left;
    }

    .item-wrapper .item .info-item-list .cover-data-wrapper,
    .item-wrapper .item .info-item-list .cover-data-wrapper div {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
        gap: 0;
    }

    .editableImage {
        width: 100px;
        height: 100px;
    }

    .nonEditableImage {
        width: 110px;
        height: 110px;
    }
    .info-item-wrapper-results {
        justify-content: space-between;
        flex-direction: row;
    }

    .refresh {
        justify-content: flex-start;
    }
}

@media screen and (min-width: 1441px) {
    .nonEditableImage {
        width: 160px;
        height: 160px;
    }

    .editableImage {
        width: 150px;
        height: 150px;
    }
}

@media screen and (min-width: 1921px) {
    .title-wrapper {
        padding-left: 10%;
    }

    .form-wrapper {
        margin-right: 10%;
        width: 80%;
    }

    .item-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(20%, 1fr));
    }

    .item {
        width: 100%;
    }
}
