body {background-color: #fff;}
body.is-modal {overflow: hidden;}

* {box-sizing: border-box;}

:root {--mainColor: rgb(238, 198, 198);}

img, video {width: 100%;}
ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
dl, dt, dd {
    margin: 0;
    padding: 0;
}


#listWrap {
    max-width: 1000px;
    margin: 0 auto;
}

#filter {
    margin: 20px 0 30px;
    padding: 0 20px;
}

#filter label {margin-right: 20px;}
label[for="searchWord"] {margin-left: 20px;}

#listWrap ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    padding: 20px;
}
#listWrap li {
    max-width: 200px;
    min-width: 150px;
    overflow: clip;
    border: 1px solid #eee;
    box-shadow: 1px 2px 3px #eee;
    padding: 5px;
    background-color: #fff;
    cursor: pointer;
}
#listWrap li:hover {
    /* opacity: 0.7; */
    transform: scale(1.2);
}
#listWrap dt {
    max-height: 250px;
    overflow: hidden;
}
#listWrap dd.words {
    color: #aaa;
    font-size: 12px;
}
#listWrap dd.url {display: none;}
#modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: scroll;
}
body.is-modal #modal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

#modal > .bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.8);
    z-index: -1;
}
#modal > .contentWrap {
    width: 80%;
    max-width: 800px;
}

#modal img {width: 90%;}
#modal .source {
    position: relative;
    display: flex;
    width: 90%;
    margin: 10px auto;
}
#modal i {
    display: block;
    margin-right: 10px;
    cursor: pointer;
}
#modal i::before {
    display: inline-block;
    background-color: var(--mainColor);
    font-size: 30px;
    color: #555;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
}
#modal input {
    flex: 1;
    background-color: #fff;
    padding: 0 10px;
}
#msg {
    display: none;
    position: absolute;
    top: -4em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1em;
    background-color: var(--mainColor);
    border-radius: 1em;
    padding: 1em;
    white-space: nowrap;
    filter: drop-shadow(2px 3px 3px rgba(0,0,0,.3));
}
#msg::before {
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    content: '';
    background-color: inherit;
    width: 20px;
    height: 12px;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
#msg.is-show {
    display: block;
    animation: msgFadeOut 3s forwards;
}
@keyframes msgFadeOut {
    0% {opacity: 1;}
    90% {opacity: 1;}
    100% {opacity: 0;}
}

#modal-close {
    display: inline-block;
    color: #fff;
    font-size: 1em;
    margin-top: 2em;
    cursor: pointer;
}
#modal-close::before {
    font: var(--fa-font-solid);
    content: '\f00d';
    margin-right: 0.5em;
}
