/* ========== 已选角色弹窗样式（selected-characters-modal- 命名空间） ========== */
.selected-characters-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 21;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.selected-characters-modal-container {
    width: 90%;
    max-width: 450px;
    /*height: 700px;*/
    height: auto;
    max-height: 90%;
    background: var(--bg-color, #0A0A0A);
    border-radius: 28px;
    box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

@media (max-width: 550px) {
    .selected-characters-modal-container {
        width: 92%;
        margin: 0 4%;
        height: auto;
        max-height: 85%;
    }
}

.selected-characters-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px 24px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.selected-characters-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color, #ffffff);
}

.selected-characters-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.selected-characters-modal-close i {
    font-size: 14px;
    color: var(--text-color-8, rgba(255, 255, 255, 0.8));
}

.selected-characters-modal-close:hover {
    background: var(--text-color-1, rgba(255, 255, 255, 0.1));
}

/* hint 区域 */
.selected-characters-hint-card {
    background: var(--theme-color-0_1, rgba(122, 65, 219, 0.08));
    border: 0.5px solid var(--theme-color-0_5, rgba(122, 65, 219, 0.3));
    border-radius: 24px;
    margin: 20px 24px 16px 24px;
    padding: 12px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.selected-characters-hint-icon {
    font-size: 20px;
    color: var(--theme-color, #7a41db);
    flex-shrink: 0;
}

.selected-characters-hint-text {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.selected-characters-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 12px 0;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.selected-characters-list-container:hover {
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.selected-characters-list-container::-webkit-scrollbar {
    width: 4px;
    background: transparent;
}

.selected-characters-list-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 6px;
}

.selected-characters-list-container:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.selected-characters-list {
    display: flex;
    flex-direction: column;
}

/* 角色项 */
.selected-character-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;

    transition: background 0.2s;
    cursor: pointer;
    width: 100%;
}

.selected-character-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.selected-character-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.selected-character-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.selected-character-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    background-color: var(--text-color-1, rgba(255, 255, 255, 0.1));
}

.selected-character-details {
    flex: 1;
    min-width: 0;
}

.selected-character-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-character-remove-btn {
    padding: 6px 16px;
    border-radius: 30px;
    background: #f2f2f2;
    border: none;
    color: #000000;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.selected-character-remove-btn:hover {
    background: #e0e0e0;
}

.selected-characters-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 15px;
}

/* 移动端调整 */
@media (max-width: 550px) {
    .selected-characters-hint-card {
        margin: 16px 20px 12px 20px;
    }

    .selected-character-item {
        padding: 12px 20px;
    }

    .selected-character-avatar {
        width: 44px;
        height: 44px;
    }

    .selected-character-name {
        font-size: 15px;
    }

    .selected-character-remove-btn {
        padding: 5px 14px;
    }
}