
.creative-modal-wrapper {
    /*position: fixed;*/
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 11;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /*overflow-y: auto;*/
    opacity: 0;
    visibility: hidden;
    /*transition: opacity 0.25s ease, visibility 0.25s, bottom 0.2s ease;*/
    transition: background 0.3s ease-out, backdrop-filter 0.3s ease-out;
    font-family: 'Arial', system-ui, -apple-system, sans-serif;

    overflow: hidden;
}

.creative-modal-wrapper.blur-bg {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.creative-modal-wrapper.show {
    opacity: 1;
    visibility: visible;
}


.creative-modal-wrapper .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;

    padding-left: 20px;
    padding-right: 20px;
}

.creative-modal-container {

    transform: translateY(500px);
    width: 100%;
    /*max-width: 900px;*/
    /*margin: 32px 28px;*/
    /*margin: 32px 28px;*/
    background: transparent;
    display: flex;
    flex-direction: column;
    /*max-height: calc(100% - 64px);*/
    max-height: 100%;
    overflow: hidden;

    padding: 20px 0;
    /*padding-bottom: 0;*/

    opacity: 0;
    transition: margin-top 0.3s ease-out, opacity 0.3s ease-out, transform 0.3s ease-out;
}

.creative-modal-container.show {
    opacity: 1;
    transform: translateY(0); /* 滑到正常位置 */
}

.creative-modal-header {
    flex-shrink: 0;
}

.creative-modal-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.creative-modal-title-row h2 {
    font-size: 20px;
    font-weight: 600;
    /*color: rgba(255, 255, 255, 0.92);*/


    background: linear-gradient(45deg, #f2f2f2, #8c8c8c, #f2f2f2);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    opacity: 0.9;
    animation: textFlow 3s linear infinite;
}

.creative-modal-close-btn {
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    /*display: none;*/
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.creative-modal-close-btn i {
    font-size: 12px;
}

.creative-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.creative-modal-tabs-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    --item-height: 30px;
    padding: 10px 0;
}

.creative-modal-tabs-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(to right, black 85%, transparent 98%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 98%);


}

.creative-modal-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.creative-modal-tabs-bar {
    display: flex;
    gap: 3px;
    white-space: nowrap;
    padding-bottom: 4px;

    align-items: center;
}

.creative-modal-search-bar {
    height: calc(var(--item-height) + 10px);
    width: 100%;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text-color-2);
    border-radius: 10px;

    padding: 0 10px;
}

.creative-modal-search-bar:hover {
    border-color: var(--text-color-5);
}


.creative-modal-search-bar input {

    height: var(--item-height);
    background: transparent;
    border: none;
    outline: none;
    display: block;
    width: 100%;
    flex: 1;

    /*padding: 0 10px;*/

}

.creative-modal-search-bar i {
    font-size: 14px;
}


.creative-modal-tab-item {
    background: transparent;
    border: none;
    /*padding: 8px 18px;*/
    padding: 0 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--item-height);
}


.creative-modal-tab-item * {
    font-size: inherit;
    color: inherit;
}


.creative-modal-tab-item i {
    margin-left: 3px;
    font-size: inherit;
    transition: transform 0.3s;
}

.creative-modal-tab-item.expand i {
    transform: rotate(180deg);
}

.creative-modal-tab-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

.creative-modal-tab-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.creative-modal-search-circle {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    font-size: 18px;
    transition: background 0.2s;
    margin-left: 12px;

}

.creative-modal-search-circle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.creative-modal-characters-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /*padding: 20px 0 32px 0;*/
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.05);

    border-radius: 10px;

    padding: 0;

    padding-bottom: 300px;
}


.creative-modal-characters-scroll .character-grid-wrapper {

}


.creative-modal-characters-scroll::-webkit-scrollbar {
    width: 4px;
}

.creative-modal-characters-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.creative-modal-characters-scroll::-webkit-scrollbar-thumb {
    background: rgba(122, 65, 219, 0.5);
    border-radius: 10px;
}


@media (max-width: 1400px) {
    .creative-modal-characters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .creative-modal-characters-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .creative-modal-container {
        /*margin: 20px 20px;*/

    }

    .creative-modal-characters-scroll {
        /*padding: 16px 0 24px;*/
    }
}

@media (max-width: 768px) {
    .creative-modal-close-btn {
        display: flex;
    }

    .creative-modal-characters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .creative-modal-avatar-img {
        width: 70px;
        height: 70px;
    }

    .creative-modal-character-name {
        font-size: 16px;
    }

    .creative-modal-title-row h2 {
        font-size: 22px;
    }

    .creative-modal-tabs-wrapper {
        --item-height: 30px;
    }

    .creative-modal-tab-item {
        padding: 0 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .creative-modal-card-overlay {
        padding: 14px 10px 12px;
    }

    .creative-modal-create-btn {
        font-size: 11px;
        padding: 5px 0;
    }
}

body.creative-modal-open {
    overflow: hidden;
}


.creative-model-prompt-box-shadow {
    --prompt-box-wrapper-height: 200px;
    height: var(--prompt-box-wrapper-height);
    /*background: linear-gradient(to top, #000 70%, transparent);*/
    background: linear-gradient(to top, #000 50%, transparent);

    z-index: 1;

    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;

    opacity: 0;

    transition: opacity 0.3s ease-out;
}


.creative-modal-wrapper.show .creative-model-prompt-box-shadow {
    opacity: 1;
}


.filer-tab-wrapper {
    display: flex;
    flex-wrap: wrap; /* 关键：允许换行 */
    white-space: normal; /* 修改 wrap 为 normal（wrap 不是有效值） */
    /*align-items: center;*/
    /*overflow-x: auto;*/
    /*overflow-y: hidden;*/
    /*padding-top: 10px;*/
    padding-bottom: 20px;
    /*padding-bottom: 20px;*/

    /* 隐藏滚动条 */
    /*scrollbar-width: none; !* Firefox *!*/
    /*-ms-overflow-style: none; !* IE和Edge *!*/

    /*padding-right: 40px;*/

    /*-webkit-mask-image: linear-gradient(*/
    /*    to right,*/
    /*    black 0%,*/
    /*    black 85%,*/
    /*    transparent 100%*/
    /*);*/

    /*background: red;*/

    height: auto;

    gap: 10px;
}


.filer-tab-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.filter-tab-item {
    display: block;
    color: var(--text-color-3);
    /*font-size: 13px;*/
    font-size: 14px;
    flex-shrink: 0;

    /*padding: 4px 12px;*/
    border-radius: 20px;
    /*border: 1px solid var(--text-color-0-8);*/
    /*background: var(--text-color-0-5);*/
}


.filter-tab-item:not(:last-child) {
    margin-right: 10px;
}


.filter-tab-item:hover {
    color: var(--text-color);
}

.filter-tab-item-active {
    /*background: var(--text-color-9);*/
    color: var(--text-color);
    font-weight: bold;
}


.filter-tab-item i {
    color: inherit;
    font-size: inherit;
}


@media (max-width: 768px) {
    .filter-tab-item {
        font-size: 12px;
    }
}


.character-filter-tab-outer {
    overflow: hidden;

    height: 0;
    transition: height 0.3s ease-out;
}

