@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@200..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho&display=swap');

:root {
    --white-clr: #ffff;
    --bg-clr: rgba(255, 255, 255, 0.2);
    --bg-dk-clr: rgba(255, 255, 255, 0.3);

    --blue: #2b8cff;
    --green: #2ebf6e;
    --red: #ff6b6b;
    --purple: #8b5cf6;
    --grey: #6b7280;
    --pink: #ec4899;
    --yellow: #facc15;
    --orange: #fb923c;
    --brown: #92400e;
    --black: #111827;

    --blue-hover: #1e74e6;
    --green-hover: #22a85d;
    --red-hover: #e65858;
    --purple-hover: #7c3aed;
    --grey-hover: #555b68;
    --pink-hover: #db2777;
    --yellow-hover: #eab308;
    --orange-hover: #f97316;
    --brown-hover: #78350f;
    --black-hover: #000000;
}
body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #fff;
    font-family: "Noto Serif JP", serif;
}
body.modal-open {
    overflow: hidden;
    height: 100vh;
}
.dropdown{
    position: relative;
    margin: 20px 0 20px 0;
}
.dropdown body{
    box-sizing: border-box;
}
.select{
    background: var(--bg-clr);
    color: var(--white-clr);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: 0.6s ease-out;
    border: 1px solid var(--bg-dk-clr);
}
.select-clicked{
    border: 1px solid var(--bg-dk-clr);
    box-shadow: 0 0 12px rgba(0,0,0,.2);
    border-radius: 12px 12px 0 0;
}
.select:hover{
    background: var(--bg-dk-clr);
}
.caret{
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--white-clr);
    transition: 0.3s;
}
.caret-rotate{
    transform: rotate(180deg);
}
.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--bg-clr);
    border-radius: 12px;
    color: var(--white-clr);
    position: relative;
    max-height: 0;      
    overflow: hidden;    
    transition: max-height 0.3s ease, padding 0.3s ease;
    border: none;
}
.menu li{
    background-color: var(--white-clr);
    color: var(--white-clr);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 5px 0;
    padding: 12px 8px;
}
.menu-open{
    max-height: 5000px;
    padding: 3px 8px;
    border-radius: 0 0 12px 12px;
    transition: 0.5s ease-out;
    border-bottom: 1px solid var(--bg-dk-clr);
    border-right: 1px solid var(--bg-dk-clr);
    border-left: 1px solid var(--bg-dk-clr);
}
.check {
    display: none;
}
.check.active {
    display: block;
}
.check input[type="checkbox"] {
    display: none;
    visibility: hidden;
}
.check .cbx {
    margin: auto;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}
.check .cbx span {
    display: inline-block;
    vertical-align: middle;
    transform: translate3d(0, 0, 0);
}
.check .cbx span:first-child {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    transform: scale(1);
    vertical-align: middle;
    border: 1px solid var(--white-clr);
    transition: all 0.2s ease;
}
.check .cbx span:first-child svg {
    position: absolute;
    top: 4px;
    left: 3px;
    fill: none;
    stroke: var(--white-clr);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 16px;
    stroke-dashoffset: 16px;
    transition: all 0.3s ease;
    transition-delay: 0.1s;
    transform: translate3d(0, 0, 0);
}
.check .cbx span:first-child:before {
    content: "";
    width: 100%;
    height: 100%;
    background: var(--blue);
    display: block;
    transform: scale(0);
    opacity: 1;
    border-radius: 50%;
}
.check .cbx span:last-child {
    padding-left: 8px;
}
.check .cbx:hover span:first-child {
    border-color: var(--blue);
}
.check .checked:checked + .cbx span:first-child {
    background: var(--blue);
    border-color: var(--blue);
    animation: checked 0.4s ease;
}
.check .checked:checked + .cbx span:first-child svg {
    stroke-dashoffset: 0;
}
.check .checked:checked + .cbx span:first-child:before {
    transform: scale(3.5);
    opacity: 0;
    transition: all 0.6s ease;
}
@keyframes checked {
    50% {
        transform: scale(0.9);
    }
}
.check-span-none {
    margin-right: -15px;
}
.anime-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
#genreNotFound,
#themeNotFound,
#demographicNotFound {
    display: none;
    margin: -12px 20px 0 20px;
    text-align: center;
    padding: 8px 10px;
    background: var(--bg-clr);
    border-radius: 10px;
    color: var(--white-clr);
    font-size: 14px;
}
.search-genre,
.search-theme,
.search-demographic {
    position: relative;
    width: 100%;
}
.search-genre input,
.search-theme input,
.search-demographic input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 45px 12px 14px;
    border-radius: 12px;
    border: none;
    outline: none;
    font-size: 15px;
    background: var(--bg-dk-clr);
    color: var(--white-clr);
}
.clear-search {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    cursor: pointer;
    color: var(--white-clr);
    opacity: .7;
    display: none;
}
.clear-search:hover {
    opacity: 1;
}
input::placeholder {
    color: var(--white-clr);
    font-family: "Noto Serif JP", serif;
}
.title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}
.genre-labels, 
.theme-labels,
.demographic-labels {
    font-size: 14px;
    opacity: .85;
}
.last-update {
    font-size: 14px;
    opacity: .85;
    color: #cccc;
    line-height: 1.5;
}
.last-update.empty {
    font-style: italic;
}
.genre,
.theme,
.demographic {
    margin-right: 4px;
}
.btn-genre, 
.btn-theme, 
.btn-demographic {
    background:var(--purple); 
    color: var(--white-clr);
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}
.btn-genre:hover, 
.btn-theme:hover,
.btn-demographic:hover {
    background: var(--purple-hover);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 7;
}
.modal.hidden {
    display: none;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 7;
    padding: 20px;
}
.modal-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--black-hover);
    color: var(--white-clr);
    padding: 20px;
    border-radius: 14px;
    width: 400px;
    max-height: 80vh;
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
    transition:
        transform .4s cubic-bezier(.22, 1, .36, 1),
        opacity .3s ease;
}
.modal-content h3{
    text-align: center;
}
#genreList, 
#themeList,
#demographicList {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 10px;

    flex: 1;
    overflow-y: auto;
    padding: 0 20px 0 20px;
}
#genreList label,
#themeList label,
#demographicList label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-clr);
    border-radius: 10px;
    cursor: pointer;
    color: var(--white-clr);
    font-size: 14px;
}
#genreList label:hover, 
#themeList label:hover,
#demographicList label:hover {
    background: var(--bg-dk-clr);
}
#genreList input[type="checkbox"],
#themeList input[type="checkbox"],
#demographicList input[type="checkbox"] {
    accent-color: var(--purple-hover);
    cursor: pointer;
}
#genreModal button,
#themeModal button,
#demographicModal button {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--white-clr);
    background: var(--grey);
}
#genreModal button:hover,
#themeModal button:hover,
#demographicModal button:hover {
    background: var(--grey-hover);
}
#genreModal button:last-child,
#themeModal button:last-child,
#demographicModal button:last-child {
    background: var(--purple);  
}
#genreModal button:last-child:hover,
#themeModal button:last-child:hover,
#demographicModal button:last-child:hover {
    background: var(--purple-hover);  
}