body {
    margin: 0;
    font-family: '-apple-system-font';
    color: #202020;
    font-size: 10pt;
    font-weight: 200;
    color: white;
}
body, div, input, textarea {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}
a {
    text-decoration: none;
    color: inherit;
}
em {
    font-style: normal;
}
.title {
    position: relative;
    padding: 30px 0;
    text-align: center;
    font-size: 20pt;
    z-index: 1;
}
.bg {
    background-image: linear-gradient(to bottom,rgba(94,56,187,.8),rgba(48,111,193,.8)), url('https://i.imgur.com/eW2UmRF.jpeg');
    width: 100%;
    height: 100%;
    z-index: 0;
    position: fixed;
    background-size: cover;
    background-position: center center;
    filter:blur(10px);
    transform: scale(1.05);
}
.btn_box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
    .btn {
        text-align: center;
        padding: 10px 0;
        background: rgba(85, 152, 239, .5);
        border-radius: 5px;
        cursor: pointer;
    }
.nav {
    position: relative;
    z-index: 1;
    display: flex;
    padding: 0 20px;
    max-width: 720px;
    margin: 0 auto 50px;
}
    .nav_category {
        flex: 1;
        padding: 10px 0;
    }
.wrap {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    max-width: 720px;
    width: 80%;
}
    .cate_title {
        text-align: center;
        font-size: 14pt;
        margin: 20px 0 10px;
    }
    .cate_info {
        text-align: center;
    }
    .bottom_info {
        text-align: right;
        margin: 5px 0 10px;
        font-size: 8pt;
    }
    .text_length {
        margin: 20px 0 10px;
        text-align: center;
    }
    textarea {
        color: #666;
        padding: 0.75em;
        border: none;
        background: #fafafa;
        box-sizing: border-box;
        resize: none;
        border-radius: 5px;
        font-size: 10pt;
        width: 100%;
    }
    .insta_modi {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        margin-top: 10px;
        gap: 10px;
    }
    .modi {
        flex: 1 1 auto;
        font-size: 8pt;
        padding: 10px;
    }
    .fin_box {
        display: flex;
        margin-top: 20px;
    }
        .fin {
            flex: 1;
            font-size: 8pt;
        }
        .fin_icon {
            display: inline-block;
            font-size: inherit;
            height: 1em;
            overflow: visible;
            vertical-align: -0.125em;
        }
    .popup_box {
        position: fixed;
        top: 20px;
        left: 0;
        z-index: 100000000;
        width: 100%;
        height: 100%;
        -webkit-justify-content: center;
        display: none;
        flex-direction: column;
        transition: all 0.2s ease-out;
        opacity: 0;
    }
        #popup_inner {
            position: relative;
            margin: 0 auto;
            width: 80%;
            height: 50%;
            background: rgba(0, 0, 0, 0.8);
            border-radius: 10px;
            overflow-y: auto;
            overflow-x: hidden;
        }
            #spell_text {
                width: 100%;
                height: 100%;
                padding: 30px;
            }
            .spell_info_box {
                position: absolute;
                right: 5px;
                bottom: 5px;
                width: 100%;
                text-align: right;
            }
                .spell_info {
                    display: inline-block;
                    position: relative;
                    padding: 0 0 0 10px;
                    font-size: 8pt;
                    text-align: right;
                }
                    .red_text {
                        color: #ff8181;
                    }
                    .violet_text {
                        color: #d88bff;
                    }
                    .green_text {
                        color: #5fff8e;
                    }
                    .blue_text {
                        color: #66ccff;
                    }
                    .result_underline {
                        text-decoration: underline;
                    }
                    .spell_circle {
                        position: absolute;
                        top: 50%;
                        left: 0;
                        margin-top: -3px;
                        width: 6px;
                        height: 6px;
                        -webkit-border-radius: 3px;
                        border-radius: 3px;
                    }
                        .red {
                            background-color: #ff8181;
                        }
                        .violet {
                            background-color: #d88bff;
                        }
                        .green {
                            background-color: #5fff8e;
                        }
                        .blue {
                            background-color: #66ccff;
                        }
            #popup_close {
                position: fixed;
                top: 26%;
                right: 12%;
                z-index: 3;
                display: inline-block;
                width: 20px;
                height: 20px;
                line-height: 1;
                border-radius: 3px;
                cursor: pointer;
                opacity: 0;
                transition: all 0.2s ease-out;
            }
                .x1, .x2 {
                    position: absolute;
                    top: 47%;
                    left: 4%;
                    width: 92%;
                    height: 1px;
                    z-index: 1;
                    background: white;
                    z-index: 2;
                }
                .x1 {
                    transform: rotate(45deg);
                }
                .x2 {
                    transform: rotate(-45deg);
                }
            .font_text_box {
                padding: 30px;
            }
            .font_list {}
                .font {
                    padding: 10px 30px;
                }
            .emoji_list, .kaomoji_list, .tags_list {
    height: 10%;
}

.emoji_cate_box, .kaomoji_cate_box {
    display: flex;
}

.tags_cate_box {
    width:90%;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5개의 열로 고정 */
    grid-auto-rows: auto;
    gap: 10px; /* 태그들 간의 간격 */
}

#tags {margin-top:20px; overflow-y:auto; height:85%;}
/* .tags 는 가로로 스크롤될 수 있는 영역 */
.tags {
    display: flex; /* 태그들을 가로로 나열하기 위해 flex 사용 */
    flex-wrap: nowrap; /* 한 줄로 나열 */
    overflow-x: auto; /* 가로 스크롤 가능하게 */
    padding: 10px; /* 상하 여백 */
    white-space: nowrap; /* 태그들이 한 줄로 나오도록 설정 */
    gap: 10px; /* 태그들 간의 간격 */
}

/* 개별 태그 스타일 */
.tag {
    border: 1px solid #666; /* 테두리 */
    padding: 5px 10px; /* 여백 */
    border-radius: 15px; /* 둥근 모서리 */
    display: inline-block; /* 태그가 가로로 나열되도록 */
    white-space: nowrap; /* 긴 텍스트가 한 줄로 유지되도록 */
    font-size: 12px;
    cursor: pointer;
}

/* 스크롤 바 숨기기 (선택 사항) */
.tags::-webkit-scrollbar {
    height: 6px; /* 가로 스크롤바의 높이 설정 */
}

.tags::-webkit-scrollbar-thumb {
    background-color: #ccc; /* 스크롤바 색상 */
    border-radius: 10px;
}


.emoji_cate, .kaomoji_cate {
    flex: 1;
    gap: 10px;
    padding: 2%;
    opacity: .5;
    cursor: pointer;
    text-align: center;
    font-size: 9pt;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tags_cate {
    padding: 8%;
    opacity: .5;
    cursor: pointer;
    text-align: center;
    font-size: 9pt;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

/* 마지막 아이템의 margin-right */
.emoji_cate:last-child, .kaomoji_cate:last-child {
    margin-right: 15%;
}

.emoji_cate img {
    width: 100%;
    height: auto;
    filter: invert(1);
}

            #emojis {
                display: flex;
                flex-wrap: wrap;
                height: 88%;
                overflow-y: auto;
                overflow-x: hidden;
            }
            #emojis div {
                flex: 1 1 auto;
                font-size: 16pt;
                padding: 5px;
                cursor: pointer;
            }

            .kaomoji_list {height:10%;}
            #kaomojis {
                display: flex;
                flex-wrap: wrap;
                height: 88%;
                overflow-y: auto;
                overflow-x: hidden;
                gap: 5px;
                padding: 0 10px;
            }
                .kaomoji_info {
                    font-weight:bold;
                    width: 100%;
                    margin-top: 10px;
                    margin-bottom: 10px;
                }
                .kaomoji {
                    flex:1 1 auto;
                    padding: 5px;
                    cursor: pointer;
                    border:0.5px solid rgba(255,255,255,0.5);
                    border-radius:10px;
                    background:rgba(0,0,0,0.5);
                }

.log-message {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 12px;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none; /* 사용자 입력 방지 */
}
